/* dotz design foundation, ported from site/prototype/proto.css (docs/ui-spec.md, web/DESIGN.md).
   Two palettes are tuned separately - light on a grey canvas, dark on a near-black canvas with lifted surfaces - and every
   screen reads its colour, type step, space, radius, height and duration from these names. No screen hard-codes one. */
:root {
  color-scheme: light;

  /* colour - light: grey canvas, white cards, ink in three steps, one sparing blue accent */
  --bg: #f2f4f6; --side: #f2f4f6;
  --card: #ffffff; --pop: #ffffff;
  /* fields: a filled surface with no border, a line only on focus or error. --ff-fill is the fill for the surface the field sits on (see .card below) */
  --ff-fill: var(--card); --ff-pop: var(--layer);
  --ff-ring: inset 0 0 0 1.5px var(--accent);
  --layer: #f2f4f6; --hover: #e9ecf0; --active: #e5e8eb; --track: #e5e8eb;
  --card-hover: #f9fafb;
  /* a selected or pressed row inside a card: never the page's own grey (--bg/--layer), so a first or last row keeps the card's edge */
  --row-sel: #e8ebee;
  --line: #e5e8eb; --line-2: #d1d6db;
  --fg: #191f28; --fg-2: #4e5968; --fg-3: #616b78;
  --accent: #3182f6; --on-accent: #ffffff;
  --ok: #0a8754; --warn: #ae5900; --err: #e32435;
  /* text of the .tag.warn status word: --warn darkened (same hue) so it clears 4.5:1 on every light surface, hovered and selected rows too (4.15 with --warn itself); its dot stays --warn */
  --warn-ink: #8f4900; --on-err: #ffffff;
  /* 미답장 (waiting for the owner's reply): orange fill + its text colour, 5.2:1 on white (light), 8:1 on the dark card (dark) */
  --unreplied: #c2410c; --on-unreplied: #ffffff;
  /* Messenger chat (30-kakao.js): the room's backdrop, incoming / own bubbles, time and date chip */
  --kk-bg: #dbe5ee; --kk-in: #ffffff; --kk-in-fg: #191f28; --kk-own: #fee500; --kk-own-fg: #191919; --kk-time: #5b6877; --kk-chip: rgb(25 31 40 / .38); --kk-chip-fg: #ffffff;
  /* a filter row: the segmented track and its chosen cell (web/DESIGN.md 필터) */
  --seg-track: var(--line); --seg-on: var(--card);
  --scrim: rgb(0 0 0 / .4);
  /* terminal panel: dark in both themes */
  --tb: #101012; --tf: #e6e6ea; --td: #8d8d96; --tl2: #2b2b30; --tok: #4ade80; --terr: #ff7b7b; --tac: #a9a9ff;

  /* type scale (web/DESIGN.md Type): every screen uses a step, never a one-off size */
  --fs-page: 22px; --lh-page: 30px;          /* page title in the top bar */
  --fs-page-sm: 20px; --lh-page-sm: 28px;    /* page title on a phone */
  --fs-big: 20px; --lh-big: 28px;            /* the one big value in a card */
  --fs-card: 16px; --lh-card: 22px;          /* card title */
  --fs-sec: 14px; --lh-sec: 20px;            /* section label */
  --fs-row: 15px; --lh-row: 22px;            /* list row title */
  --fs-chat: 15px; --lh-chat: 24px;          /* chat body */
  --fs-body: 14px; --lh-body: 22px;          /* body copy */
  --fs-meta: 12px; --lh-meta: 16px;          /* meta, descriptions, captions */
  --fs-tag: 11px; --lh-tag: 16px;            /* status tag */

  /* space (web/DESIGN.md Space scale): --sp-N = N x 4px. Rows breathe by count, not by growing a row */
  --sp-05: 2px; --sp-1: 4px; --sp-15: 6px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px;

  /* shape: soft boxes, one small control radius; only a status tag and the two-value toggle are fully rounded (알약 규칙) */
  --r-card: 18px; --r-sheet: 20px; --r-menu: 14px; --r-ctl: 10px; --r-seg: 8px; --r-seg-in: 6px; --r-pill: 999px;
  --edge: 28px; --frame-list-w: 340px; --frame-gap: var(--sp-4); --view-w: 920px; --sheet-w: 480px; --lead-ind: calc(var(--row-px) + var(--sp-6) + var(--sp-3)); --back-x: calc(var(--sp-6) - var(--sp-15)); --back-w: calc(var(--sp-8) + var(--sp-05));

  /* heights: rows, menu items, controls and every button tier take their height here (docs/ui-spec.md) */
  --row-h: 44px; --row-py: 8px; --row-px: 16px;
  --menu-h: 30px; --menu-py: 4px; --menu-px: 8px; --menu-h-sheet: 44px;
  --sheet-h: 44px;
  --btn-h: 36px; --btn-h-sm: 32px; --btn-h-row: 28px; --btn-hit: 44px;
  --ctl-h: 32px;
  --field-h: 36px; --field-h-touch: 40px;
  --chip-h: 28px; --tag-h: 20px; --tag-px: 6px;

  /* shadows: cards stay flat; only what floats over the page carries one */
  --float: 0 8px 24px rgb(0 0 0 / .10), 0 1px 3px rgb(0 0 0 / .06);
  --shadow-menu: 0 8px 24px rgb(0 0 0 / .14);
  --shadow-sheet: 0 -4px 28px rgb(0 0 0 / .22);
  --shadow-dialog: 0 16px 48px rgb(0 0 0 / .22);
  --shadow-panel: 0 6px 24px rgba(0, 0, 0, .06);

  /* motion (web/DESIGN.md Motion): every move has a cause, ease-out, transform/opacity only */
  --m-fast: 150ms; --m-base: 220ms; --m-slow: 300ms; --m-ease: cubic-bezier(.2, .7, .2, 1);

  --font: Pretendard, "Pretendard Variable", -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "Geist Mono", SFMono-Regular, Menlo, Consolas, monospace;
}
:root[data-theme="dark"] {
  color-scheme: dark;

  /* colour - dark: tuned on its own, not derived from light; depth comes from lifted surfaces first, shadows second */
  --bg: #121214; --side: #121214;
  --card: #1d1d21; --pop: #26262b;
  --ff-pop: var(--active);
  --layer: #26262b; --hover: #2b2b31; --active: #303036; --track: #34343b;
  --card-hover: #232328;
  --row-sel: #2b2b31;
  --line: #2b2b31; --line-2: #3d3d45;
  --fg: #ececf0; --fg-2: #b0b4bc; --fg-3: #8e939c;
  --accent: #6ca7ff; --on-accent: #121214;
  --ok: #3ecf8e; --warn: #f5a524; --err: #ff6369; --warn-ink: #f5a524; --on-err: #121214;
  --unreplied: #ff9a4d; --on-unreplied: #1b1206;
  --kk-bg: #161c23; --kk-in: #2b2f36; --kk-in-fg: #ececf0; --kk-own: #d9bd00; --kk-own-fg: #1b1b1b; --kk-time: #8e98a5; --kk-chip: rgb(255 255 255 / .12); --kk-chip-fg: #b0b4bc;
  --seg-track: var(--layer); --seg-on: var(--line-2);
  --scrim: rgb(0 0 0 / .6);
  --float: 0 8px 24px rgb(0 0 0 / .5), 0 1px 3px rgb(0 0 0 / .4);
  --shadow-menu: 0 8px 24px rgb(0 0 0 / .5);
  --shadow-sheet: 0 -4px 28px rgb(0 0 0 / .55);
  --shadow-dialog: 0 16px 48px rgb(0 0 0 / .6);
  --shadow-panel: 0 6px 24px rgba(0, 0, 0, .35);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
/* manipulation: a double tap does not zoom the page (iPhone web app, owner 2026-10-26); pinch zoom still works. On every element, because a
   scrolling container (the chat timeline) starts its own touch-action chain; rules that set their own (pan-y, none) are more specific and stay. */
*, *::before, *::after { touch-action: manipulation; }
body { font: 400 var(--fs-body)/var(--lh-body) var(--font); font-variant-numeric: tabular-nums; font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; background: var(--bg); color: var(--fg); overflow: hidden; -webkit-text-size-adjust: 100%; word-break: keep-all; overflow-wrap: break-word; line-break: strict; }
/* Korean line breaks like Netflix subtitles (web/DESIGN.md Type): whole words, balanced titles, no one-word last line in body text;
   only code and paths may break inside a token. */
h1, h2, h3, h4, .ttl, figcaption { text-wrap: balance; }
/* short fixed copy (empty states, notes, card questions, meta lines): balanced, so a phrase never leaves one word on the last line */
.empty, .hc-none, .bell-none, .note, .cc-note, .dr-none, .od-note, .mb-note, .sup, .dc-q, .dc-ds, .cc-hd { text-wrap: balance; }
p, li, blockquote, dd { text-wrap: pretty; }
code, pre, kbd, samp { word-break: normal; overflow-wrap: anywhere; }
/* a sentence / clause / phrase chunk of copy text (01-phrase-wrap.js): the line breaks between chunks, inside one only when it is
   wider than the line; a box that clamps its lines keeps plain inline text so its ellipsis still trims the last line */
.wph { display: inline-block; max-width: 100%; }
.dcard.fold .wph { display: inline; }
.m-dg { display: inline-block; }
button, input, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
code, pre { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* The field fill by surface: --card on the grey page (the default), --layer on a white one, one step lighter on a dark dialog (--pop equals --layer there). */
.card, .list, .fs-card, .ccard, .cv-card, .ms-card, .pj-card, .fc-card, .hcb-card, .apps-card, .kk-draft, .kk-lp, .kk-chat, .kk-rooms, .mbox-reply, .tr-n, .rq, .sheet, .bm.rep, .bm.alert, .cv-side { --ff-fill: var(--layer); }
dialog.dlg { --ff-fill: var(--ff-pop); }
.fs-body.panel { --ff-fill: var(--card); }
@media (max-width: 639px) { .fs-card, dialog.dlg.fs-card[open] { --ff-fill: var(--card); } .fs-body.panel { --ff-fill: var(--layer); } #v-chat { --ff-fill: var(--layer); } } /* a phone sheet is grey with white panels; the phone chat is white */
svg.ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button:disabled { opacity: .4; cursor: default; pointer-events: none; }
kbd { display: inline-block; flex: none; padding: 0 var(--sp-15); border: 1px solid var(--line-2); border-radius: 4px; background: var(--layer); color: var(--fg-3); font: 500 11px/16px var(--font); }
/* 동작 줄이기: every transition and animation is off, pseudo-elements included (no motion on/off switch in the product) */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after, ::backdrop { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* layout: from 1100px one top row, below it the phone layout (tabs in a bottom bar). The markup is the same in both: #nav (the five tabs, one component), #cmdk (search) and the app bar items.
   Wide: .side, .main and .appbar are display: contents, so each of their children is a cell of the .app grid and sits in the one row. Below 1100px they are the usual flex boxes. The 1100px edge is also where 채팅 puts its list next to the conversation. */
.app { display: grid; grid-template-columns: 20px auto auto auto auto auto minmax(0, 1fr) auto auto auto auto 12px; grid-template-rows: 48px auto auto auto minmax(0, 1fr); height: 100vh; height: 100dvh; padding-top: env(safe-area-inset-top); }
.side, .main, .appbar { display: contents; }
.brand, .rail, #back, .appbar h1, .thead, .conn, .cmdk, #vtog, .ustrip { grid-row: 1; align-self: center; }
.gban { grid-row: 2; grid-column: 1 / -1; }
.oerr { grid-row: 4; grid-column: 1 / -1; }
.views { grid-row: 5; grid-column: 1 / -1; }
.brand { grid-column: 2; }
.brand { display: flex; align-items: center; gap: var(--sp-2); width: 100%; height: 32px; padding: 0 var(--sp-2); border: 0; border-radius: 6px; background: transparent; color: inherit; font: inherit; font-size: 13px; font-weight: 600; letter-spacing: -.01em; text-align: left; cursor: pointer; }
@media (hover: hover) { .brand:hover { background: var(--card); } }
#brand-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the ddotz.dev brand mark (site/index.html .brand-mark, web/icons/dotz.svg): four dots, big top-left and bottom-right, small top-right and bottom-left.
   Two masks of the same box: the three --fg dots, and the bottom-right one in --accent (site/style.css .brand-mark-accent). Light and dark follow the tokens. */
.logo { position: relative; flex: none; width: 16px; height: 16px; }
.logo::before, .logo::after { content: ""; position: absolute; inset: 0; -webkit-mask: center / 100% 100% no-repeat; mask: center / 100% 100% no-repeat; }
.logo::before { background: var(--fg); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3.5 3.5 17 17'%3E%3Ccircle cx='7.4' cy='7.4' r='3.1'/%3E%3Ccircle cx='16.6' cy='7.4' r='1.9'/%3E%3Ccircle cx='7.4' cy='16.6' r='1.9'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3.5 3.5 17 17'%3E%3Ccircle cx='7.4' cy='7.4' r='3.1'/%3E%3Ccircle cx='16.6' cy='7.4' r='1.9'/%3E%3Ccircle cx='7.4' cy='16.6' r='1.9'/%3E%3C/svg%3E"); }
.logo::after { background: var(--accent); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3.5 3.5 17 17'%3E%3Ccircle cx='16.6' cy='16.6' r='3.1'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3.5 3.5 17 17'%3E%3Ccircle cx='16.6' cy='16.6' r='3.1'/%3E%3C/svg%3E"); }
.brand { width: auto; }
.rail { grid-column: 4; display: flex; gap: var(--sp-05); margin-left: var(--sp-3); }
.ni { position: relative; display: flex; flex: none; align-items: center; gap: var(--sp-1); height: 32px; padding: 0 var(--sp-3); border: 0; border-radius: 6px; background: transparent; color: var(--fg-2); font-size: 13px; line-height: 20px; font-weight: 500; white-space: nowrap; }
@media (hover: hover) { .ni:hover { background: var(--hover); color: var(--fg); } }
.ni:disabled { background: transparent; color: var(--fg-3); opacity: .5; cursor: default; } @media (hover: hover) { .ni:disabled:hover { background: transparent; color: var(--fg-3); opacity: .5; cursor: default; } }
.ni.on { color: var(--fg); font-weight: 700; }
.ni .ic { display: none; }
.ni .nl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the current tab: bold with an accent line under it; the unread count is a plain number after the label, the new-version mark a small dot */
.ni.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -4px; height: 2px; border-radius: 1px; background: var(--accent); }
.ni .nnb { min-width: 0; height: 16px; padding: 0; background: transparent; color: var(--warn); font-size: 12px; line-height: 16px; }
/* a dot on a tab or menu label overlaps the label's bottom-right corner (the bot name's computer dot, docs/ui-spec.md 점 배지) */
.ni .nub { position: absolute; right: 4px; bottom: 6px; width: 6px; min-width: 6px; height: 6px; padding: 0; font-size: 0; line-height: 0; }
.ni .nub[hidden] { display: none; }
/* dark only: the tab dot takes the color of the tab number beside it (owner 2026-11-05); light keeps the .nb grey (03-base.css) */
:root[data-theme="dark"] .ni .nub.att { background: var(--warn); }
.appbar .cmdk { grid-column: 9; display: flex; align-items: center; gap: var(--sp-15); width: auto; height: 28px; margin-left: var(--sp-2); padding: 0 var(--sp-1) 0 var(--sp-2); border: 0; border-radius: var(--r-ctl); background: var(--card); color: var(--fg-3); }
@media (hover: hover) { .cmdk:hover { background: var(--card-hover); } }
.cmdk .tx { display: none; }
#back { grid-column: 5; margin-left: var(--sp-2); }
.appbar h1 { grid-column: 6; min-width: 0; max-width: 320px; margin: 0 0 0 var(--sp-2); font: 700 var(--fs-page)/var(--lh-page) var(--font); letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* wide: the active tab names the page, so the big title shows only on a page with a back arrow (a project, a settings sub-page) */
.appbar:not(.back) h1 { display: none; }
.thead { grid-column: 7; }
.conn { grid-column: 8; margin-left: var(--sp-2); }
#vtog { grid-column: 10; margin-left: var(--sp-1); }
.ustrip { grid-column: 11; margin-left: var(--sp-1); }
/* 연결 끊김 is a status (web/DESIGN.md 상태): the red dot and the word, no capsule; it stays the button that reconnects */
.conn { display: inline-flex; align-items: center; gap: var(--sp-15); flex: none; height: 20px; padding: 0; background: none; color: var(--err); font-size: 12px; line-height: 20px; font-weight: 600; white-space: nowrap; }
.conn::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
button.conn { border: 0; font-family: inherit; cursor: pointer; }
button.conn:disabled { cursor: default; }
.ustrip { flex: none; display: inline-flex; align-items: center; gap: var(--sp-2); height: 28px; padding: 0 var(--sp-2); border: 0; border-radius: 6px; background: transparent; color: var(--fg-2); font-size: 12px; line-height: 16px; white-space: nowrap; }
@media (hover: hover) { .ustrip:hover { background: var(--hover); color: var(--fg); } }
.ustrip .ubar { width: 48px; height: 4px; border-radius: 2px; background: var(--track); overflow: hidden; }
.ustrip .ubar i { display: block; height: 100%; border-radius: 2px; background: var(--fg-2); }
.ustrip.warn { color: var(--warn); } .ustrip.warn .ubar i { background: var(--warn); }
.ustrip.warn .uring { background: conic-gradient(var(--warn) calc(var(--p) * 1%), var(--track) 0); }
.ustrip .uring, .ustrip .upct { display: none; }
.ustrip .uring { width: 18px; height: 18px; border-radius: 50%; background: conic-gradient(var(--fg-2) calc(var(--p) * 1%), var(--track) 0); -webkit-mask: radial-gradient(circle, transparent 5px, #000 6px); mask: radial-gradient(circle, transparent 5px, #000 6px); }
.ustrip.warn .uring { background: conic-gradient(var(--warn) calc(var(--p) * 1%), var(--track) 0); }
.views { min-height: 0; overflow-y: auto; overflow-x: hidden; }
.view { max-width: var(--view-w); margin: 0 auto; padding: var(--sp-6); }
.view.fill { height: 100%; display: flex; flex-direction: column; padding-bottom: 0; }
/* wide: the two-column frame of 채팅 and 프로젝트 starts at the left like the top bar (--edge = where the logo starts): list column --frame-list-w, gap --frame-gap, the content column takes the rest up to --edge from the window's right (#v-chat and .views.pp in 10-conversations.css; the open project's drill-in page in 20-projects.css sits in the same box, --frame-x). 모니터링 and every other page stay centered */
@media (min-width: 1100px) { #v-chat, #v-activity, #v-monitoring { margin: 0; padding-left: var(--edge); padding-right: var(--edge); } :root { --frame-top: calc(var(--bar-h) + var(--sp-2)); --frame-x: calc(var(--side-w) + var(--edge) + var(--frame-list-w) + var(--frame-gap)); } }
/* wide: the top row holds only logo, computer, tabs and the right-side controls. A page with a back arrow (a settings sub-page, 모니터링) gets the arrow and its title as a page header in row 3, just above the page: both sit in the full-width cell and are offset to the left edge of the centered 920px column (.view max-width) */
@media (min-width: 1100px) {
  .appbar #back, .appbar h1 { grid-row: 3; grid-column: 1 / -1; align-self: start; justify-self: start; }
  .appbar #back { margin: var(--sp-4) 0 0 calc(max(0px, (100% - var(--view-w)) / 2) + var(--back-x)); }
  .appbar h1 { max-width: min(560px, 100%); margin: var(--sp-4) 0 0 calc(max(0px, (100% - var(--view-w)) / 2) + var(--back-x) + var(--back-w)); font: 700 var(--fs-page-sm)/var(--lh-page-sm) var(--font); }
}
@media (max-width: 1099px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; padding-top: 0; }
  .main { order: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
  .appbar { display: flex; flex: none; align-items: center; gap: var(--sp-1); height: calc(60px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) var(--sp-3) 0 var(--sp-6); background: var(--bg); }
  .appbar.back { padding-left: var(--sp-3); }
  .appbar h1, .appbar:not(.back) h1 { display: block; flex: 1; max-width: none; margin: 0; }
  #back, .conn { margin: 0; }
  #vtog, .ustrip { margin: 0; }
  .gban, .oerr, .views { grid-row: auto; grid-column: auto; }
  .views { flex: 1; }
  /* compact tab bar: a 46px row; the home-indicator inset is trimmed (labels end ~18px above the screen edge, clear of the indicator) */
  .side { order: 2; display: flex; min-width: 0; min-height: 0; padding: 0 0 max(var(--sp-05), calc(env(safe-area-inset-bottom) - var(--sp-4))); border-top: 1px solid var(--line); background: var(--card); }
  .brand { display: none; }
  .rail { flex: 1; min-width: 0; gap: 0; margin: 0; }
  .ni { flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: var(--sp-05); height: 46px; padding: 0 var(--sp-05); border-radius: 0; font-size: 10px; line-height: 13px; text-align: center; }
  @media (hover: hover) { .ni:hover { background: transparent; } }
  .ni.on { font-weight: 600; }
  .ni .ic { display: block; width: 20px; height: 20px; }
  .ni.on::after { content: none; }
  .ni .nnb { position: absolute; top: 3px; left: calc(50% + 4px); min-width: 16px; height: 16px; padding: 0 var(--sp-15); background: var(--warn); color: var(--bg); font-size: var(--fs-tag); }
  .ni .nub { position: absolute; top: 5px; left: calc(50% + 6px); width: 8px; min-width: 8px; height: 8px; }
  .ni.on::before { content: ""; position: absolute; top: -1px; left: 25%; right: 25%; height: 2px; border-radius: 0 0 2px 2px; background: var(--accent); }
  /* search: the one #cmdk button is an icon in the app bar here (its label and key hint are for the top row) */
  .appbar .cmdk { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; margin: 0; padding: 0; background: transparent; color: var(--fg-2); }
  @media (hover: hover) { .appbar .cmdk:hover { background: var(--hover); color: var(--fg); } }
  .cmdk kbd { display: none; }
}
@media (max-width: 1099px) and (pointer: coarse) { .appbar .cmdk { width: 36px; height: 36px; } }
@media (max-width: 639px) {
  /* typing: the keyboard covers the bar's place, so the bar steps aside instead of floating above the keyboard. It goes when the keyboard
     arrives (data-kb, web/js/34-composer-viewport.js), not at the focus, so a docked card's reason field moves once, with the keyboard. */
  :root[data-kb] .app:has(.composer textarea:focus) .side { display: none; }
  .appbar { height: calc(52px + env(safe-area-inset-top)); padding-left: var(--sp-4); }
  .appbar h1 { font-size: 20px; line-height: 28px; }
  .main .composer { padding-bottom: var(--sp-2); }
  .ustrip { gap: var(--sp-1); padding: 0 var(--sp-1); font-size: 11px; }
  .ustrip .ulab, .ustrip .ubar { display: none; }
  .ustrip .uring, .ustrip .upct { display: inline-block; }
  .view { padding: var(--sp-4) var(--sp-3) var(--sp-6); }
  .view.fill { padding-bottom: 0; }
}
@media (max-width: 1099px) and (pointer: coarse) { :root[data-kb] .app:has(.composer textarea:focus) .side { display: none; } }
/* buttons: one system for every page and card. Kind: primary (accent fill, the default), secondary (.tonal), quiet (.text), danger;
   size: md (default, 40px) and .sm (36px). A touch screen gets a 44px target. Card buttons keep their own class names (.dc-act,
   .dc-go, .dc-back) and are aliased here, so the look is defined once. */
/* size tiers (docs/ui-spec.md 버튼, tokens in the :root above): 기본 --btn-h 36, 작은 --btn-h-sm 32 (.sm), 행 안 --btn-h-row 28 (.inrow).
   --btn-hit is the touch target, not a tier: a phone raises the box to it, a row button reaches 40px with padding (::after). */
.bk-l { display: none; }
#back.mon-up .bk-l { display: inline; }
.ib { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--fg-2); padding: 0; }
@media (hover: hover) { .ib:hover { background: var(--hover); color: var(--fg); } }
.ib.pri { background: var(--accent); color: var(--on-accent); border-radius: 50%; }
@media (hover: hover) { .ib.pri:hover { background: var(--accent); opacity: .88; } }
/* An empty text box with nothing attached has nothing to send: the arrow takes the switched-off look (the stop square of a running turn stays). */
.sendrow:not(.has-att):has(textarea:placeholder-shown) > .ib.pri:not(.stop) { opacity: .4; pointer-events: none; }
.menu .mi.more { color: var(--fg-2); }
.menu .mi.off { color: var(--fg-3); cursor: default; }
.menu .mi.off:active { background: transparent; } @media (hover: hover) { .menu .mi.off:hover { background: transparent; } }
.menu .mi.more svg { margin-left: auto; width: 14px; height: 14px; }
.btn, .dc-act, .dc-go, .dc-back { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-15); height: var(--btn-h); padding: 0 var(--sp-4); border: 1px solid transparent; border-radius: var(--r-ctl); color: var(--fg-2); background: transparent; font: 600 14px/20px var(--font); text-decoration: none; white-space: nowrap; max-width: 100%; cursor: pointer; }
.btn, .dc-go, .dc-act.main { background: var(--accent); color: var(--on-accent); }
.btn.tonal, .btn.outlined, .dc-back, .dc-act.alt { background: var(--layer); color: var(--fg); }
.btn.text, .dc-act { background: transparent; color: var(--fg-2); padding: 0 var(--sp-3); }
.btn.sm { height: var(--btn-h-sm); padding: 0 var(--sp-3); font-size: 13px; }
.btn, .dc-act, .dc-go, .dc-back { transition: opacity var(--m-fast) var(--m-ease); }
.btn:active:not(:disabled), .dc-go:active:not(:disabled), .dc-back:active:not(:disabled) { opacity: .7; }
@media (hover: hover) { .btn:hover, .dc-go:hover, .dc-back:hover, .dc-act:hover { opacity: .85; } }
@media (hover: hover) { .btn.tonal:hover, .btn.outlined:hover, .dc-back:hover, .dc-act.alt:hover { background: var(--hover); opacity: 1; } }
@media (hover: hover) { .btn.text:hover, .dc-act:not(.main):not(.alt):hover { background: var(--hover); color: var(--fg); opacity: 1; } }
.btn.danger { background: transparent; color: var(--err); padding: 0 var(--sp-3); }
@media (hover: hover) { .btn.danger:hover { background: color-mix(in srgb, var(--err) 12%, transparent); opacity: 1; } }
.btn.danger.fill { background: var(--err); color: var(--on-err); padding: 0 var(--sp-3); }
.btns { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
/* 행 안 tier (docs/ui-spec.md 버튼, 설정 행): the button or field in the right slot of a row. 32px high, 13px; on a touch screen the box stays 32px and ::after widens the hit area to 44px. */
.btn.inrow { position: relative; height: var(--btn-h-row); padding: 0 var(--sp-3); font-size: 13px; }
.btn.inrow.text, .btn.inrow.danger { padding: 0 var(--sp-2); }
@media (pointer: coarse), (max-width: 639px) { .ib { width: 36px; height: 36px; } .btn, .dc-act, .dc-go, .dc-back { height: auto; min-height: var(--btn-hit); } .ni { min-height: 44px; } }
@media (pointer: coarse), (max-width: 639px) { .btn.inrow { height: var(--btn-h-row); min-height: 0; } .btn.inrow::after { content: ""; position: absolute; inset: calc(var(--sp-2) * -1) calc(var(--sp-05) * -1); } }
/* settings row (docs/ui-spec.md 설정 행): the existing .li (lead icon, .tx = .hd title + .sup one-line description) plus ONE right slot, .li-end,
   vertically centred by .li's align-items. The slot holds one control: a 행 안 button, a .hs-sw switch, a .sel / .fi at a fixed width, or a value.
   A row-level add action is not a row: it is a text or tonal .sm button in the section header (.sec.sec-act, 06-harness.css). */
.li > .li-end { flex: none; display: flex; align-items: center; gap: var(--sp-2); margin-left: auto; }
.li-end .fi, .li-end .sel { width: 160px; height: var(--ctl-h); }
@media (pointer: coarse) { .li-end .fi, .li-end .sel { height: var(--field-h-touch); } }

/* cards, lists, tags, bars: the base every screen draws on (tokens in 01-tokens.css) */
.col { display: flex; flex-direction: column; gap: var(--sp-3); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--sp-3); }
.card { position: relative; min-width: 0; border: 0; border-radius: var(--r-card); background: var(--card); padding: var(--sp-5); }
.card.tap { cursor: pointer; }
@media (hover: hover) { .card.tap:hover { background: var(--card-hover); } }
.card.tap:focus-visible { outline-offset: 0; }
.card.foot { display: flex; flex-direction: column; }
.cf { display: flex; align-items: center; gap: var(--sp-2); margin-top: auto; padding-top: var(--sp-3); }
.cf .btn { flex: 0 1 auto; min-width: 0; height: var(--btn-h-sm); padding: 0 var(--sp-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
/* a path shown inside a row's text (25-settings-accounts.js): one short line, the full path in the row's title */
code.path-short { display: inline-block; max-width: 100%; vertical-align: bottom; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch { display: flex; align-items: center; gap: var(--sp-2); min-height: 20px; margin-bottom: var(--sp-3); }
.ch h3 { flex: 1; min-width: 0; margin: 0; font: 600 var(--fs-card)/var(--lh-card) var(--font); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* a quiet card head: on a screen of several cards only the lead card keeps the card-title step, the rest take the section-label step (docs/ui-principles.md 1) */
.ch.lo h3 { font: 600 var(--fs-sec)/var(--lh-sec) var(--font); color: var(--fg-2); }
.ch .chev { width: 14px; height: 14px; color: var(--fg-3); }
@media (hover: hover) { .card.tap:hover .chev { color: var(--fg); } }
.big { font: 700 var(--fs-big)/var(--lh-big) var(--font); letter-spacing: -.01em; }
.sup { color: var(--fg-2); font-size: var(--fs-meta); line-height: var(--lh-meta); }
.err-t { color: var(--err); }
.muted { color: var(--fg-2); }
.empty { padding: var(--sp-8) var(--sp-4); text-align: center; color: var(--fg-3); font-size: 12px; }
.empty > .btn { margin-top: var(--sp-3); }
/* emptyNode (05-command-palette.js) builds every one: a hint under the sentence, and the tighter line of one section among others */
.empty > .sup { margin-top: var(--sp-2); }
.empty.compact { padding: var(--sp-4); }
.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--fg-3); }
.dot.ok { background: var(--ok); } .dot.warn, .dot.att { background: var(--warn); } .dot.err { background: var(--err); }
.dot.pri { background: var(--accent); }
/* a status is a tone dot and a word, never a capsule (web/DESIGN.md 상태·필터·화면 탭); a tag with no tone is a meta word.
   Blue words stay --fg-2 (--accent text is under 4.5:1 on white); the dot carries the blue. */
.tag { --tone: var(--fg-3); display: inline-flex; align-items: center; gap: var(--sp-15); flex: none; height: var(--tag-h); padding: 0; background: none; color: var(--fg-3); font-size: var(--fs-tag); line-height: var(--lh-tag); font-weight: 500; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.tag.ok { --tone: var(--ok); color: var(--ok); font-weight: 600; }
.tag.warn { --tone: var(--warn); color: var(--warn-ink); font-weight: 600; }
.tag.err { --tone: var(--err); color: var(--err); font-weight: 600; }
.tag.pri { --tone: var(--accent); color: var(--fg-2); font-weight: 600; }
.tag.off { font-weight: 600; }
.tag.unreplied { --tone: var(--unreplied); color: var(--unreplied); font-weight: 600; }
.nb.unreplied { background: color-mix(in srgb, var(--unreplied) 14%, transparent); color: var(--unreplied); font-weight: 600; }
:is(.tag, .mon-ptag, .tr-st):is(.ok, .warn, .err, .pri, .off, .unreplied, .sent, .failed, .sending, .queued, .undo)::before, .dr-hit::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--tone); }
.dot.unreplied { background: var(--unreplied); }
button.cchip.unrep-no { height: 22px; padding: 0 var(--sp-2); font-size: 11.5px; color: var(--unreplied); }
/* 초안 작성 beside 답장 안 함: the one action that moves the mail forward, so it carries the accent (30-monitoring.js mailDraftButton).
   A tonal pill with the pencil (owner 2026-10-29: bare accent text looked unfinished); --layer on the card, --hover under the pointer. */
button.cchip.mr-draft { height: 24px; gap: var(--sp-1); padding: 0 var(--sp-3) 0 var(--sp-2); background: var(--layer); font-size: 12px; font-weight: 600; color: var(--accent); }
@media (hover: hover) { button.cchip.mr-draft:hover { background: var(--hover); } }
button.cchip.mr-draft .ic { width: 14px; height: 14px; stroke-width: 2; }
/* a mail's row buttons on a phone: a finger-sized target (the row itself opens the mail, so a near miss must not) */
@media (pointer: coarse), (max-width: 639px) { button.cchip.mr-act { height: 32px; padding: 0 var(--sp-3); font-size: 13px; } button.cchip.mr-draft { padding: 0 var(--sp-3); } button.cchip.mr-draft .ic { width: 16px; height: 16px; } }
.row { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.row + .row { margin-top: var(--sp-2); }
.row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.tap { cursor: pointer; }
@media (hover: hover) { .row.tap:hover .nm { color: var(--accent); } }
.kv { display: flex; justify-content: space-between; gap: var(--sp-3); align-items: baseline; }
.kv .k { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv + .kv { margin-top: var(--sp-2); }
.kv .v { flex: 0 1 auto; min-width: 0; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-2); font-size: 12px; }
.bar { height: 4px; border-radius: 2px; background: var(--track); overflow: hidden; margin-top: var(--sp-2); }
.bar i { display: block; height: 100%; border-radius: 2px; background: var(--bar, var(--accent)); transition: width var(--m-slow) var(--m-ease); }
.bar.warn { --bar: var(--warn); } .bar.err { --bar: var(--err); }
.bar i.gfill { transition: none; }   /* a gauge's script moves the fill each frame (01-motion-gauge.js) */
.gn { font-variant-numeric: tabular-nums; }
.gn.gn-live { display: inline-block; min-width: calc(var(--gd, 2) * 1ch); text-align: right; }   /* while counting, the box has the final number's width: nothing beside it moves */
.lim + .lim { margin-top: var(--sp-3); }
.more { margin-top: var(--sp-3); color: var(--fg-3); font-size: 12px; }
.sec { margin: var(--sp-6) var(--sp-1) var(--sp-2); color: var(--fg-2); font: 600 var(--fs-sec)/var(--lh-sec) var(--font); }
.sec:first-child { margin-top: 0; }
.list { border: 0; border-radius: var(--r-card); background: var(--card); overflow: hidden; }
.list > * + * { border-top: 1px solid var(--line); }
.li { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; min-height: var(--row-h); padding: var(--row-py) var(--row-px); color: inherit; text-align: left; width: 100%; border: 0; background: transparent; }
@media (hover: hover) { button.li:hover, .li.tap:hover { background: var(--card-hover); } }
.li .lead { flex: none; display: inline-flex; color: var(--fg-3); }
.li .tx { flex: 1; min-width: 0; }
.li .hd { font-size: var(--fs-row); line-height: var(--lh-row); font-weight: 500; }
.avatar { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--layer); border: 1px solid var(--line); color: var(--fg-2); font: 600 11px/16px var(--font); text-transform: uppercase; }
.heads { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.li.prow .heads { flex-wrap: wrap; row-gap: var(--sp-05); }
.li.prow .heads .hd { white-space: nowrap; }
.heads .t { min-width: 0; font: 600 13px/20px var(--font); }
.sp { flex: 1; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp.c4 { -webkit-line-clamp: 4; white-space: pre-line; }
.pickbox { display: flex; flex-direction: column; gap: var(--sp-4); }
.kb:empty { display: none; }
.li.on, button.li:active, .li.tap:active { background: var(--row-sel); }
.li.off { background: transparent; cursor: default; } @media (hover: hover) { .li.off:hover { background: transparent; cursor: default; } }
.li.off .hd, .li.off .lead { color: var(--fg-3); }
/* 계정 card rows (web/js/25-settings-accounts.js): grip, order number, the tap area; a dragged row lifts and the rows it passes shift */
.li.acc { gap: var(--sp-1); padding-left: var(--sp-15); padding-right: var(--sp-2); }
.acc-main { flex: 1; display: flex; align-items: center; gap: var(--sp-3); min-width: 0; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
.acc-no { justify-content: center; min-width: 20px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.acc-grip { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 40px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--fg-3); cursor: grab; touch-action: none; }
.acc-grip::before { content: ""; width: 10px; height: 16px; background: radial-gradient(circle, currentColor 1.4px, transparent 1.7px) 0 0 / 5px 5.34px; }
@media (hover: hover) { .acc-grip:hover { background: var(--card-hover); color: var(--fg-2); } }
.acc-mv { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--fg-2); font-size: 16px; }
@media (hover: hover) { .acc-mv:hover:not(:disabled) { background: var(--card-hover); color: var(--fg); } }
.acc-dragging .li.acc { transition: transform var(--m-fast) var(--m-ease); }
.acc-dragging .li.acc.drag { position: relative; z-index: 2; transition: none; background: var(--card); box-shadow: 0 6px 20px rgb(0 0 0 / .18); cursor: grabbing; }
.rt-rows { max-height: min(48dvh, 400px); overflow-y: auto; }
.rt-row { padding: var(--sp-2) var(--sp-3); min-width: 0; }
.rt-row .top { display: flex; align-items: center; gap: var(--sp-15); min-width: 0; }
.rt-row .nm { min-width: 0; color: var(--fg); font-size: 13px; line-height: 20px; font-weight: 500; }
.rt-row .sup { margin-top: var(--sp-05); }
.tools-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-bottom: var(--sp-3); flex-wrap: wrap; }
.tools-bar .sec { margin: 0; }
.sub { margin-top: var(--sp-1); }
.mt8 { margin-top: var(--sp-2); } .mt12 { margin-top: var(--sp-3); }

/* tabs */
.chips { display: flex; gap: var(--sp-1); overflow-x: auto; scrollbar-width: none; padding: 0 0 var(--sp-3); min-width: 0; flex: none; }
.chips::-webkit-scrollbar { display: none; }
/* chips are small boxes; a filter row is a segmented track (16-result-card.css), a screen tab an underline (20-mailboxes.css) */
.chip { display: inline-flex; align-items: center; gap: var(--sp-15); flex: none; height: var(--chip-h); padding: 0 var(--sp-3); border: 0; border-radius: var(--r-ctl); background: var(--card); color: var(--fg-2); font-size: 13px; font-weight: 500; max-width: 100%; }
@media (hover: hover) { .chip:hover { background: var(--hover); color: var(--fg); } }
.chip.on { background: var(--fg); color: var(--bg); }
/* 두 값 설정 (rowToggle): the current value in one segment-shaped cell on the row's card; the small mark says a tap swaps it */
.chip.tgl { border-radius: var(--r-seg); background: var(--layer); color: var(--fg); font-weight: 500; }
.chip.tgl::after { content: "⇄"; color: var(--fg-3); font-size: 11px; }
.chip.tgl.unset { color: var(--fg-2); }
.chip.tgl:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip .tx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 모델 · 폴백: one card per target (model + effort, then the numbered fallback list). Neutral surfaces; the accent marks
   only the model answering now. */
.mt { max-width: 760px; }
.mt-top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.mt-intro { flex: 1 1 0; margin: 0 var(--sp-1); color: var(--fg-2); font-size: 13px; line-height: 20px; }
.mt-filter { flex: 0 0 148px; }
.mt-card { display: flex; flex-direction: column; gap: var(--sp-4); scroll-margin-top: 12px; }
.mt-use-list { display: flex; flex-direction: column; }
.mt-use-row { display: flex; flex-wrap: wrap; align-items: center; min-height: var(--btn-hit); gap: var(--sp-05) var(--sp-2); padding: var(--sp-15) 0; border-top: 1px solid var(--line); }
.mt-use-row:first-child { border-top: 0; }
.mt-use-tx { flex: 1 1 100%; display: flex; flex-direction: column; min-width: 0; }
.mt-use-rest { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: var(--sp-05) var(--sp-2); }
.mt-use-m { flex: 0 1 auto; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.mt-use-row .tag { flex: 0 1 auto; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-use-row[role="button"] { cursor: pointer; }
.mt-use-row:focus-visible { outline-offset: -2px; }   /* the card clips a ring drawn outside the row */
@media (hover: hover) { .mt-use-row[role="button"]:hover { background: var(--hover); } }
.mt-use-end { flex: none; display: inline-grid; place-items: center; min-width: 16px; color: var(--fg-3); }
.mt-use-end .ic { width: 16px; height: 16px; transition: transform var(--m-fast) var(--m-ease); }
.mt-use-row[aria-expanded="true"] .mt-use-end .ic { transform: rotate(180deg); }
.mt-use-fb { flex: none; }
.mt-use-tx .nm .dot { display: inline-block; margin-right: var(--sp-2); vertical-align: middle; }
/* From 900px every row is one line: the label column takes the room, the model and tag shorten, the icon sits at the far right. */
@media (min-width: 900px) {
  .mt-use-row { flex-wrap: nowrap; gap: 0 var(--sp-3); }
  .mt-use-tx { flex: 1 1 140px; }
  .mt-use-rest { flex: 0 1 auto; }
  .mt-use-m { max-width: 300px; }
  .mt-use-row .tag { max-width: 260px; }
  .mt-use-end { margin-left: auto; }
}
.mt-head { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.mt-head .t { min-width: 0; font: 700 17px/24px var(--font); overflow-wrap: anywhere; }
.mt-head .sup { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-head .sp { flex: 1; }
.mt-pick { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.mt-model { flex: 2 1 240px; max-width: 360px; }
.mt-eff { flex: 1 1 140px; max-width: 200px; }
.mt-apply { justify-content: flex-end; margin-top: calc(var(--sp-1) * -1); }
.mt-fb { display: flex; flex-direction: column; }
.mt-fb-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-3); }
@media (max-width: 640px) { .mt-model, .mt-eff { max-width: none; } }
.fb-list { display: flex; flex-direction: column; gap: var(--sp-15); margin: 0; padding: 0; list-style: none; }
.fb-item { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-3); border-radius: 12px; background: var(--layer); color: var(--fg); user-select: none; }
.fb-item[data-i] { cursor: pointer; }
@media (hover: hover) { .fb-item[data-i]:hover { background: var(--hover); } }
.fb-item.open { background: var(--layer); }
.fbe { display: flex; flex-direction: column; gap: var(--sp-3); margin: calc(var(--sp-05) * -1) 0 var(--sp-1); padding: var(--sp-4); border-radius: 12px; background: var(--layer); }
.fbe-grid, .fbe-cap { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.fbe-cap > .tf:first-child { grid-column: 1 / -1; }
.fbe-key { display: flex; align-items: center; gap: var(--sp-2); margin-top: calc(var(--sp-15) * -1); }
.fbe-key .sup.warn { color: var(--warn); }
.fbe-act { display: flex; align-items: center; gap: var(--sp-15); }
.fbe-act .sp { flex: 1; }
.fbe-act .up .ic { transform: rotate(180deg); }
@media (max-width: 560px) { .fbe-grid, .fbe-cap { grid-template-columns: 1fr; } }
.fb-item.off :is(.nm, .fb-n, .fb-sum) { opacity: .5; }
.fb-item.in-use { background: color-mix(in srgb, var(--accent) 10%, var(--card)); }
.fb-item.drag { position: relative; z-index: 5; cursor: grabbing; box-shadow: var(--float); opacity: .94; }
.fb-item.over { outline: 2px dashed var(--fg-3); outline-offset: 2px; }
.fb-n { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 11px; background: var(--card); color: var(--fg-2); font: 600 var(--fs-meta)/var(--lh-meta) var(--font); }
.fb-item.in-use .fb-n { background: var(--accent); color: var(--on-accent); }
.fb-body { flex: 1 1 0; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--sp-2); padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: inherit; }
.fb-body .nm { min-width: 0; font: 600 14px/20px var(--font); overflow-wrap: anywhere; }
.fb-sum { min-width: 0; color: var(--fg-2); font-size: var(--fs-meta); line-height: var(--lh-meta); }
.fb-sw { flex: none; height: 28px; padding: 0 var(--sp-1); border: 0; border-radius: var(--r-ctl); background: none; color: var(--fg-3); font-size: 12px; cursor: pointer; }
.fb-sw[aria-checked="true"] { color: var(--accent); }
@media (hover: hover) { .fb-sw:hover { background: var(--hover); } }
.fb-grip { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: var(--r-ctl); background: none; color: var(--fg-3); cursor: grab; touch-action: none; }
.fb-grip:focus-visible { background: var(--hover); color: var(--fg); } @media (hover: hover) { .fb-grip:hover { background: var(--hover); color: var(--fg); } }
.fb-grip .ic { width: 16px; height: 16px; }
.fb-usage { flex: 1 0 100%; color: var(--fg-2); }
.fb-usage.warn { color: var(--warn); }
.fb-bar { height: 4px; border-radius: 2px; background: color-mix(in srgb, currentColor 18%, transparent); overflow: hidden; }
.fb-bar i { display: block; height: 100%; border-radius: 2px; background: currentColor; }
.fb-bar-l { font-size: 11px; line-height: 15px; }
.fb-add { align-self: flex-start; display: inline-flex; align-items: center; gap: var(--sp-15); height: var(--btn-h-sm); padding: 0 var(--sp-3) 0 var(--sp-2); border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--fg-2); font-size: 13px; line-height: 20px; font-weight: 500; }
@media (hover: hover) { .fb-add:hover:not(:disabled) { background: var(--hover); color: var(--fg); } }
.fb-add:disabled { opacity: .5; }

/* fields */
.tf { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.tf > label, .tf > .lb { font: 500 14px/20px var(--font); color: var(--fg-2); }
.fi, .sel { display: flex; align-items: center; gap: var(--sp-2); width: 100%; height: var(--field-h); padding: 0 var(--sp-3); border: 0; border-radius: var(--r-ctl); background: var(--ff-fill); outline: 0; font-size: 13px; text-align: left; }
.fi { min-width: 0; }
.fi::placeholder { color: var(--fg-3); }
.fi:focus, .sel:focus-visible, .sel[aria-expanded="true"] { box-shadow: var(--ff-ring); }
.fi[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px var(--err); }
.fi:disabled { color: var(--fg-3); cursor: default; }
.sel .val { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel svg.ic { flex: none; color: var(--fg-3); width: 14px; height: 14px; }
@media (hover: hover) { .sel:hover { background: color-mix(in srgb, var(--fg) 6%, var(--ff-fill)); } }
@media (pointer: coarse) { .fi, .sel { height: var(--field-h-touch); font-size: 16px; } }
/* iOS zooms the page when a field under 16px takes focus: on a touch screen every input, textarea, select and editable box stays at 16px, whatever its own rule says (line-height and height are left to those rules) */
@media (pointer: coarse) { input:not([type=checkbox], [type=radio], [type=range], [type=file], [type=button], [type=submit], [type=reset], [type=color], [type=image], [type=hidden]), textarea, select, [contenteditable]:not([contenteditable=false]) { font-size: 16px !important; } }
.lbl { margin: var(--sp-4) 0 var(--sp-15); font: 500 12px/16px var(--font); color: var(--fg-2); }

/* menu: the single dropdown component */
.menu { position: fixed; z-index: 1400; display: flex; flex-direction: column; padding: var(--sp-15); overflow-y: auto; border: 0; border-radius: var(--r-menu); background: var(--pop); box-shadow: var(--shadow-menu); outline: 0; }
.menu .mh, .ph { z-index: 2; padding: var(--sp-2) var(--sp-2) var(--sp-1); color: var(--fg-3); font: 500 11px/16px var(--font); }
.menu .mh { position: sticky; top: calc(-1 * var(--sp-15)); background: var(--pop); }
.menu .msep { margin: var(--sp-1) var(--sp-2); border-top: 1px solid var(--line); }
:root[data-theme="dark"] .menu { --hover: var(--active); }
.menu.msheet { border-radius: var(--r-sheet); padding: var(--sp-2); box-shadow: var(--shadow-sheet); }
.menu.msheet .mh { top: calc(-1 * var(--sp-2)); }
.menu.msheet .mi { min-height: var(--menu-h-sheet); }
.mi { display: flex; align-items: center; gap: var(--sp-2); width: 100%; min-height: var(--menu-h); padding: var(--menu-py) var(--menu-px); border: 0; border-radius: var(--r-ctl); background: transparent; text-align: left; font-size: 13px; line-height: 20px; }
.mi:focus-visible { background: var(--hover); outline: 0; } @media (hover: hover) { .mi:hover { background: var(--hover); outline: 0; } }
.mi.danger, .mi.danger .ml { color: var(--err); }
.mi.ind { padding-left: calc(var(--menu-px) + var(--sp-5)); }
.mi .ck { flex: none; width: 14px; height: 14px; color: var(--accent); }
.mi .ml { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; column-gap: var(--sp-2); overflow-wrap: anywhere; }   /* space-between: the secondary text ends the label's line, and starts at the left when it drops under the label */
.mi .ml small { flex: 0 1 auto; min-width: 0; color: var(--fg-3); font-size: 11px; line-height: 16px; }
:root[data-theme="dark"] .mi .ml small { color: var(--fg-2); }
.mi.sel-on { font-weight: 500; }
@media (pointer: coarse) { .mi { min-height: var(--menu-h-sheet); font-size: 14px; } }

/* segmented control: the track takes the small radius, the chosen cell one step smaller (outer = inner + 2) */
.seg { display: flex; flex-wrap: wrap; gap: var(--sp-05); padding: var(--sp-05); border-radius: var(--r-seg); background: var(--layer); }
.seg button { flex: 1 1 52px; min-width: 0; height: 26px; padding: 0 var(--sp-15); border: 0; border-radius: var(--r-seg-in); background: transparent; color: var(--fg-2); font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: hover) { .seg button:hover { color: var(--fg); } }
.seg button.on { background: var(--card); color: var(--fg); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
@media (pointer: coarse) { .seg button { height: 34px; } }

/* dialog, palette, toast */
dialog.dlg, dialog.pal { margin: auto; border: 0; border-radius: var(--r-sheet); background: var(--pop); color: var(--fg); box-shadow: var(--shadow-dialog); overflow: auto; }
dialog.dlg { width: min(420px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; overflow: hidden; }
.steps { display: grid; gap: var(--sp-2); margin: 0; padding-left: var(--sp-5); font-size: 14px; line-height: 21px; }
dialog.dlg::backdrop, dialog.pal::backdrop { background: var(--scrim); }
dialog.dlg.wide { width: min(640px, calc(100vw - 24px)); }
/* settings dialogs (dialog({ classic: true })): the small box with its own header and footer, as before the full-screen overlay (14-overlay.css) */
dialog.dlg.cl { padding: var(--sp-5); overflow: auto; }
/* a short confirm (dialog({ confirm: true }), ask()): a small centered box, a low sheet from the bottom on a phone */
dialog.dlg.cf { width: min(360px, calc(100vw - 24px)); padding: var(--sp-5); overflow: auto; }
dialog.dlg.cf[open] { display: flex; flex-direction: column; align-items: stretch; text-align: left; }
dialog.dlg.cf .dbody { margin-top: var(--sp-2); }
@media (max-width: 639px) {
  dialog.dlg.cf[open] { width: 100%; max-width: none; margin: auto 0 0; border-radius: var(--r-sheet) var(--r-sheet) 0 0; padding-bottom: max(var(--sp-5), env(safe-area-inset-bottom)); }
  dialog.dlg.cf .dact .btn { flex: 1; min-height: 44px; }
}
.dhd { display: flex; align-items: flex-start; gap: var(--sp-2); margin: 0 0 var(--sp-4); }
.dhd .dx { margin: calc(var(--sp-05) * -1) calc(var(--sp-15) * -1) 0 auto; }
dialog.dlg.cl .dtitle { flex: 1; min-width: 0; }
.dact { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sp-2); margin-top: var(--sp-5); }
.dact:empty { display: none; }
.dtitle { margin: 0; font: 700 var(--fs-page-sm)/var(--lh-page-sm) var(--font); letter-spacing: -.01em; overflow-wrap: anywhere; }
.dbody { display: flex; flex-direction: column; gap: var(--sp-3); color: var(--fg-2); }
.dbody p { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
dialog.pal { width: min(560px, calc(100vw - 24px)); margin: 12vh auto auto; padding: 0; max-height: min(480px, calc(100dvh - 24px)); }
.pal-head { display: flex; align-items: center; gap: var(--sp-2); height: 52px; padding: 0 var(--sp-4); color: var(--fg-3); }
.pal-head kbd { border: 0; }
.pal-in { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--fg); font-size: 14px; }
@media (pointer: coarse) { .pal-in { font-size: 16px; } }
.pal-list { padding: 0 var(--sp-2) var(--sp-2); overflow-y: auto; max-height: 360px; }
.pal-i { display: flex; align-items: center; gap: var(--sp-3); width: 100%; min-height: var(--row-h); padding: var(--sp-2) var(--sp-3); border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--fg); text-align: left; font: 500 var(--fs-row)/var(--lh-row) var(--font); }
.pal-i.on, .pal-i:focus-visible { background: var(--hover); outline: 0; }
.pal-i .ic { color: var(--fg-3); }
.pal-i .nm { flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-i .pd { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-3); font: 400 12px/16px var(--font); }
.pal-i.cmd .nm { font: 500 13px/20px var(--mono); }
.pal-out { padding: var(--sp-1) var(--sp-4) var(--sp-4); max-height: 360px; overflow: auto; }
.pal-res { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.pal-rh { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.pal-rt { flex: 1; min-width: 0; font: 600 15px/22px var(--font); overflow-wrap: anywhere; }
.pal-res .list { background: var(--layer); box-shadow: none; }
.pal-f { align-items: baseline; justify-content: space-between; min-height: 40px; padding: var(--sp-2) var(--sp-3); }
.pal-f .tx { flex: 0 1 auto; }
.pal-f .hd { font-size: 13px; line-height: 20px; color: var(--fg-2); }
.pal-v { flex: 0 1 auto; min-width: 0; max-width: 62%; text-align: right; color: var(--fg); font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.pal-vl + .pal-vl { margin-top: var(--sp-05); }
.pal-f.multi { display: block; }
.pal-f.multi .pal-v { max-width: none; margin-top: var(--sp-1); text-align: left; font-size: 13px; color: var(--fg-2); }
.pal-vl code { margin-right: var(--sp-2); color: var(--fg); font: 12px/18px var(--mono); }
.pal-res .cc-note { margin-top: 0; }
.pal-res .cc-act { margin-top: var(--sp-05); }
@media (max-width: 420px) { .pal-f:not(.multi) { display: block; } .pal-f:not(.multi) .pal-v { max-width: none; margin-top: var(--sp-05); text-align: left; } }
.snack { position: fixed; z-index: 2000; left: 0; right: 0; margin: 0 auto; bottom: var(--snack-b, 16px); width: max-content; max-width: calc(100vw - 24px); padding: var(--sp-2) var(--sp-3); border-radius: 8px; background: var(--fg); color: var(--bg); font-size: 13px; line-height: 20px; overflow-wrap: anywhere; }
/* a refusal or failure stays calm (owner 2026-10-20: "빨간색 글자 나오면 놀란다 사람들"): the usual snackbar with a small amber dot */
/* A new shell waits for a tap: a bar across the top that pushes the app down (body:has), so it never covers a screen's own controls */
.shell-chip { position: fixed; z-index: 1999; inset: 0 0 auto 0; padding: calc(var(--sp-2) + env(safe-area-inset-top, 0px)) var(--sp-4) var(--sp-2); border: 0; border-radius: 0; background: var(--accent); color: var(--on-accent); font: inherit; font-size: 13px; line-height: 18px; font-weight: 600; text-align: center; cursor: pointer; }
body:has(.shell-chip) .app { --chip-h: 34px; padding-top: 0; margin-top: calc(var(--chip-h) + env(safe-area-inset-top, 0px)); height: calc(100dvh - var(--chip-h) - env(safe-area-inset-top, 0px)); }
.upd-bar { position: fixed; z-index: 1998; inset: 0 0 auto 0; display: flex; align-items: center; justify-content: center; gap: var(--sp-2); padding: calc(var(--sp-15) + env(safe-area-inset-top, 0px)) var(--sp-10) var(--sp-15); background: var(--accent); color: var(--on-accent); font-size: 13px; line-height: 20px; text-align: center; }
.upd-bar .ub-tx { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; overflow-wrap: anywhere; }
.upd-bar span.ub-tx { cursor: default; }
.upd-bar.download .ub-tx::after, .upd-bar.waiting .ub-tx::after, .upd-bar.restarting .ub-tx::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: var(--sp-2); border-radius: 50%; background: currentColor; vertical-align: 2px; }
.upd-bar.failed { background: var(--fg); color: var(--bg); }
.upd-bar .x { position: absolute; right: 8px; bottom: 4px; padding: 0 var(--sp-15); border: 0; background: transparent; color: inherit; font: inherit; font-size: 16px; line-height: 22px; cursor: pointer; }
body:has(.upd-bar) { --ubh: var(--upd-h, calc(32px + env(safe-area-inset-top, 0px))); }
body:has(.upd-bar) .app { padding-top: 0; margin-top: var(--ubh); height: calc(100dvh - var(--ubh)); }
.snack.bad::before { content: ""; display: inline-block; flex: none; width: 7px; height: 7px; margin-right: var(--sp-2); border-radius: 50%; background: var(--err); vertical-align: 1px; }
.snack.act { display: flex; align-items: center; gap: var(--sp-3); }
.snack .sa { flex: none; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 600; text-decoration: underline; }
:root[data-theme="dark"] .snack, :root[data-theme="dark"] .upd-bar.failed { background: var(--active); color: var(--fg); box-shadow: inset 0 1px 0 rgb(255 255 255 / .07), 0 0 0 1px rgb(255 255 255 / .06), 0 8px 24px -4px rgb(0 0 0 / .55); }
@media (max-width: 639px) { .snack { bottom: var(--snack-b, calc(60px + max(2px, calc(env(safe-area-inset-bottom) - 16px)))); } }
/* floating notices (alert / worklog / lane report events): compact cards top-right; each leaves ~4s after the owner
   has actually seen it (tab visible and window focused), hover pauses, a dismissed one never comes back */
.ntf-box { position: fixed; z-index: 1900; top: 16px; right: 16px; display: flex; flex-direction: column; gap: var(--sp-2); width: min(344px, calc(100vw - 32px)); pointer-events: none; }
.ntf { pointer-events: auto; display: flex; align-items: flex-start; gap: var(--sp-2); padding: var(--sp-2) var(--sp-15) var(--sp-2) var(--sp-3); border-radius: var(--r-menu); background: var(--pop); color: var(--fg); box-shadow: 0 0 0 1px rgb(0 0 0 / .04), 0 1px 2px rgb(0 0 0 / .06), 0 8px 24px -4px rgb(0 0 0 / .12), 0 20px 40px -12px rgb(0 0 0 / .10); cursor: pointer; transform-origin: 100% 0; transition: transform var(--m-base) var(--m-ease), opacity var(--m-base) var(--m-ease); }
:root[data-theme="dark"] .ntf { background: #2a2a30; box-shadow: inset 0 1px 0 rgb(255 255 255 / .07), 0 0 0 1px rgb(255 255 255 / .06), 0 2px 4px rgb(0 0 0 / .3), 0 12px 32px -4px rgb(0 0 0 / .55); }
/* stacked cards step back a little, so the newest reads as the top layer */
.ntf + .ntf { transform: scale(.985); opacity: .97; }
.ntf + .ntf + .ntf { transform: scale(.97); opacity: .94; }
.ntf.in { animation: ntf-in var(--m-base) var(--m-ease); }
.ntf.out { opacity: 0; transform: translateX(12px) scale(.98); pointer-events: none; transition-duration: var(--m-fast); }
@media (hover: hover) { .ntf:hover { background: var(--card-hover); } }
@media (hover: hover) { :root[data-theme="dark"] .ntf:hover { background: #303037; } }
.ntf > .dot { flex: none; margin-top: var(--sp-15); }
.ntf .tx { flex: 1; min-width: 0; }
.ntf .hd { display: flex; align-items: baseline; gap: var(--sp-15); min-width: 0; font: 600 13px/20px var(--font); }
.ntf .hd .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ntf .hd .tm { flex: none; color: var(--fg-3); font-size: 11.5px; font-weight: 400; }
.ntf .bd2 { color: var(--fg-2); font-size: 12.5px; line-height: 18px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.ntf .x { flex: none; width: 24px; height: 24px; margin-top: calc(var(--sp-05) * -1); padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--fg-3); font-size: 16px; line-height: 24px; }
@media (hover: hover) { .ntf .x:hover { background: var(--hover); color: var(--fg); } }
@keyframes ntf-in { from { opacity: 0; transform: translateX(16px) scale(.98); } }
/* On a phone the cards come down under the app bar (60px), so the back arrow and the title stay in reach. */
@media (max-width: 639px) { .ntf-box { top: calc(60px + var(--sp-2) + env(safe-area-inset-top)); right: 8px; width: calc(100vw - 16px); } }

/* 채팅 uses the same app bar as every page (title, 돋보기, usage); it only adds the session switcher right after the title
   and one 대화/로그 icon button next to the 돋보기 (shared by both views) */
.thead { flex: 1; display: flex; align-items: center; gap: var(--sp-2); min-width: 0; margin: 0 var(--sp-1) 0 0; }
.appbar.tv h1 { flex: none; margin-right: var(--sp-3); }
.view.fill { padding-top: var(--sp-2); }
.tsw { flex: 1; min-width: 0; display: flex; gap: var(--sp-1); overflow-x: auto; scrollbar-width: none; }
.tsw::-webkit-scrollbar { display: none; }
.tchip { display: inline-flex; align-items: center; gap: var(--sp-15); flex: none; height: 32px; max-width: 220px; padding: 0 var(--sp-3); border: 0; border-radius: var(--r-ctl); background: var(--chip, var(--card)); color: var(--fg-2); font-size: 14px; font-weight: 500; }
@media (hover: hover) { .tchip:hover { background: var(--hover); color: var(--fg); } }
.dragging { opacity: .4; }
.dropon { outline: 2px solid var(--accent); outline-offset: 2px; }
.tchip.on { background: var(--fg); color: var(--bg); font-weight: 600; }
.tchip.on .sb { background: color-mix(in srgb, var(--bg) 22%, transparent); color: inherit; }
.tchip .tx { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tchip[hidden] { display: none; }
.tsep { flex: none; align-self: center; width: 1px; height: 16px; margin: 0 var(--sp-1); background: var(--line); }
.tsep[hidden] { display: none; }
.tchip.tmore .ic { width: 14px; height: 14px; }
.nb.warn { background: var(--warn); }
.nb { flex: none; min-width: 16px; height: 16px; padding: 0 var(--sp-15); border-radius: 8px; background: var(--accent); color: var(--bg); font: 600 11px/16px var(--font); text-align: center; }
/* an unread count is a count badge on every row: blue in light (the .nb above), orange in dark (owner 2026-11-05); status counts, nav dots and draft counts keep their own color */
:root[data-theme="dark"] .nb:not(.warn, .err, .unreplied, .nnb, .nub, .drafted) { background: var(--unreplied); color: var(--bg); }
:root[data-theme="dark"] .hr .dot.un, :root[data-theme="dark"] .fr.un .rc-src::before { background: var(--unreplied); }
.sb { flex: none; height: 16px; padding: 0 var(--sp-15); border-radius: 4px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font: 500 10.5px/16px var(--font); white-space: nowrap; }
.sb.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.tdrop { display: none; flex: 1 1 120px; width: auto; min-width: 0; }
@media (max-width: 639px) { .thead.lanev .tdrop.sel { max-width: 112px; } }
#vtog { position: relative; }
#vtog .ud { position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
@media (pointer: coarse) { .tchip { height: 36px; } }
/* phone: the switcher is one small chip after the title (name + caret opens the session list) */
@media (max-width: 639px) {
  .appbar.tv h1 { margin-right: var(--sp-2); }
  .view.fill { padding-top: var(--sp-1); }
  .appbar .tsw { display: none; }
  .appbar .tdrop.sel { display: inline-flex; flex: 0 1 auto; width: auto; max-width: 168px; height: 32px; gap: var(--sp-15); padding: 0 var(--sp-2) 0 var(--sp-3); border: 0; border-radius: var(--r-ctl); background: var(--card); color: var(--fg); font: 600 14px/18px var(--font); }
  .appbar .tdrop .val { flex: 0 1 auto; }
  @media (pointer: coarse) { .appbar .tdrop.sel { height: var(--btn-h); } }
  .appbar.tv .tdrop.sel { flex: none; }
  .appbar.tv .conn { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}

/* chat: Material 3 type scale + tonal surfaces, one reading column.
   - message text = M3 body-large 16px (line-height 26px: 24px is tuned for Latin, Hangul needs a little more air); meta = label-medium 12/16; tool rows = body-medium 13/20
   - measure capped at 40em of the 16px text (640px = 40 Hangul glyphs = ~65ch measured on "0", inside the 60-75ch band)
   - turn separation by spacing (32px between turns, 16px inside one), no rules or colored stripes
   - owner = right-aligned tonal bubble (--active, M3 surface-container-highest); answers = unboxed text;
     lane reports and alerts = tonal card (--layer + hairline); work in between folds into one quiet summary row
   - secondary text uses --fg-2 (AA on both themes); --fg-3 stays for non-text only */
.chatbox { position: relative; flex: 1; min-height: 0; }
/* container tlcol: the narrow rules of everything drawn inside a timeline ask this column's width, not the window's, so a 340 pane lays cards out like a 390 phone; 560px is where the column of a phone-wide window (<= ~615px) ends */
.timeline { container: tlcol / inline-size; height: 100%; overflow-y: auto; overflow-x: hidden; padding-inline: var(--sp-2); margin-inline: calc(var(--sp-2) * -1); }   /* the 8px gutter (padding, given back as margin) is room for the notice highlight's ring and bar: overflow-x hidden would clip them at the column edge (09-notices.css) */
.tl-in { display: flex; flex-direction: column; gap: var(--sp-4); width: 100%; max-width: var(--col); min-width: 0; margin: 0 auto; padding: var(--sp-2) 0 var(--sp-8); }
@container tlcol (max-width: 559.98px) { .tl-in { padding: 0 0 var(--sp-6); } .tl-in > .bm { padding: var(--sp-3) var(--sp-4); } }
/* a clamped text that has a 더 보기 / 펼치기 button fades out over its last two lines instead of a hard cut (owner 2026-11-04); open removes .clamp, so the fade goes with it.
   .ub.clamp here, .rq-body.clamp and .rq-orig.clamp in 15-reply-card.css use the same gradient with their own --fade (the height the fade covers). */
.ub.clamp { --fade: calc(2 * var(--lh-chat)); padding-bottom: 0; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--fade)), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - var(--fade)), transparent); }
.ubm { align-self: flex-end; height: 24px; padding: 0 var(--sp-1); border: 0; background: none; color: var(--fg-2); font-size: 12.5px; font-weight: 500; }
@media (hover: hover) { .ubm:hover { color: var(--fg); } }
.lw-s { display: flex; flex-direction: column; padding: 0 var(--sp-2) var(--sp-15) var(--lead-ind); }
.lw-s:empty { display: none; }
.lw-r { display: flex; align-items: center; gap: var(--sp-2); min-height: 30px; padding: 0 var(--sp-2); border-radius: 8px; box-shadow: inset 2px 0 0 var(--line); font-size: 13px; }
@media (hover: hover) { .lw-r:hover { background: var(--layer); } }
.lw-r .dot { width: 6px; height: 6px; }
.lw-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lw-st { flex: none; color: var(--fg-3); font-size: 12px; }
@media (max-width: 639px) { .lw-s { padding-left: var(--sp-4); } }
details.work.bad:not(.live) .wdot { display: block; background: var(--err); }
.mt { font-size: 12px; line-height: 16px; color: var(--fg-2); }
.mt .mn { font-weight: 600; }
/* a status pill in a message header (진행 중/완료/질문/실패) is exactly the 16px text line, so it neither sinks below the name and time nor makes the line taller */
.mt > .tag { height: 16px; margin-left: var(--sp-15); vertical-align: top; }
.um { align-self: flex-end; display: flex; flex-direction: column; align-items: flex-end; gap: var(--sp-1); max-width: 80%; min-width: 0; margin-top: var(--sp-4); }
.um:first-child { margin-top: 0; }
.um.cont { margin-top: calc(var(--sp-2) * -1); }
/* the owner's bubble is a small-radius box, not a pill */
.ub { padding: var(--sp-2) var(--sp-3); border-radius: var(--r-ctl); background: color-mix(in srgb, var(--fg) 7%, var(--bg)); font-size: var(--fs-chat); line-height: var(--lh-chat); white-space: pre-wrap; overflow-wrap: anywhere; }
.cont > .mt { display: none; }
.cont > .mt.dv { display: block; } .mt.dv-fail { color: var(--err); }
.bm.cont { margin-top: calc(var(--sp-1) * -1); }
.bm { min-width: 0; overflow-wrap: anywhere; }
.bm .mt { margin-bottom: var(--sp-1); }
/* chat reads like Claude: one calm page (the log's gray), replies as plain text, owner bubbles a shade darker,
   alerts and opened work folds on white cards, the composer a floating white card with its chips inside */
.tl-in > .bm.rep, .tl-in > .bm.alert { max-width: none; padding: var(--sp-4); border-radius: var(--r-card); background: var(--card); }
.bm .more pre { background: var(--layer) !important; }
details.work[open] { padding: var(--sp-15) var(--sp-2) var(--sp-2); border-radius: var(--r-card); background: var(--card); }
.sendrow { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "ta ta" "bar send"; align-items: center; gap: var(--sp-15) var(--sp-2); padding: var(--sp-3) var(--sp-3) var(--sp-2) var(--sp-4) !important; border: 1px solid var(--line) !important; border-radius: 22px !important; background: var(--card) !important; }
.sendrow:focus-within { border-color: var(--line-2) !important; }
/* "ulw" in the message (14-slash-commands.js autosize): a 2px blue → violet → pink edge, padding 1px less so nothing inside moves */
/* the keyword itself: the backdrop (14-slash-commands.js paintUlw) sits in the textarea's grid cell under it; its text is invisible, only the
   mark shows, as the same gradient under the word */
.sendrow .ta-hl { grid-area: ta; align-self: stretch; overflow: hidden; white-space: pre-wrap; overflow-wrap: break-word; color: transparent; pointer-events: none; box-sizing: border-box; }
.sendrow .ta-hl[hidden] { display: none; }
.sendrow .ta-hl ~ textarea { position: relative; z-index: 1; }
/* The chips of the composer's tokens (15-attachments.js): above the textarea, the same text in the same box, nothing visible but the chips. */
.sendrow .ta-tok { grid-area: ta; align-self: stretch; justify-self: start; position: relative; z-index: 2; overflow: hidden; white-space: pre-wrap; overflow-wrap: break-word; color: transparent; pointer-events: none; box-sizing: border-box; }
.sendrow .ta-tok[hidden] { display: none; }
.ta-tok .atk { position: relative; }
.atk-in { display: inline-flex; align-items: center; gap: var(--sp-05); max-width: 100%; padding: 0 var(--sp-05); border: 0; border-radius: var(--r-seg-in); background: var(--active); color: var(--fg); font: 500 12px/18px var(--font); white-space: nowrap; overflow: hidden; vertical-align: text-bottom; cursor: zoom-in; }
.ta-tok .atk-in { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); height: 20px; pointer-events: auto; justify-content: center; }
.atk-in img, .atk-in svg { flex: none; width: 14px; height: 14px; border-radius: 3px; object-fit: cover; }
.ub .atk-in { margin: 0 var(--sp-05); height: 20px; padding: 0 var(--sp-1); }
@media (hover: hover) { .ub .atk-in:hover { background: var(--line-2); } }
.ta-hl .ulw-kw { color: transparent; background: linear-gradient(90deg, #5b9fe3, #9d8fe0, #e98aa6) bottom / 100% 2px no-repeat; border-radius: 2px; box-shadow: 0 -0.9em 0 0 color-mix(in srgb, #9d8fe0 14%, transparent) inset; }
.sendrow.ulw { border: 2px solid transparent !important; padding: 11px 11px 7px 15px !important; /* nudge: the 2px gradient border takes 1px more than the 1px border of .sendrow, so every side is 1px less */ background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(90deg, #5b9fe3, #9d8fe0 45%, #d98bc9 75%, #e98aa6) border-box !important; }
.sendrow textarea { grid-area: ta; }
.sendrow > .ib { grid-area: send; }
.sendrow > .cbar { grid-area: bar; margin: 0 0 0 calc(var(--sp-2) * -1); padding: 0; min-height: 26px; }
/* Claude-style edges: the transcript (chat and log) fades into the page under the header and above the composer while
   there is more to scroll that way. Overlays only - no mask, shadow or layout change. */
.chatbox, .termbox { position: relative; }
.chatbox::before, .chatbox::after, .termbox::before, .termbox::after { content: ""; position: absolute; left: 0; right: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity var(--m-fast) var(--m-ease); }
.chatbox::before, .termbox::before { top: 0; height: 28px; background: linear-gradient(var(--bg), transparent); }
.chatbox::after, .termbox::after { bottom: 0; height: 40px; background: linear-gradient(transparent, var(--bg)); }
.chatbox.fade-t::before, .termbox.fade-t::before, .chatbox.fade-b::after, .termbox.fade-b::after { opacity: 1; }
.chatbox > .jump, .termbox > .jump { position: absolute; left: 50%; right: auto; bottom: 14px; z-index: 2; transform: translateX(-50%); display: grid; place-items: center; width: 36px; height: 36px; min-height: 36px; min-width: 0; padding: 0; border: 1px solid var(--line-2); border-radius: 50%; background: var(--card); color: var(--fg); font-size: 0; line-height: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.chatbox > .jump svg, .termbox > .jump svg { display: block; width: 20px; height: 20px; margin: 0; }
.chatbox > .jump[hidden], .termbox > .jump[hidden] { display: none; }
/* Track B: attachments (composer tray, message files, lightbox), ended-lanes fold, target popovers */
.sendrow.has-att { grid-template-areas: "at at" "ta ta" "bar send"; }
.atray { grid-area: at; display: flex; gap: var(--sp-2); overflow-x: auto; scrollbar-width: none; margin: calc(var(--sp-05) * -1) 0 var(--sp-1) calc(var(--sp-15) * -1); padding: var(--sp-05); }
.atray::-webkit-scrollbar { display: none; }
.fatt { --fatt-x: 20px; position: relative; flex: none; display: flex; align-items: center; gap: var(--sp-2); height: 56px; max-width: 220px; padding: 0 calc(var(--sp-1) + var(--fatt-x) + var(--sp-15)) 0 var(--sp-3); border-radius: 12px; background: var(--layer); color: var(--fg); }
.fatt.img { width: 56px; padding: 0; overflow: hidden; }
.fatt.img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fatt-v { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.fatt .fi-ic { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 4px; background: var(--card); color: var(--fg-2); }
.fatt .fi-ic svg { width: 16px; height: 16px; }
.fatt .fi-t { min-width: 0; display: flex; flex-direction: column; }
.fatt .fi-n { font-size: 13px; line-height: 18px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fatt .fi-m { font-size: 12px; line-height: 16px; color: var(--fg-3); }
.fatt.fail { max-width: 280px; }
.fatt.fail .fi-m { color: var(--err); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fatt .pring { width: 32px; height: 32px; font-size: 10px; color: var(--accent); }
.up-retry { padding: 0; border: 0; cursor: pointer; }
@media (hover: hover) { .up-retry:hover { color: var(--fg); } }
/* a percent ring: the sidebar's folded usage (22-shell.css) and an upload on its chip; --p is 0 to 100, the size and the color come from where it stands */
.pring { position: relative; flex: none; display: grid; place-items: center; line-height: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(currentColor calc(var(--p) * 1%), var(--track) 0); -webkit-mask: radial-gradient(circle closest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3px)); mask: radial-gradient(circle closest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3px)); }
/* the number under an image of a message that carries several ("이미지 1"): a small .tag, in the tray and in the sent message alike */
.fatt-n { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-1); }
.tag.img-no { flex: none; margin-top: var(--sp-1); }
.fatt-n > .tag.img-no { margin-top: 0; }
.fatt .ax { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: var(--fatt-x); height: var(--fatt-x); padding: 0; border: 0; border-radius: 10px; background: rgb(0 0 0 / .55); color: #fff; }
.fatt .ax svg { width: 14px; height: 14px; }
.fatt:not(.img) .ax { background: transparent; color: var(--fg-3); top: 18px; }
#c-attach { width: 30px; padding: 0; justify-content: center; }
#c-attach svg { width: 20px; height: 20px; }
.composer.dropping .sendrow { background: color-mix(in srgb, var(--accent) 7%, var(--card)) !important; }
.mfiles { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sp-15); max-width: 100%; }
.bm .mfiles { justify-content: flex-start; margin-top: var(--sp-2); }
.lg-x .mfiles, .a-text .mfiles, .fs-body > .mfiles { justify-content: flex-start; margin-top: var(--sp-2); }   /* a sheet's body: the files start where its text starts */
.mfiles .thumb { display: block; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: var(--layer); cursor: zoom-in; }
.mfiles .thumb img { display: block; max-width: min(240px, 60vw); max-height: 200px; object-fit: cover; }
.mfiles .fatt { cursor: pointer; padding-right: var(--sp-3); text-decoration: none; }
@media (hover: hover) { .mfiles .fatt:hover { background: var(--hover); } }
/* a session row on a fallback model: the model it runs and the 폴백 중 tag (08-home.js homeNowRow) */
.srow .smodel { display: inline-flex; align-items: center; gap: var(--sp-15); margin-left: var(--sp-15); }

/* every file in a message carries its own download button (thumbnails: top-right corner, chips: right end) */
.fitem { flex: none; display: flex; flex-direction: column; align-items: flex-start; max-width: 100%; }
.fbox { position: relative; display: flex; max-width: 100%; }
/* the path under each file: one short line (shortPath in 15-attachments.js), the full path in the title, a tap copies it.
   width:0 + min-width:100% keeps a path inside its own chip's column: it never widens .fitem, so two files side by side keep
two separate paths under their own chips and a long one ends in an ellipsis. */
.fpath, .lb-p { display: block; width: 0; min-width: 100%; max-width: 100%; padding: 0; border: 0; background: none; color: var(--fg-3); font: 400 12px/18px var(--font); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: copy; }
.fpath { margin-top: var(--sp-1); }
@media (hover: hover) { .fpath:hover, .lb-p:hover { color: var(--fg-2); } }
.fbox > .fatt { padding-right: var(--sp-12); max-width: min(260px, 90cqw); }
.fdl { position: absolute; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 16px; color: var(--fg-2); text-decoration: none; }
.fdl svg { width: 16px; height: 16px; }
.fbox > .fatt + .fdl { top: 12px; right: 8px; }
@media (hover: hover) { .fbox > .fatt + .fdl:hover { background: var(--card); color: var(--fg); } }
.fbox > .thumb + .fdl { top: 6px; right: 6px; background: rgb(0 0 0 / .55); color: #fff; }
@media (hover: hover) { .fbox > .thumb + .fdl:hover { background: rgb(0 0 0 / .72); } }
.mfiles .fatt.off { cursor: default; opacity: .55; padding-right: var(--sp-3); }
@media (hover: hover) { .mfiles .fatt.off:hover { background: var(--layer); } }
@media (pointer: coarse) { .fdl { width: 36px; height: 36px; border-radius: 18px; } .fbox > .fatt + .fdl { top: 10px; } }
.bm .md code.path.fp { cursor: pointer; }
.bm .md code.path.fp:hover { text-decoration: underline; text-underline-offset: 3px; }
dialog.lbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(0 0 0); color: #fff; }
dialog.lbox::backdrop { background: transparent; }
.lbox .lb-in { display: grid; grid-template-rows: auto auto minmax(0, 1fr); width: 100%; height: 100%; }
.lbox .lb-bar { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); font-size: 14px; }
.lbox .lb-n { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.lbox .lb-bar a, .lbox .lb-bar button { display: inline-flex; align-items: center; height: 32px; padding: 0 var(--sp-3); border: 0; border-radius: var(--r-ctl); background: rgb(255 255 255 / .12); color: #fff; font-size: 13px; text-decoration: none; }
.lbox .lb-bar button.x { width: 32px; padding: 0; justify-content: center; }
.lbox .lb-p { padding: 0 var(--sp-4) var(--sp-3); color: rgb(255 255 255 / .72); }
.lbox .lb-img:focus { outline: 0; }
.lbox .lb-img { position: relative; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; min-height: 0; padding: 0 var(--sp-4) var(--sp-6); overflow: hidden; }
.lbox .lb-img img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; touch-action: none; cursor: zoom-in; user-select: none; -webkit-user-select: none; }
.lbox .lb-img.zoomed img { cursor: grab; }
.lbox .lb-nav { position: absolute; top: 50%; display: grid; place-items: center; width: 40px; height: 40px; margin-top: calc(var(--sp-5) * -1); padding: 0; border: 0; border-radius: var(--r-sheet); background: rgb(255 255 255 / .16); color: #fff; cursor: pointer; }
@media (hover: hover) { .lbox .lb-nav:hover { background: rgb(255 255 255 / .28); } }
.lbox .lb-nav.prev { left: var(--sp-3); }
.lbox .lb-nav.next { right: var(--sp-3); }
.lbox .lb-img.zoomed .lb-nav { display: none; }
.ended { margin-top: var(--sp-3); border-radius: var(--r-card); background: var(--card); overflow: hidden; }
.ended > summary { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); list-style: none; cursor: pointer; color: var(--fg-2); font-size: 14px; font-weight: 600; }
.ended > summary::-webkit-details-marker { display: none; }
.ended > summary svg { width: 16px; height: 16px; transition: transform var(--m-fast) var(--m-ease); }
.ended[open] > summary svg { transform: rotate(90deg); }
.ended .er { display: flex; align-items: center; gap: var(--sp-2); width: 100%; padding: var(--sp-3) var(--sp-4); border: 0; background: transparent; color: var(--fg); font-size: 14px; text-align: left; }
@media (hover: hover) { .ended .er:hover { background: var(--card-hover); } }
.ended .er .sup { flex: none; margin-left: auto; color: var(--fg-3); font-size: 12px; white-space: nowrap; }
.ended > summary > .elabel { flex: none; white-space: nowrap; }
.ended > summary > .ecounts { flex: 1; min-width: 0; color: var(--fg-3); font-size: 13px; font-weight: 500; }
.ended .ecount { display: inline-block; white-space: nowrap; }
.ended > summary > .elabel:has(+ .etools) { flex: 1; }
.ended .ecount::before { content: " · "; }
.ended .ecount.need { color: var(--warn); }
.ended .etools { display: flex; align-items: center; gap: var(--sp-1); margin: calc(var(--sp-15) * -1) calc(var(--sp-2) * -1) calc(var(--sp-15) * -1) 0; }
.ended:not([open]) .etools { display: none; }
.ended .etools .btn { height: 28px; font-size: 13px; }
.ended .erow { display: flex; align-items: center; }
.ended .erow .er { flex: 1; min-width: 0; border-top: 0; padding-right: var(--sp-2); }
.ended .erow .edel { margin-right: var(--sp-3); color: var(--fg-3); }
@media (hover: hover) { .ended .erow .edel:hover { color: var(--err); background: color-mix(in srgb, var(--err) 12%, transparent); } }
.ended .er .tag { flex: none; }
.ended .erow .er .en { flex: 0 1 auto; min-width: 3em; }
.ended .erow .er .eproj { flex: 0 20 auto; min-width: 0; max-width: 35%; overflow: hidden; text-overflow: ellipsis; }
.ended .er .eproj + .edate { margin-left: 0; }
.ended .en { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ended label.er { cursor: pointer; min-height: var(--row-h); }
.ended label.ck-all { color: var(--fg-2); font-weight: 600; }
.ended .ck { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.dl-list { margin: 0; padding: var(--sp-2) var(--sp-3); max-height: 40vh; overflow-y: auto; list-style: none; border-radius: var(--r-ctl); background: var(--layer); color: var(--fg); font-size: 14px; line-height: 24px; }
.dl-list li { overflow-wrap: anywhere; }
.dl-body { display: flex; flex-direction: column; gap: var(--sp-3); }
@media (pointer: coarse) { .ended .etools .btn { height: 36px; } .ended .erow .edel { margin-right: var(--sp-15); } }
.bm.alert .mn::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 var(--sp-15) 1px 0; /* nudge: lifts the 6px dot to the optical centre of the lowercase letters */ border-radius: 50%; background: var(--err); vertical-align: middle; }
.bm .more { margin-top: var(--sp-2); }
.bm .more > summary { width: fit-content; color: var(--fg-2); font-size: 13px; line-height: 20px; cursor: pointer; list-style: none; text-decoration: underline; text-underline-offset: 3px; }
.bm .more > summary::-webkit-details-marker { display: none; }
.bm .more[open] > summary { margin-bottom: var(--sp-1); }
.bm .more pre { margin: 0; padding: var(--sp-2) var(--sp-3); border: 0; border-radius: 10px; background: var(--card); color: var(--fg-2); font-size: 12px; line-height: 18px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 240px; }
.gban { flex: none; display: flex; align-items: center; gap: var(--sp-2); width: calc(100% - 48px); max-width: 872px; margin: 0 auto var(--sp-1); padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-4); border-radius: 12px; background: var(--card); color: var(--fg-2); font-size: 13px; line-height: 20px; }

.oerr { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2); width: calc(100% - 48px); max-width: 872px; margin: 0 auto var(--sp-15); padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-4); border-radius: 12px; background: var(--card); color: var(--fg-2); font-size: 13px; line-height: 20px; box-shadow: inset 0 0 0 1px var(--warn); }
.oerr[hidden] { display: none; }
.oerr .tx { flex: 1 1 220px; min-width: 0; }
.oerr .tx b { color: var(--fg); font-weight: 600; }
.oerr .btn { flex: none; min-height: 36px; padding: 0 var(--sp-3); border: 0; border-radius: 10px; background: var(--fg); color: var(--bg); font: inherit; font-weight: 600; }
@media (max-width: 600px) { .oerr { width: calc(100% - 24px); } .oerr .btn { width: 100%; } }
.gban .tx { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gban .tx b { color: var(--fg); font-weight: 600; }
.gban .x { flex: none; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--fg-3); font-size: 18px; line-height: 28px; }
@media (hover: hover) { .gban .x:hover { background: var(--hover); color: var(--fg); } }
@media (max-width: 639px) { .gban { width: calc(100% - 24px); } }
.bm .md { font-size: 15.5px; line-height: 28px; }
.bm > .mt { margin-bottom: var(--sp-15); } .bm > .mt .mn { color: var(--fg); }
.bm .md p { margin: 0 0 var(--sp-3); } .bm .md p:last-child { margin-bottom: 0; }
.bm .md p.h { margin: var(--sp-6) 0 var(--sp-2); font-size: 17px; line-height: 26px; } .bm .md p.h b { font-weight: 700; } .bm .md p.h:first-child { margin-top: 0; }
.bm .md ul, .bm .md ol { margin: 0 0 var(--sp-3); padding-left: var(--sp-6); }
.bm .md li + li { margin-top: var(--sp-1); }
.bm .md code, .dc-dr-b code, .tr-rb code { padding: var(--sp-05) var(--sp-15); border-radius: 6px; background: var(--layer); color: var(--fg); font-size: .84em; }
.bm .md code.path { color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); }
.bm .md b { font-weight: 700; }
.bm pre { margin: var(--sp-3) 0 var(--sp-4); padding: var(--sp-3) var(--sp-4); border: 0; border-radius: 12px; background: var(--layer); color: var(--fg); font-size: 13px; line-height: 20px; white-space: pre; overflow-wrap: normal; overflow: auto; max-height: 360px; }
.bm .md pre code { padding: 0; background: none; font-size: inherit; }
.md .tbl { max-width: 100%; margin: var(--sp-1) 0 var(--sp-3); overflow-x: auto; border-radius: 12px; }
.md table { border-collapse: collapse; min-width: 100%; font-size: 14px; line-height: 22px; }
.md th, .md td { padding: var(--sp-2) var(--sp-3); text-align: left; vertical-align: top; white-space: nowrap; }
.md th { background: var(--layer); color: var(--fg-2); font-weight: 600; font-size: 13px; }
.md tr + tr td, .md thead + tbody tr:first-child td { border-top: 1px solid var(--line); }
.md a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.a-div + .um { margin-top: 0; }
.box pre, .cmdbox pre { margin: var(--sp-2) 0 var(--sp-3); padding: var(--sp-2) var(--sp-3); border-radius: 8px; background: var(--layer); color: var(--fg); font-size: 12.5px; line-height: 20px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 360px; overflow: auto; }
.box pre { margin: var(--sp-15) 0 0; padding: var(--sp-2) var(--sp-3); border-radius: 6px; font-size: 12px; line-height: 18px; max-height: 300px; }
.box pre.err, .cmdbox.err pre { color: var(--err); }
.cmdbox { min-width: 0; }
/* command answer card (out events with .card, command replies) */
.ccard { max-width: 560px; padding: var(--sp-4); border-radius: var(--r-card); background: var(--card); }
/* the session-result card sits straight in the timeline column: as wide as the replies and the composer, not the 560px a command answer gets */
.bm.res > .ccard { max-width: none; }
.bm.res .cc-hd + .md { margin-top: var(--sp-2); }
@container tlcol (max-width: 559.98px) { .tl-in > .bm.res { padding: 0; } .bm.res > .mt { padding: 0 var(--sp-4); } }
/* a message from another computer's gateway (01-peer-msg.js): the computer, the kind, then the words */
.bm.pmc > .ccard { padding: var(--sp-3) var(--sp-4); background: var(--layer); }
.pmc-hd .mt { margin: 0 0 0 auto; flex: none; }
.pmc .md :not(pre) > code { background: var(--card); }
.pmc .md > :last-child { margin-bottom: 0; }
.pmc-hd { display: flex; align-items: center; gap: var(--sp-15); min-width: 0; font-size: var(--fs-sec); line-height: var(--lh-sec); color: var(--fg-2); }
.pmc-hd .ic { width: 16px; height: 16px; flex: none; }
.pmc-hd .mn { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pmc-b { margin-top: var(--sp-1); }
.pmc-b.clamp { max-height: calc(6 * var(--lh-chat)); overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 2 * var(--lh-chat)), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 2 * var(--lh-chat)), transparent); }
.pmc-b + .ubm { display: block; margin-left: auto; }
.pmc-n { margin-top: var(--sp-2); color: var(--fg); }
@container tlcol (max-width: 559.98px) { .tl-in > .bm.pmc { padding: 0; } }
.cc-hd { display: flex; align-items: center; gap: var(--sp-2); font-size: 16px; line-height: 22px; font-weight: 600; }
.cc-facts { display: grid; grid-template-columns: fit-content(40%) minmax(0, 1fr); gap: var(--sp-1) var(--sp-4); margin: var(--sp-2) 0 0; font-size: 14px; line-height: 22px; }
.cc-facts dt { color: var(--fg-3); }
.cc-facts dd { margin: 0; min-width: 0; color: var(--fg); white-space: pre-line; }
.cc-note { margin-top: var(--sp-2); color: var(--fg-3); font-size: 13px; line-height: 20px; white-space: pre-line; }
.cc-act { margin-top: var(--sp-3); }
.cc-act .btn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@container tlcol (max-width: 420px) { .cc-facts { grid-template-columns: minmax(0, 1fr); gap: 0; } .cc-facts dd { margin-bottom: var(--sp-2); } }
.cmdbox pre { margin: 0 0 var(--sp-1); font-family: var(--mono); }
.lv { min-width: 0; font-size: var(--fs-chat); line-height: var(--lh-chat); }
.lv[role="button"] { cursor: pointer; }
.lv p { margin: 0 0 var(--sp-1); }
.lv:not(.open) p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lv-r, .lv-s { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-r { color: var(--fg-2); font-size: var(--fs-body); line-height: var(--lh-body); }
.lv-s { color: var(--fg-3); font-size: var(--fs-meta); line-height: var(--lh-sec); }
.lv-s:not(.lv-h)::before { content: "\00b7"; margin-right: var(--sp-15); }
.lv-h { margin-top: var(--sp-1); }
.lv.open .lv-r, .lv.open .lv-s { white-space: normal; }
.sn { display: flex; align-items: flex-start; gap: var(--sp-2); min-width: 0; padding: var(--sp-2) var(--sp-3); border-radius: 12px; background: var(--layer); font-size: 14px; line-height: 22px; }
.sn .st { flex: 1; min-width: 0; }
/* login requests (dotz_auth, 16-target-switcher-conversation.js paintAuth): the form's header, body (.abd) and footer sit directly in the full-screen overlay card (14-overlay.css) */
.au { display: contents; font-size: 14px; line-height: 20px; }
.au .abd { display: flex; flex-direction: column; gap: var(--sp-2); }
.au p { margin: 0; color: var(--fg-2); }
.au input:not([type=checkbox]) { height: 40px; padding: 0 var(--sp-3); border: 0; border-radius: 10px; background: var(--ff-fill); color: var(--fg); font: 16px var(--font); min-width: 0; width: 100%; box-sizing: border-box; }
.au .fld { display: flex; flex-direction: column; gap: var(--sp-1); }
.au .fld label { color: var(--fg-2); font-size: 12px; }
.au .ctl { display: flex; gap: var(--sp-15); align-items: center; }
.au .eye { flex: none; height: 40px; padding: 0 var(--sp-3); border: 0; border-radius: 10px; background: var(--ff-fill); color: var(--fg-2); font: 13px var(--font); }
.au input.bad { box-shadow: inset 0 0 0 1.5px var(--err); }
.au .ferr { color: var(--err); font-size: 12px; min-height: 0; }
.au .rem { display: flex; gap: var(--sp-2); align-items: center; color: var(--fg-2); font-size: 13px; }
.au .note { color: var(--fg-3); font-size: 12px; }
.sn .ml-snip { color: var(--fg-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.md p { margin: 0 0 var(--sp-15); } .md p:last-child { margin-bottom: 0; }
.md ul, .md ol { margin: 0 0 var(--sp-15); padding-left: var(--sp-5); }
.md code { padding: 0 var(--sp-1); border-radius: 4px; background: var(--layer); font-size: .92em; }
.md pre code { padding: 0; background: none; }
.bm .md p.meta { margin: var(--sp-1) 0 0; font-size: 13px; line-height: 20px; color: var(--fg-2); }
.bm .md p.meta + p:not(.meta) { margin-top: var(--sp-3); }
.md li.sub { margin-left: var(--sp-5); list-style-type: circle; }
.md hr { margin: var(--sp-3) 0; border: 0; border-top: 1px solid var(--line); }
.md blockquote { margin: 0 0 var(--sp-2); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-ctl); background: var(--layer); color: var(--fg-2); }
details.work > summary { display: flex; align-items: center; gap: var(--sp-2); width: fit-content; max-width: 100%; min-height: 28px; margin-left: calc(var(--sp-1) * -1); padding: 0 var(--sp-2) 0 var(--sp-1); border-radius: 8px; color: var(--fg-2); font-size: 13px; line-height: 20px; cursor: pointer; list-style: none; }
@media (hover: hover) { details.work > summary:hover { background: var(--hover); color: var(--fg); } }
details.work > summary::-webkit-details-marker { display: none; }
details.work > summary::before { content: ""; flex: none; width: 5px; height: 5px; border-right: 1.5px solid var(--fg-2); border-bottom: 1.5px solid var(--fg-2); transform: rotate(-45deg); transition: transform var(--m-fast) var(--m-ease); }
details.work[open] > summary::before { transform: rotate(45deg); }

.wdot { display: none; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
details.work.live .wdot { display: block; }
.wsum { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wbody { display: flex; flex-direction: column; gap: var(--sp-05); min-width: 0; margin: var(--sp-1) 0 0 var(--sp-1); padding-left: var(--sp-4); }
.wbody .a-text { padding: var(--sp-1) var(--sp-2); font-size: 13px; line-height: 20px; color: var(--fg-2); }
.wbody .a-time, .wbody .ttime, .wbody details.box .cl, .wbody .a-div { color: var(--fg-2); }
.wbody .a-time, .wbody .ttime { font-size: 12px; }
.tl-in > .a-div { margin: var(--sp-2) 0 0; font: 500 12px/16px var(--font); color: var(--fg-2); }
.tl-in > .a-div:first-child { margin-top: 0; }
.tl-in > details.work:not([open]) + .bm { margin-top: calc(var(--sp-15) * -1); }
@container tlcol (max-width: 559.98px) { .um { max-width: 90%; } .bm pre { padding: var(--sp-2) var(--sp-3); } .bm.rep, .bm.alert { padding: var(--sp-2) var(--sp-3) var(--sp-3); } }
:root { --col: 736px; }
.composer { flex: none; width: 100%; max-width: var(--col); margin: 0 auto; padding: 0 0 max(var(--sp-4), env(safe-area-inset-bottom)); }
:root[data-kb] .composer { padding-bottom: var(--sp-4); }
.composer.tmode { max-width: var(--col); }
.working { display: flex; align-items: center; gap: var(--sp-2); min-height: 24px; margin-bottom: var(--sp-2); color: var(--fg-3); font-size: 12.5px; line-height: 20px; }
#working-tx { min-width: 0; }
.working .btn { flex: none; height: 24px; padding: 0 var(--sp-2); font-size: 12px; }
/* running state: a softly fading line above the composer, a quiet dot on the model chip, and the send button turns into stop */
.runline { display: flex; align-items: center; gap: var(--sp-2); min-height: 22px; margin: 0 0 var(--sp-2) var(--sp-15); color: var(--fg-2); font-size: 13px; font-weight: 500; line-height: 20px; }
.runline[hidden] { display: none; }
.pausenote { margin: 0 0 var(--sp-15) var(--sp-15); color: var(--warn); font-size: 12.5px; line-height: 18px; }
.pausenote[hidden] { display: none; }
.pausenote .pn-go { height: 24px; margin-left: var(--sp-15); padding: 0 var(--sp-2); font-size: 12.5px; }
.runline .dot { width: 7px; height: 7px; }
/* The run state line (41-runstate.js): always on above the composer, so the owner sees what the agent is doing and, when
   nothing runs while the plan has tasks left, why. */
.runstate { display: flex; align-items: center; gap: var(--sp-2); min-height: 22px; margin: 0 0 var(--sp-15) var(--sp-15); color: var(--fg-3); font-size: 12.5px; line-height: 18px; }
.runstate[hidden] { display: none; }
.runstate .dot { width: 7px; height: 7px; flex: none; }
.runstate .rs-tx { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.runstate.warn { color: var(--warn); }
.runstate.err { color: var(--err); }
.runstate .rs-go { flex: none; height: 24px; padding: 0 var(--sp-2); font-size: 12.5px; }
/* The run state line says the same thing as the older working line, so that one steps aside while this line is on. */
.composer.rs-on .runline { display: none; }
/* On a phone the dot, the text and the button stay on one center line: a running line keeps to one line with an ellipsis;
   a warning or error reason must be readable whole, so only that one wraps. */
@media (max-width: 639px) {
  .runstate.warn .rs-tx, .runstate.err .rs-tx { white-space: normal; }
  .runstate .rs-go { height: 30px; padding: 0 var(--sp-3); }
}
/* The subagent count sits at the right end of the status line; with no status text it is the whole line (14-slash-commands.js paintSubsBtn). */
.runstate .rs-subs { margin-left: auto; }
.runline.only-subs > :is(.dot, .rs-tx) { display: none; }
.runline.only-subs .rs-subs { margin-left: 0; }
/* A message waiting for the turn to end: the owner's bubble, dimmed, with its two ways out in a small line under it (14-slash-commands.js qdBubble). */
.um.qd > .ub { opacity: .6; }
.qd-ln { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0 var(--sp-1); color: var(--fg-2); font-size: 12px; line-height: 16px; }
.qd-ln .btn { flex: none; }
.qd-ln > span:first-child { margin-right: var(--sp-2); }   /* the text buttons carry this much side padding: both dots sit evenly between their neighbours */
/* The top of the timeline: older messages load as it comes into view; the button is the fallback. */
.tl-top { display: flex; justify-content: center; margin: 0 0 calc(var(--sp-15) * -1); }
.tl-top[hidden] { display: none; }
.tl-top .tl-more { height: 26px; font-size: 12.5px; }
/* Inline line buttons are not card buttons: the touch rule's 44px min-height (01-tokens.css) would make the line itself 44px tall.
   They keep their compact height and get a larger hit area from an invisible box around them. */
.runstate .rs-go, .pausenote .pn-go, .tl-top .tl-more { position: relative; min-height: 0; }
.runstate .rs-go::after, .pausenote .pn-go::after, .tl-top .tl-more::after { content: ""; position: absolute; inset: -8px -4px; }
.runline.warn { color: var(--warn); }
#working > .dot, #working-tx, #working > .sp, #working-stop { display: none !important; }

:is(#send-btn, .pane-chat [data-c="send-btn"]).stop { background: var(--fg); color: var(--bg); }
:is(#send-btn, .pane-chat [data-c="send-btn"]).stop > svg { display: none; }
:is(#send-btn, .pane-chat [data-c="send-btn"]).stop::before { content: ""; width: 12px; height: 12px; border: 2px solid currentColor; border-radius: 3px; }
@media (pointer: coarse) { .working .btn { height: 36px; padding: 0 var(--sp-3); } }
/* phone working actions: no row of their own - stop is the send button (with text typed it sends into the running turn)
   and the end is the floating jump button; no extra chip in the composer bar (owner 2026-10-21: a ⋯ there breaks the bar) */
@media (max-width: 639px) {
  .sendrow > .cbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .sendrow > .cbar::-webkit-scrollbar { display: none; }
  .cbar .working .btn { display: none; }
  .chatbox > .jump, .termbox > .jump { left: auto; right: 12px; bottom: 12px; transform: none; }
}
/* slash menu: a floating card above the composer (Discord-style) */
.composer { position: relative; }
.hintrow { position: absolute; z-index: 30; left: 0; right: 0; display: flex; flex-direction: column; max-height: min(360px, 50vh); padding: var(--sp-15); border-radius: 16px; background: var(--pop); box-shadow: 0 0 0 1px rgb(0 0 0 / .05), 0 2px 6px rgb(0 0 0 / .06), 0 12px 32px -6px rgb(0 0 0 / .16); }
:root[data-theme="dark"] .hintrow { background: #2a2a30; box-shadow: inset 0 1px 0 rgb(255 255 255 / .06), 0 0 0 1px rgb(255 255 255 / .06), 0 12px 32px -6px rgb(0 0 0 / .6); }
.sl-hd { flex: none; display: flex; align-items: center; gap: var(--sp-15); padding: var(--sp-15) var(--sp-2) var(--sp-1); color: var(--fg-3); font: 600 11.5px/16px var(--font); }
.sl-hd .logo { width: 16px; height: 16px; }
.sl-hd .nm { color: var(--fg-2); }
.sl-args { flex: none; display: flex; flex-wrap: wrap; gap: var(--sp-1); padding: var(--sp-1) var(--sp-15) var(--sp-15); border-bottom: 1px solid var(--line); margin-bottom: var(--sp-05); }
.sl-c, .sl-a { display: inline-flex; align-items: center; height: 24px; padding: 0 var(--sp-2); border-radius: 12px; background: var(--layer); color: var(--fg-3); font: 500 12px/16px var(--font); }
.sl-c { background: var(--fg); color: var(--bg); font-weight: 600; }
.sl-a.done { color: var(--fg); }
.sl-a.on { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.sl-list { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: var(--sp-05); }
/* every row is one fixed-height line: bold /command, its args, then the gray description right after them (Discord) */
.sl-i { flex: none; display: flex; align-items: center; gap: var(--sp-2); width: 100%; height: 40px; padding: 0 var(--sp-3); border: 0; border-radius: 10px; background: transparent; color: var(--fg); text-align: left; font: 400 13px/20px var(--font); white-space: nowrap; }
.sl-i.on { background: var(--row-sel); }
.sl-i .c { flex: none; font-weight: 700; font-size: 14px; }
.sl-i .ar { flex: none; display: flex; gap: var(--sp-1); }
.sl-i .d { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; margin-left: var(--sp-1); color: var(--fg-3); font-size: 12.5px; }
@media (max-width: 639px) { .sl-i { height: 44px; } .sl-i .ar { display: none; } }
.sendrow { display: flex; align-items: flex-end; gap: var(--sp-2); padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-4); border: 1px solid transparent; border-radius: 24px; background: var(--layer); }
.sendrow:focus-within { border-color: var(--accent); }
.cbar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-15); min-height: 28px; margin-top: var(--sp-2); padding: 0 var(--sp-1); }
.cchip { display: inline-flex; align-items: center; gap: var(--sp-15); flex: none; height: 26px; max-width: 100%; padding: 0 var(--sp-3); border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--fg-2); font-size: 12.5px; line-height: 16px; font-weight: 500; white-space: nowrap; }
@media (hover: hover) { button.cchip:hover { background: var(--layer); color: var(--fg); } }
.cchip.warn { color: var(--warn); }
/* 360-390px: the chips pull together while the api label shares the row, so the bar keeps fitting without scrolling. */
@media (max-width: 600px) { .cbar.api { gap: var(--sp-05); } .cbar.api .cchip { padding: 0 var(--sp-15); } .cbar.api .cchip.capi { font-size: 10.5px; } }
.cchip.capi::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.cchip.capi { gap: var(--sp-15); height: 20px; padding: 0; border-radius: 0; background: none; color: var(--warn); font-size: 11px; line-height: 16px; font-weight: 600; }
.cchip.err { color: var(--err); }
/* whose model and context the chips show (뙃쥐 or a lane), and a lane's worker model: labels, not buttons */
.cchip.cown { padding: 0 var(--sp-1); opacity: .65; font-weight: 600; }
/* the phone app bar already names the session, and the row has no room for the labels */
@media (max-width: 600px) { .cchip.cown { display: none; } }
.cbar .working { margin: 0; min-height: 26px; flex: 1 1 auto; min-width: 0; flex-wrap: wrap; gap: var(--sp-15); }
.cbar .working #working-tx { color: var(--fg-2); font-weight: 500; font-size: 12.5px; }
/* Unitless line-height (22/14, 24/16 as before) so the line grows with the font under text zoom; a px line-height stayed put and clipped the glyphs.
   The floor is one full line plus the padding, never below it whatever height autosize or an old px style says: em fallback first (same value,
   the line-height is explicit), 1lh where supported. */
.sendrow textarea { --ta-pad: 4px; flex: 1; min-width: 0; resize: none; border: 0; outline: 0; background: transparent; box-sizing: border-box; padding: var(--ta-pad) 0; font-size: 14px; line-height: 1.5714; min-height: calc(1.5714em + 2 * var(--ta-pad)); min-height: calc(1lh + 2 * var(--ta-pad)); max-height: 140px; }
.sendrow textarea::placeholder { color: var(--fg-3); }
.prompt { display: none; }
@media (pointer: coarse) { .sendrow textarea { font-size: 16px; line-height: 1.5; min-height: calc(1.5em + 2 * var(--ta-pad)); min-height: calc(1lh + 2 * var(--ta-pad)); } }
.composer.tmode .sendrow { background: var(--card); }

/* terminal: the same data as a terminal session */
.termbox { position: relative; flex: 1; min-height: 0; margin-bottom: var(--sp-3); }
.term { height: 100%; overflow-y: auto; overflow-x: hidden; padding: 0 0 var(--sp-3); font: 14px/22px var(--font); color: var(--fg); }
.term > * { max-width: var(--col); margin-left: auto; margin-right: auto; }
.term .tmore { display: flex; margin: 0 auto var(--sp-3); }
.term .tdv, .term .lg-note { margin: var(--sp-2) auto; color: var(--fg-3); font-size: 12.5px; line-height: 18px; text-align: center; }/* attachment chips as buttons (md and text open in the reader) and the reader sheet */
button.fatt { border: 0; font: inherit; text-align: left; cursor: pointer; }
/* the reader (15-attachments.js viewer): dialog()'s large card. The file name is its title, on one line; the text reads on white on a phone too, where
   Markdown's grey fills (code, table heads, quotes) would vanish into the sheet's grey */
.tbox .tv-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 639px) { dialog.dlg.fs-card.tbox[open] { background: var(--pop); } }
.tbox .tv-body { color: var(--fg); font-size: 15px; line-height: 26px; overflow-wrap: anywhere; }
.tbox .tv-body:focus { outline: 0; }
.tbox .tv-body p { margin: 0 0 var(--sp-3); }
.tbox .tv-body p.h { margin: var(--sp-5) 0 var(--sp-2); font-size: 17px; line-height: 26px; } .tbox .tv-body p.h:first-child { margin-top: 0; }
.tbox .tv-body ul, .tbox .tv-body ol { margin: 0 0 var(--sp-3); padding-left: var(--sp-6); }
.tbox .tv-body pre { margin: 0; font: 13px/20px var(--mono); white-space: pre-wrap; }
.tbox .tv-body .md pre, .tbox .tv-body > .md pre { margin: var(--sp-2) 0 var(--sp-3); padding: var(--sp-2) var(--sp-3); border-radius: 10px; background: var(--layer); }
.tbox .tv-st { color: var(--fg-3); font-size: 13px; line-height: 20px; }

/* log: one card per turn - header (dot, what was asked, when, how long), answers as text, tool calls folded into one summary row */
.lg { margin-bottom: var(--sp-3); --lg-dot: 8px; padding: var(--sp-4); border-radius: var(--r-card); background: var(--card); }
.lg-h { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.lg-h .dot { width: var(--lg-dot); height: var(--lg-dot); }
.lg-t { flex: 1; min-width: 0; font: 600 15px/22px var(--font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-m { flex: none; color: var(--fg-3); font-size: 12.5px; line-height: 16px; font-variant-numeric: tabular-nums; }
.lg-b { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-2); padding-left: calc(var(--lg-dot) + var(--sp-2)); }
.lg-b:empty { display: none; }
.lg-x .md { font-size: 14.5px; line-height: 24px; }
.lg-x .md p { margin: 0 0 var(--sp-2); } .lg-x .md p:last-child { margin: 0; }
.lg-x .md code { padding: 0 var(--sp-15); border-radius: 5px; background: var(--layer); font-size: .86em; }
.lg-x .md pre { margin: var(--sp-15) 0; padding: var(--sp-2) var(--sp-3); border-radius: 10px; background: var(--layer); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 240px; overflow: auto; font-size: 12.5px; line-height: 19px; }
.lg-n { color: var(--fg-3); font-size: 12.5px; line-height: 18px; }
.lg-q { padding: var(--sp-2) var(--sp-3); border-radius: 10px; background: var(--layer); color: var(--fg-2); font-size: 13px; line-height: 20px; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lg.dim { padding: var(--sp-2) var(--sp-4); background: transparent; }
.lg.dim .lg-t { font-weight: 500; font-size: 13px; color: var(--fg-3); }
.lg.dim .lg-b { display: none; }
.lg-e { color: var(--fg); font-size: 14px; line-height: 22px; }
.lg-e::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 var(--sp-2) var(--sp-05) 0; border-radius: 50%; background: var(--err); vertical-align: middle; }
.lg-e details > summary { display: inline; margin-left: var(--sp-15); color: var(--fg-2); font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; list-style: none; }
.lg-e details > summary::-webkit-details-marker { display: none; }
.lg-e pre, .lr-o pre { margin: var(--sp-15) 0 0; padding: var(--sp-2) var(--sp-3); border-radius: 10px; background: var(--layer); color: var(--fg-2); font: 12px/18px var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 240px; overflow: auto; }
.lr-o pre.err { color: var(--err); }
.ls > summary { display: flex; align-items: center; gap: var(--sp-2); width: fit-content; max-width: 100%; min-height: 30px; padding: 0 var(--sp-3); border-radius: 15px; background: var(--layer); color: var(--fg-2); font-size: 13px; line-height: 20px; cursor: pointer; list-style: none; }
.ls > summary::-webkit-details-marker { display: none; }
.ls > summary::after { content: ""; flex: none; width: 5px; height: 5px; margin-left: var(--sp-05); border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform var(--m-fast) var(--m-ease); }
.ls[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
@media (hover: hover) { .ls > summary:hover { color: var(--fg); } }
.ls-r { display: flex; flex-direction: column; margin-top: var(--sp-15); }
.lr { --lr-k-w: 34px; border-radius: 10px; cursor: pointer; }
@media (hover: hover) { .lr:hover { background: var(--card-hover); } }
.lr-h { display: flex; align-items: center; gap: var(--sp-2); min-height: 34px; padding: 0 var(--sp-2); min-width: 0; }
.lr-k { flex: none; min-width: var(--lr-k-w); color: var(--fg-3); font-size: 12px; font-weight: 600; }
.lr-l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 12.5px/18px var(--mono); color: var(--fg); }
.lr-d { flex: none; color: var(--fg-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.lr .dot { width: 7px; height: 7px; }
.lr-o { display: none; padding: 0 var(--sp-2) var(--sp-2) calc(var(--sp-2) + var(--lr-k-w) + var(--sp-2)); }
.lr.open .lr-o { display: block; }
@media (max-width: 639px) { .lg { padding: var(--sp-3); } .lg-b { padding-left: 0; } .lr-o { padding-left: var(--sp-2); } .lr-k { min-width: 28px; } }
.th, .tt, .tr { display: flex; gap: var(--sp-2); min-width: 0; }
.th b { flex: none; font-weight: 600; }
.th .ti { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--td); }
.tr { margin-left: var(--tl-ind); color: var(--td); }
.tr .rt { min-width: 0; flex: 1; }
.tr .ln { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr .more { opacity: .7; }
.full { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 400px; overflow: auto; font: inherit; }
.tt { margin: var(--sp-2) 0; }
.tt .md { flex: 1; min-width: 0; }
.tdv { margin: var(--sp-3) 0; font-size: 11.5px; line-height: 16px; text-align: center; overflow-wrap: anywhere; }
.tc { margin: var(--sp-15) 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--td); font: inherit; }
.tc.err { color: var(--terr); }
.jump { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); }
.a-div { margin: var(--sp-2) var(--sp-1); font-size: 11px; line-height: 16px; color: var(--fg-3); text-align: center; overflow-wrap: anywhere; }
.a-text { padding: var(--sp-15) var(--sp-2); overflow-wrap: anywhere; }
.a-time { margin-right: var(--sp-2); font-size: 11px; color: var(--fg-3); }
.a-error { margin: var(--sp-1); padding: var(--sp-15) var(--sp-2); border-radius: 6px; background: color-mix(in srgb, var(--err) 12%, transparent); color: var(--err); overflow-wrap: anywhere; }
details.box, details.think { --chev: 5px; --box-ind: calc(var(--sp-2) + var(--chev) + var(--sp-2)); }
details.box { border-radius: 6px; }
details.box > summary { display: flex; align-items: center; gap: var(--sp-2); min-height: 28px; padding: var(--sp-1) var(--sp-2); cursor: pointer; list-style: none; border-radius: 6px; font-size: 13px; line-height: 20px; }
details.box[open] > summary { background: var(--hover); } @media (hover: hover) { details.box > summary:hover { background: var(--hover); } }
details.box > summary::-webkit-details-marker { display: none; }
details.box > summary::before { content: ""; flex: none; width: var(--chev); height: var(--chev); border-right: 1.5px solid var(--fg-3); border-bottom: 1.5px solid var(--fg-3); transform: rotate(-45deg); transition: transform var(--m-fast) var(--m-ease); }
details.box[open] > summary::before { transform: rotate(45deg); }
.tname { flex: none; font: 500 12px/20px var(--mono); color: var(--fg); }
.tsum { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-2); }
.tsum:empty { display: none; }
.ttime { flex: none; font-size: 11px; color: var(--fg-3); }
details.box .body { padding: var(--sp-1) var(--sp-2) var(--sp-2) var(--box-ind); }
details.box .cl { margin: var(--sp-2) 0 0; font: 500 11px/16px var(--font); color: var(--fg-3); }
details.box .cl:first-child { margin-top: 0; }
details.box .cl.err { color: var(--err); }
details.think > summary .tname { font-family: var(--font); color: var(--fg-2); }
details.think .md { padding: var(--sp-1) var(--sp-2) var(--sp-2) var(--box-ind); color: var(--fg-2); font-size: 12px; }
.subline { display: flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-3); padding: var(--sp-1) var(--sp-2); border-radius: 6px; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); font-size: 12px; line-height: 16px; cursor: pointer; }
.subs { flex: none; margin-bottom: var(--sp-3); border: 0; border-radius: 8px; background: var(--card); overflow: hidden; }
.subsum { display: flex; align-items: center; gap: var(--sp-2); width: 100%; min-height: 32px; padding: var(--sp-1) var(--sp-3); border: 0; background: transparent; color: var(--fg-2); font-size: 12.5px; line-height: 20px; text-align: left; }
@media (hover: hover) { .subsum:hover { background: var(--hover); color: var(--fg); } }
.subsum .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subsum .chev { width: 14px; height: 14px; color: var(--fg-3); transition: transform var(--m-fast) var(--m-ease); }
.subsum[aria-expanded="true"] .chev { transform: rotate(180deg); }
.subrow { display: flex; align-items: center; gap: var(--sp-3); width: 100%; min-height: var(--row-h); padding: var(--sp-15) var(--sp-2); border: 0; border-radius: var(--r-ctl); background: transparent; font-size: 13px; line-height: 20px; text-align: left; }
.subrow .nm { display: flex; flex-direction: column; }
.subrow .nm b { font-size: 14px; line-height: 22px; }
.subrow .muted { color: var(--fg-3); font-size: 12.5px; line-height: 18px; overflow: hidden; text-overflow: ellipsis; }
.subrow .cc2-tm { flex: none; align-self: flex-start; margin-top: 3px; /* nudge: puts the 12px time on the baseline of the 20px first text line */ color: var(--fg-3); font-size: 12px; line-height: 16px; font-variant-numeric: tabular-nums; }
@media (hover: hover) { .subrow:hover { background: var(--hover); } }
.subrow .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subrow .chev { width: 14px; height: 14px; color: var(--fg-3); }
.subrow.off .nm { color: var(--fg-2); }
.subrow b { font-weight: 500; }
.sheet { position: fixed; z-index: 900; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; width: min(var(--sheet-w), 100vw); border-left: 1px solid var(--line-2); background: var(--bg); box-shadow: -8px 0 24px rgb(0 0 0 / .12); }
.sh-head { flex: none; display: flex; align-items: center; gap: var(--sp-2); height: calc(48px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) var(--sp-2) 0 var(--sp-4); border-bottom: 1px solid var(--line); }
.sh-t { flex: 1; min-width: 0; }
.sh-name { font: 600 var(--fs-card)/var(--lh-card) var(--font); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-t .sup { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-body { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: var(--sp-4); }
.sh-body:not(.term) > * + * { margin-top: var(--sp-1); }
.sh-body.term { height: auto; padding: var(--sp-3) var(--sp-4); border: 0; border-radius: 0; }
@media (max-width: 639px) { .sheet { width: 100vw; border-left: 0; } .sh-body { padding: var(--sp-3); } }
.tl-in > .a-div { margin: 0; }
/* 채팅 대화 (시제품 proto .cv .tl): 흰 대화 카드의 폭을 다 쓰고 좌우 16px, 메시지 사이는 14px로 한 호흡씩 읽어요.
   타임라인의 8px 홈은 알림 강조 테두리 자리라 남기고, 왼쪽 여백만 24px로 주어 카드 안 16px에 서요. */
:is(#v-chat, .pane-chat) .timeline { padding: var(--sp-1) var(--sp-6) var(--sp-3); }
:is(#v-chat #tl, .pane-chat .tl-in) { max-width: none; gap: var(--sp-3); padding: var(--sp-1) 0 var(--sp-3); }
:is(#v-chat #tl, .pane-chat .tl-in) .um, :is(#v-chat #tl, .pane-chat .tl-in) .bm { margin-top: 0; }
:is(#v-chat #tl, .pane-chat .tl-in) .um.cont { margin-top: 0; }

/* home: '답 필요' and '지금 진행 중' lists as one card per kind (docs/ui-spec.md 홈 상태 카드): the head sits inside the card's top edge,
   every row is a 48px two-line row, and the count/status word is small grey text, never another tag. */
.hn-h { display: flex; align-items: center; gap: var(--sp-2); margin: var(--sp-3) 0 0; padding: var(--sp-3) var(--row-px) var(--sp-05); border-radius: var(--r-card) var(--r-card) 0 0; background: var(--card); }
.hn-h:first-child { margin-top: 0; }
.hn-h h2 { margin: 0; font: 600 var(--fs-card)/var(--lh-card) var(--font); letter-spacing: -.01em; }
.hn-h .sup { margin-left: auto; color: var(--fg-3); font-size: var(--fs-meta); line-height: var(--lh-meta); }
.hn + .hn-h { margin-top: var(--sp-3); }
.hn { border-radius: 0 0 var(--r-card) var(--r-card); background: var(--card); overflow: hidden; }
/* A one-line state has no row to trim, and its text can sit in the box's rounded corner: nothing clips it. */
.hn:has(> .hc-none) { overflow: visible; }
/* A home list past six rows scrolls inside its card, with no scrollbar (08-home.js capLists sets the height of six rows); six or fewer change nothing. */
.list-cap { position: relative; overflow: hidden auto; overscroll-behavior: contain; scrollbar-width: none; }
.list-cap::-webkit-scrollbar { display: none; }
.list-cap > * { flex: none; }
/* Rows far below the fold are not painted until they scroll near, so a list of hundreds costs what six do. */
.list-cap > :nth-child(n+13) { content-visibility: auto; contain-intrinsic-block-size: auto var(--row-h); }
/* These rows hang out of their list by the hover plate's inset: the scroll box makes room for it. */
.hc-list.list-cap, .glist.list-cap { margin-inline: calc(var(--sp-15) * -1); padding-inline: var(--sp-15); }
/* More rows below: the list's last line fades, and the fade leaves at the end of the scroll. Where scroll timelines are missing, the header's count says it. */
@property --hn-fade { syntax: "<length>"; inherits: false; initial-value: 0px; }
@keyframes hn-end { from, 80% { --hn-fade: var(--sp-8); } to { --hn-fade: 0px; } }
@supports (animation-timeline: scroll()) {
  .list-cap { -webkit-mask-image: linear-gradient(to top, transparent, #000 var(--hn-fade)); mask-image: linear-gradient(to top, transparent, #000 var(--hn-fade)); animation: hn-end linear both; animation-timeline: scroll(self); }
}
.hr { --hr-dot: 8px; display: flex; align-items: center; gap: var(--sp-3); width: 100%; min-height: 48px; padding: var(--sp-2) var(--row-px); border: 0; background: transparent; color: inherit; text-align: left; }
.hr + .hr { border-top: 1px solid var(--line); }

@media (hover: hover) { .hr.st:hover { background: transparent; } }
@media (hover: hover) { .hr:hover { background: var(--card-hover); } }
.hr .dot { width: var(--hr-dot); height: var(--hr-dot); }
.hr .hq { flex: none; min-width: var(--sp-3); text-align: center; color: var(--fg-2); font-size: var(--fs-meta); line-height: var(--lh-meta); font-weight: 500; font-variant-numeric: tabular-nums; }
.hr .hb { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-05); }
.hr .hn1 { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; font: 500 var(--fs-row)/var(--lh-row) var(--font); }
.hr .hn1 .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hr.un .hn1 { font-weight: 600; }
.hr .ha { min-width: 0; color: var(--fg-2); font-size: var(--fs-meta); line-height: var(--lh-meta); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hr .ha:empty { display: none; }
.hr .hp { flex: none; color: var(--fg-3); font-size: var(--fs-meta); line-height: var(--lh-meta); font-variant-numeric: tabular-nums; }
.hr .hs { flex: none; min-width: 44px; text-align: right; color: var(--fg-2); font-size: var(--fs-meta); line-height: var(--lh-meta); font-weight: 500; }
.hr .hs.pri { display: flex; align-items: center; justify-content: flex-end; gap: var(--sp-15); color: var(--accent); }
.hr .hs.pri::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }   /* the word keeps its color; the dot is the tag pattern */
.hr .hs.warn { color: var(--warn); } .hr .hs.err { color: var(--err); }
/* a session row (sessionRow in 18-lanes.js): the parent project leads the second line, the activity trails it */
.hr .ha:has(.sproj) { display: flex; align-items: baseline; gap: var(--sp-15); }
.hr .sproj { flex: 0 1 auto; min-width: 0; max-width: 60%; overflow: hidden; text-overflow: ellipsis; color: var(--fg); font-weight: 500; }
.hr .sproj.none { color: var(--fg-3); font-weight: 400; }
.hr .sline { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--fg-3); }
.hr .sproj + .sline::before { content: "·"; margin-right: var(--sp-15); }
.srows .hr + .li, .srows .li + .hr { box-shadow: inset 0 1px 0 var(--line); }
/* 답변 필요 (09-needs-you.js): a critical row's dot is the error ink; 더 보기 is the list's last row, full width */
.hr .dot.att.err { background: var(--err); }
#home-sec { margin-top: var(--sp-6); }

/* lanes board */
/* board: free-form 12-column card grid shared by 홈 and 레인 (positions are calc() of the container width, so no JS layout pass is needed) */
.bbar { display: flex; justify-content: flex-end; gap: var(--sp-1); margin-bottom: var(--sp-2); }
@media (pointer: coarse) { .bbar { margin-bottom: var(--sp-1); } }
.board { position: relative; }
.bi { position: absolute; border-radius: 8px; transition: left var(--m-base) var(--m-ease), top var(--m-base) var(--m-ease), width var(--m-base) var(--m-ease), height var(--m-base) var(--m-ease), box-shadow var(--m-fast) var(--m-ease); }
.bi > .card { overflow: hidden auto; }
.bi.bdrag { box-shadow: var(--float); } @media (hover: hover) { .bi:hover { box-shadow: var(--float); } }
.bi.fit > .card { height: auto; overflow: visible; }
.bi.fit .brz.s, .bi.fit .brz.se { display: none; }
.board.bnt .bi { transition: none; }
.bi.bdrag { z-index: 6; transition: box-shadow var(--m-fast) var(--m-ease); }
/* a finger resting on a card before the long press: no text selection or callout while it waits; the lifted card shows at once */
.bi.bpress, .bi.bpress * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.board.narrow .bi { transition: transform var(--m-base) var(--m-ease), box-shadow var(--m-fast) var(--m-ease); }
.board.narrow .bi.bdrag { transition: box-shadow var(--m-fast) var(--m-ease); transform-origin: center; }
.board.narrow .bi.bdrag > .card { background: var(--card-hover); }
@media (prefers-reduced-motion: reduce) { .bi, .board.narrow .bi, .bph { transition: none; } }
.bph { position: absolute; border: 1.5px dashed var(--accent); border-radius: 8px; background: color-mix(in srgb, var(--accent) 9%, transparent); transition: left var(--m-fast) var(--m-ease), top var(--m-fast) var(--m-ease), width var(--m-fast) var(--m-ease), height var(--m-fast) var(--m-ease); pointer-events: none; }
.boarding { user-select: none; -webkit-user-select: none; }
.board:not(.narrow) .bhead { cursor: grab; touch-action: none; }
.board:not(.narrow) .bi.bdrag .bhead { cursor: grabbing; }
.board .card { padding: var(--sp-3) var(--sp-4); }
.board .ch { margin-bottom: var(--sp-2); }
.board .ch .ib { width: 24px; height: 24px; }
/* the same glyph, a finger-sized hit area: 40px on a touch screen, sitting in the header's own margin */
@media (pointer: coarse) { .board .ch .ib { width: 40px; height: 40px; margin: calc(var(--sp-5) / -2) calc(var(--sp-5) / -2) calc(var(--sp-5) / -2) calc(var(--sp-1) * -1); } }
.brz { position: absolute; z-index: 3; touch-action: none; }
.brz.se { right: 0; bottom: 0; width: 14px; height: 14px; cursor: nwse-resize; }
.brz.se::after { content: ""; position: absolute; right: 3px; bottom: 3px; width: 7px; height: 7px; border-right: 2px solid var(--fg-3); border-bottom: 2px solid var(--fg-3); border-bottom-right-radius: 3px; opacity: .35; transition: opacity var(--m-fast) var(--m-ease); }
.bi.bdrag .brz.se::after { opacity: .9; } @media (hover: hover) { .bi:hover .brz.se::after, .brz.se:hover::after { opacity: .9; } }
.brz.e { top: 14px; bottom: 16px; right: -3px; width: 8px; cursor: ew-resize; }
.brz.s { left: 14px; right: 16px; bottom: -3px; height: 8px; cursor: ns-resize; }
.board.narrow .brz { display: none; }
/* 세션 and 프로젝트 tabs: a column of chat-list rows (10-conversations.css) */
#v-projects { max-width: 640px; }

.board.narrow { display: flex; flex-direction: column; gap: var(--sp-3); }
.board.narrow .bi { position: relative; }
.board.narrow .bi > .card { height: auto; overflow: visible; }
.board.narrow .bhead { cursor: grab; }
.board.narrow .bi.bdrag .bhead { cursor: grabbing; }
.bi > .card { width: 100%; height: 100%; }
.card.att { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); background: color-mix(in srgb, var(--warn) 8%, var(--card)); }
.card.att.err { border-color: color-mix(in srgb, var(--err) 55%, var(--line)); background: color-mix(in srgb, var(--err) 8%, var(--card)); }
@media (hover: hover) { .card.tap.att:hover { border-color: color-mix(in srgb, var(--warn) 75%, var(--line)); background: color-mix(in srgb, var(--warn) 14%, var(--card)); } }
@media (hover: hover) { .card.tap.att.err:hover { border-color: color-mix(in srgb, var(--err) 75%, var(--line)); background: color-mix(in srgb, var(--err) 14%, var(--card)); } }
.card .subline { margin-top: var(--sp-15); }
.card .clamp { margin-top: var(--sp-15); }
/* bundle card: one row per item, each row opens the item and has its own ⋯ */
.glist { display: flex; flex-direction: column; gap: var(--sp-05); }
.grow { display: flex; align-items: center; gap: var(--sp-15); min-width: 0; margin: 0 calc(var(--sp-15) * -1); padding: var(--sp-1) var(--sp-1) var(--sp-1) var(--sp-15); border-radius: 6px; cursor: pointer; }
@media (hover: hover) { .grow:hover { background: var(--hover); } }
.grow .gm { flex: 1; min-width: 0; }
.grow .gm .bar { margin-top: var(--sp-15); }
.grow .kv .k { font: 400 14px/20px var(--font); }
.grow .kv .v { max-width: none; color: var(--fg); font: 500 14px/20px var(--font); }
.kv .k .dot { display: inline-block; margin-right: var(--sp-15); vertical-align: 1px; }
.board .bar, .board .bar.warn, .board .bar.err { --bar: var(--fg-2); }
.grow > .ib { flex: none; width: 24px; height: 24px; opacity: 0; }
.grow:focus-within > .ib, .grow > .ib[aria-expanded="true"] { opacity: 1; } @media (hover: hover) { .grow:hover > .ib { opacity: 1; } }
@media (hover: none) { .grow > .ib { opacity: 1; } }
@media (pointer: coarse) { .brz.e, .brz.s { display: none; } .brz.se { width: 24px; height: 24px; } .brz.se::after { right: 6px; bottom: 6px; } }
/* markdown has block children (lists, code), so a line clamp would cut through a line: cap the height and fade a long report */
.lr { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; min-height: 26px; padding: 0 var(--sp-3); }
@media (hover: hover) { .lr:hover { background: var(--hover); } }
.lr .lt { flex: none; color: var(--fg-3); font-size: 11px; }
.lr .lb { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr .tn { font-weight: 600; }
.lr .ts { color: var(--fg-2); }
.lr .st { flex: none; color: var(--fg-3); }
.lr .st.ok { color: var(--ok); } .lr .st.bad { color: var(--err); }
.lr.tx .lb { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; font-family: var(--font); font-size: 12.5px; }
.lr.dv, .lr.th { color: var(--fg-3); }
.lr.er .lb { color: var(--err); }
@media (max-width: 599px) {
  .lr.tx .lb { -webkit-line-clamp: 1; }
}
/* 구성: 프로젝트 (작업 채널·홈 채널에 묶인 레인 카드를 나란히; 카드를 누르면 그 프로젝트만의 지도) */
.pj { margin-top: var(--sp-6); }
.pj-hd { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); margin-bottom: var(--sp-2); }
.pj-hd .t { font: 600 15px/22px var(--font); }
.pj-hd .sup { flex: 1 1 260px; min-width: 0; }
.pj-lg { display: inline-flex; align-items: center; flex-wrap: wrap; gap: var(--sp-1) var(--sp-15); color: var(--fg-3); font-size: 11.5px; }
.pj-row { display: flex; align-items: stretch; gap: var(--sp-3); overflow-x: auto; padding: var(--sp-05) var(--sp-05) var(--sp-3); }
.pj-card { flex: 0 0 340px; box-sizing: border-box; display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; padding: var(--sp-4); border-radius: var(--r-card); background: var(--card); color: var(--fg); text-align: left; cursor: pointer; }
@media (hover: hover) { .pj-card:hover { background: var(--card-hover); } }
.pj-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pj-top { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-1) var(--sp-2); min-width: 0; }
.pj-nm { flex: 1 1 8em; min-width: 0; font: 600 15px/22px var(--font); letter-spacing: -.01em; overflow-wrap: anywhere; }
.pj-chs { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.pj-tg { display: inline-flex; align-items: center; gap: var(--sp-15); max-width: 100%; min-height: 24px; padding: 0 var(--sp-3); border-radius: 12px; background: var(--layer); color: var(--fg-2); font: 500 11.5px/16px var(--font); overflow-wrap: anywhere; }
.pj-tg .kd { color: var(--fg-3); font-weight: 400; }
/* the project's folder: one short line (pathCopy + shortPath), the full path in the title, a tap copies it */
.pj-cwd { display: block; max-width: 100%; padding: 0; border: 0; background: none; color: var(--fg-3); font: 400 12px/18px var(--font); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: copy; }
@media (hover: hover) { .pj-cwd:hover { color: var(--fg-2); } }
.pj-fs { display: flex; flex-direction: column; gap: var(--sp-05); padding: var(--sp-2) var(--sp-3); border-radius: 8px; background: var(--layer); }
.pj-f { display: flex; align-items: baseline; gap: var(--sp-2); min-width: 0; font-size: 12.5px; line-height: 20px; }
.pj-f .k { flex: none; width: 104px; color: var(--fg-3); font-size: 11.5px; } /* fits 서브에이전트 모델 on one line */
.pj-f .v { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-05) var(--sp-15); overflow-wrap: anywhere; }
.pj-f .dim, .pj-sc .tx.dim { color: var(--fg-3); }
.pj-f .was { color: var(--fg-3); text-decoration: line-through; }
.pj-f .ar { color: var(--mine); }
.pj-f.diff .v b { color: var(--mine); font-weight: 500; }
.pj-f .bd { align-self: center; }
.pj-g { color: var(--fg-3); font-size: 11px; }
.pj-sc { display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; }
.pj-sc .cl { color: var(--fg-3); font: 500 11px/16px var(--font); }
.pj-sc .tx { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--fg-2); font-size: 12px; line-height: 18px; overflow-wrap: anywhere; }
.pj-bk { flex: 1 1 100%; display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-15) var(--sp-2); }
.pj-title { display: inline-flex; align-items: center; flex-wrap: wrap; gap: var(--sp-1) var(--sp-2); font: 600 15px/22px var(--font); }
@media (max-width: 639px) {
  .pj-row { flex-direction: column; overflow-x: visible; padding-bottom: 0; }
  .pj-card { flex: none; width: 100%; }
}
/* 구성: harness map */
#v-harness { max-width: none; }
.hm-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-3); }
.hm-bar .sup { flex: 1 1 260px; min-width: 0; }
.hm-scroll { overflow-x: auto; padding: 0 0 var(--sp-2); }
.hm-canvas { position: relative; margin: 0 auto; }
.hm-svg { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.hm-edge { fill: none; stroke: color-mix(in srgb, var(--fg-3) 55%, transparent); stroke-width: 1.4; }
.hm-edge.sup { stroke-dasharray: 4 3; }
.hm-edge.hot { stroke: var(--accent); stroke-width: 1.8; }
.hm-ah { fill: color-mix(in srgb, var(--fg-3) 70%, transparent); }
.hm-ah.hot { fill: var(--accent); }
.hm-lb { fill: var(--accent); font: 500 10.5px var(--font); stroke: var(--bg); stroke-width: 4px; paint-order: stroke; opacity: 0; transition: opacity var(--m-fast) var(--m-ease); }
.hm-lb.hot { opacity: 1; }
.hm-ch { position: absolute; top: 0; height: 18px; color: var(--fg-3); font: 500 11px/18px var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-n { position: absolute; display: flex; flex-direction: column; justify-content: center; gap: var(--sp-05); min-width: 0; padding: var(--sp-15) var(--sp-3); border: 1px solid var(--line-2); border-radius: 8px; background: var(--card); text-align: left; }
@media (hover: hover) { .hm-n:hover { background: var(--hover); border-color: var(--fg-3); } }
.hm-n.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.hm-n.sup { border-style: dashed; background: var(--bg); }
@media (hover: hover) { .hm-n.sup:hover { background: var(--hover); } }
.hm-n .t { display: flex; align-items: center; gap: var(--sp-15); min-width: 0; font: 600 12.5px/18px var(--font); letter-spacing: -.01em; }
.hm-n .t .ic { width: 14px; height: 14px; color: var(--fg-3); }
.hm-n .l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-n .s, .hm-n .lk { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--fg-2); font-size: 11.5px; line-height: 15px; overflow-wrap: anywhere; }
.hm-n .lk { color: var(--fg-3); font-size: 11px; }
.hm-n.m { position: static; width: 100%; height: auto; min-height: 48px; padding: var(--sp-2) var(--sp-3); }
.hm-flow .sec { margin: var(--sp-4) 0 var(--sp-2); }
.hm-flow .sec:first-child { margin-top: 0; }
.hm-stack { display: flex; flex-direction: column; gap: var(--sp-2); }
.hm-down { display: flex; align-items: center; justify-content: center; gap: var(--sp-15); margin: var(--sp-3) 0 0; color: var(--fg-3); font-size: 11.5px; line-height: 16px; }
.hm-down .ic { width: 14px; height: 14px; }

/* a task row stays quiet while it runs (no pulsing dot) and, once finished, carries its result file as a chip under the row (08-home.js workRow) */
.hr.hrx { flex-wrap: wrap; }
.hrx-m:has(+ .hrx-f) { padding-right: var(--sp-4); }
.hrx-f { flex: 0 0 100%; display: flex; flex-wrap: wrap; gap: var(--sp-15); min-width: 0; padding: 0 var(--sp-4) var(--sp-2) calc(var(--row-px) + var(--hr-dot) + var(--sp-3)); }
.hrx-f .fatt { height: auto; min-height: 44px; max-width: 100%; text-decoration: none; cursor: pointer; }
@media (hover: hover) { .hrx-f .fatt:hover { background: var(--hover); } }
/* the same chips under a list row (project 완료 / 결과) start where its text starts, and inside a home notice row under its text */
.li-res > .hrx-f { padding-left: calc(var(--row-px) + var(--sp-4) + var(--sp-3)); }
.li-res > .li:not(:has(> .lead)) + .hrx-f { padding-left: var(--row-px); }
/* a notice row's chips take a line of their own across the row (not the narrow text column), so they sit side by side as under a task row;
   order keeps the row's ::after spacer on its first line, and the 16px start is the 8px dot plus the row gap */
.hc-row:has(.hrx-f) { flex-wrap: wrap; row-gap: 0; }
.hc-row .hrx-f { order: 1; padding: var(--sp-1) 0 0 var(--sp-4); }
/* 홈's finished rows carry only their result count (08-home.js resultMarker): grey meta text with the clip, as quiet as the row's 완료 and time; it
   puts the chips above under the row. Its padding is the tap area and does not make the row taller. */
.hrx-n { flex: none; display: inline-flex; align-items: center; gap: var(--sp-1); margin-block: calc(var(--sp-1) * -1); padding: var(--sp-1) var(--sp-15); border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--fg-2); font: 500 var(--fs-meta)/var(--lh-meta) var(--font); cursor: pointer; }
.hrx-n .ic { width: 14px; height: 14px; }
.hrx-n[aria-expanded="true"] { background: var(--hover); color: var(--fg); } @media (hover: hover) { .hrx-n:hover { background: var(--hover); color: var(--fg); } }
.hrx-n:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* the marker comes before the row's 완료 or time, which keep their column at the row's end; a finished row's state word left its tap area for it
   (08-home.js markerFirst), so it keeps the row's end inset and the same 4px from the marker it had */
.hr.hrx > .hrx-n:has(+ .hs) { margin-right: var(--sp-1); }
.hr.hrx > .hs { margin-right: var(--sp-4); cursor: pointer; }

/* 구성: simple map = the main line as a responsive flow of stage cards (3 columns from 1200px, 2 from 700px, one stacked
   column below). Each card: an optional "<previous>에서 · <label>" line, a header (step number, title, count) and one inner list
   that scrolls by itself past --hm-list-h, so the page never scrolls sideways. The chevron connector sits in the grid gap:
   right-pointing between neighbours in a row, down-pointing at the start of a new row and in the stacked column. */
#harness { --hm-gap: 28px; --hm-list-h: 264px; }
.hm-simple { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--hm-gap); align-items: start; }
/* toolbar: tonal buttons sit on the gray canvas here, so they take the card fill to stay visible */
.hm-bar > .btn.tonal { background: var(--card); }
@media (hover: hover) { .hm-bar > .btn.tonal:hover { background: var(--card-hover); } }
.hm-st { position: relative; display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; padding: var(--sp-5); border-radius: var(--r-card); background: var(--card); }
.hm-st.one { cursor: pointer; }
@media (hover: hover) { .hm-st.one:hover { background: var(--card-hover); } }
.hm-st.on { background: var(--active); }
.hm-st.rel { background: var(--card-hover); }
.hm-row.rel { background: var(--card-hover); }
.hm-chip.rel { background: var(--hover); color: var(--fg); }
.hm-ar { position: absolute; top: 20px; left: calc(var(--hm-gap) / -2); display: grid; place-items: center; --hm-ar: 22px; --hm-ar-h: calc(var(--hm-ar) / -2); width: var(--hm-ar); height: var(--hm-ar); margin-left: var(--hm-ar-h); border-radius: 50%; background: var(--card); color: var(--fg-3); box-shadow: 0 0 0 4px var(--bg); pointer-events: none; }
.hm-ar .ic { width: 14px; height: 14px; stroke-width: 2; }
.hm-from { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 var(--sp-15); min-width: 0; margin: calc(var(--sp-1) * -1) 0 calc(var(--sp-1) * -1); color: var(--fg-3); font: 400 12px/16px var(--font); word-break: keep-all; overflow-wrap: anywhere; }
.hm-from b { color: var(--fg-2); font-weight: 500; }
.hm-from b::before { content: "·"; margin-right: var(--sp-15); color: var(--fg-3); font-weight: 400; }
.hm-sh { display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; }
button.hm-sh { cursor: pointer; }
.hm-sh .t { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-1) var(--sp-2); min-width: 0; font: 600 16px/22px var(--font); letter-spacing: -.01em; }
.hm-sh .l { min-width: 0; word-break: keep-all; overflow-wrap: anywhere; }
.hm-sh .s { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--fg-2); font-size: 13px; line-height: 19px; word-break: keep-all; overflow-wrap: anywhere; }
.hm-no { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--layer); color: var(--fg-2); font: 600 var(--fs-meta)/var(--lh-meta) var(--font); letter-spacing: 0; }
.hm-ct { margin-left: auto; font-variant-numeric: tabular-nums; }
.hm-list { display: flex; flex-direction: column; gap: var(--sp-3); min-height: 0; max-height: var(--hm-list-h); margin: 0 calc(var(--sp-2) * -1); padding: 0 var(--sp-2) var(--sp-05); overflow-y: auto; overscroll-behavior: contain; }
.hm-list.fix { height: var(--hm-list-h); }
.hm-rows { display: flex; flex-direction: column; gap: var(--sp-05); margin: 0 calc(var(--sp-3) * -1); }
.hm-row { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; min-height: 44px; padding: var(--sp-15) var(--sp-3); border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--fg); text-align: left; }
@media (hover: hover) { .hm-row:hover { background: var(--card-hover); } }
.hm-row.on { background: var(--active); }
.hm-row .dot { flex: none; }
.hm-row .tx { flex: 1 1 0; display: flex; flex-direction: column; gap: var(--sp-05); min-width: 0; }
.hm-row .l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 14px/20px var(--font); }
.hm-row .s { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-3); font: 400 12px/16px var(--font); }
.hm-with { display: flex; flex-direction: column; gap: var(--sp-2); }
.hm-rows + .hm-with { padding-top: var(--sp-2); }
.hm-with .wl { color: var(--fg-3); font: 500 12px/16px var(--font); }
.hm-chips { display: flex; flex-wrap: wrap; gap: var(--sp-15); }
.hm-chip { display: inline-flex; align-items: center; gap: var(--sp-15); min-width: 0; max-width: 100%; min-height: 28px; padding: var(--sp-05) var(--sp-3); border: 0; border-radius: var(--r-ctl); background: var(--layer); color: var(--fg-2); font: 500 12px/16px var(--font); }
@media (hover: hover) { .hm-chip:hover { background: var(--hover); color: var(--fg); } }
.hm-chip.on { background: var(--active); color: var(--fg); }
.hm-chip.warn { background: color-mix(in srgb, var(--warn) 12%, var(--layer)); color: var(--warn); }
.hm-chip.err { background: color-mix(in srgb, var(--err) 12%, var(--layer)); color: var(--err); }
.hm-chip.off { opacity: .65; }
.hm-chip .dot { flex: none; }
.hm-chip .l { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-chip .hm-bd { margin: 0; gap: var(--sp-05); flex-wrap: nowrap; }
.hm-chip .bd { height: 14px; padding: 0 var(--sp-1); font-size: 10px; line-height: 12px; }
.hm-ov { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 2; }
/* connectors: the first card of every row turns its chevron down and moves it into the row gap above */
.hm-simple > .hm-st:nth-of-type(3n+1) > .hm-ar { top: calc(var(--hm-gap) / -2); left: 32px; margin: var(--hm-ar-h) 0 0 var(--hm-ar-h); transform: rotate(90deg); }
@media (max-width: 1199px) {
  .hm-simple { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-simple > .hm-st:nth-of-type(3n+1) > .hm-ar { top: 20px; left: calc(var(--hm-gap) / -2); margin: 0 0 0 var(--hm-ar-h); transform: none; }
  .hm-simple > .hm-st:nth-of-type(2n+1) > .hm-ar { top: calc(var(--hm-gap) / -2); left: 32px; margin: var(--hm-ar-h) 0 0 var(--hm-ar-h); transform: rotate(90deg); }
}
@media (max-width: 699px) {
  #harness { --hm-gap: 32px; --hm-list-h: 300px; }
  .hm-simple { grid-template-columns: minmax(0, 1fr); }
  .hm-st { padding: var(--sp-4); }
  /* toolbar: the view switch takes a row of its own, the three buttons share the next one */
  #harness .hm-bar > .seg { flex: 1 1 100%; }
  #harness .hm-bar > .seg button { flex: 1 1 0; }
  #harness .hm-bar > .btn { flex: 1 1 0; padding: 0 var(--sp-3); }
  #harness .hm-bar > .btn[data-hm-refresh] { flex: none; }
  .hm-simple > .hm-st > .hm-ar, .hm-simple > .hm-st:nth-of-type(n) > .hm-ar { top: calc(var(--hm-gap) / -2); left: 32px; margin: var(--hm-ar-h) 0 0 var(--hm-ar-h); transform: rotate(90deg); }
  /* the vertical connector: a hairline through the gap behind the chevron */
  .hm-simple > .hm-st + .hm-st::before { content: ""; position: absolute; top: calc(var(--hm-gap) * -1); left: 31px; width: 2px; height: var(--hm-gap); background: var(--line-2); }
}
.hs-desc { margin: 0; color: var(--fg-2); font-size: 12.5px; line-height: 20px; overflow-wrap: anywhere; }
.sh-body .sec { margin: var(--sp-5) 0 var(--sp-2); }
.hs-facts { border-radius: var(--r-ctl); background: var(--layer); }
.hs-fact { display: flex; gap: var(--sp-3); padding: var(--sp-2) var(--sp-4); font-size: 12.5px; line-height: 19px; }
.hs-fact + .hs-fact { border-top: 1px solid var(--line); }
.hs-fact .k { flex: none; width: 92px; color: var(--fg-2); overflow-wrap: anywhere; }
.hs-fact .v { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.hs-set { padding: var(--sp-3) var(--sp-4); border-radius: var(--r-ctl); background: var(--layer); }
.hs-set + .hs-set { margin-top: var(--sp-2); }
.hs-set .top { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.hs-set .lb { flex: 1; min-width: 0; font: 500 13px/20px var(--font); overflow-wrap: anywhere; }
.hs-set .ctl { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.hs-set .ctl .fi, .hs-set .ctl .sel { flex: 1; min-width: 0; }
.hs-set .unit { flex: none; color: var(--fg-3); font-size: 12px; }
.hs-act { justify-content: flex-end; margin-top: var(--sp-2); }
.hs-ro { font-size: 13px; color: var(--fg-2); }
.note { margin-top: var(--sp-15); color: var(--fg-3); font-size: 11.5px; line-height: 16px; overflow-wrap: anywhere; }
.note:empty { display: none; }
.note.ok { color: var(--ok); }
.note.err { color: var(--err); }
textarea.fi { display: block; height: auto; padding: var(--sp-2) var(--sp-3); line-height: 18px; resize: vertical; }
textarea.hs-ta { resize: none; }
.hs-fw > .err-t { margin: var(--sp-2) 0 0; }
.hs-fw > .err-t:empty { display: none; }
.hs-mono { font: 12px/18px var(--mono); min-height: 280px; }
.hs-sw { position: relative; flex: none; width: 36px; height: 20px; padding: 0; border: 0; border-radius: 10px; background: var(--track); }
.hs-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .3); transition: transform var(--m-base) var(--m-ease); }
.hs-sw[aria-checked="true"] { background: var(--accent); }
.hs-sw[aria-checked="true"]::after { transform: translateX(16px); }
.dcs-form { flex-direction: column; align-items: stretch; gap: var(--sp-3); }
.dcs-acts { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.dcs-err { color: var(--err); font-size: 13px; line-height: 20px; }
.dcs-saved { align-self: flex-start; }
.ms-copy { display: flex; gap: var(--sp-2); }
.ms-copy .fi { flex: 1; min-width: 0; }
.ms-addrow .tx { min-width: 0; }
/* a status dot as a row's lead takes the 16px icon column (dot 8 + 4 + 4) */
.li .lead > .dot { margin: 0 var(--sp-1); }
.ms-link { color: var(--accent); font-size: 13px; line-height: 20px; overflow-wrap: anywhere; }
/* a save button keeps its width while its label swaps to the longest one (저장 -> 저장했어요) */
:is([data-ms-save], [data-wa-save]) { min-width: 104px; }
/* a row whose control is wider than half the screen puts it under the text on a phone */
@media (max-width: 639px) { .li.li-wrap { flex-wrap: wrap; } .li.li-wrap > .li-end { margin-left: 0; flex-basis: 100%; } }
#webaccess .dcs-form > div > :is(.sup, .dcs-saved) { margin-top: var(--sp-15); }
.dcs-res { display: flex; flex-direction: column; gap: var(--sp-15); font-size: 14px; line-height: 20px; }
.dcs-res.err { color: var(--err); }
.dcs-ok { color: var(--ok); font-weight: 600; }
.dcs-res .btn { align-self: flex-start; margin-top: var(--sp-15); }
.dv-code { font: 600 32px/40px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 6px; }
/* black on white in both themes: phone cameras read a light-on-dark code badly */
.dv-qr { display: block; width: min(220px, 100%); height: auto; }
.dv-qr-bg { fill: #fff; }
.dv-qr-ink { fill: #000; }
/* settings: 업데이트 */
.sec .upd-new { margin-left: var(--sp-2); vertical-align: middle; }
/* a section heading with its own action (실행 하네스 · 확인): the button sits at the right end, apart from the title */
.sec.sec-act { display: flex; align-items: center; gap: var(--sp-2); }
.sec.sec-act .upd-new { margin-left: 0; }
.sec.sec-act > .btn { margin-left: auto; }
.upd-box { padding: var(--sp-3) var(--sp-4) var(--sp-3) var(--lead-ind); display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.upd-box .hd { font-size: 14px; line-height: 20px; font-weight: 600; }
.upd-box.err .hd, .upd-box.err .upd-msg { color: var(--err); }
.upd-box.ok .upd-msg { color: var(--ok); }
.upd-box code { font: 12px/18px var(--mono); padding: 0 var(--sp-1); border-radius: 4px; background: var(--layer); }
.upd-msg { font-size: 13px; line-height: 19px; white-space: pre-line; overflow-wrap: anywhere; }
.upd-detail { color: var(--fg-3); font: 11.5px/16px var(--mono); overflow-wrap: anywhere; }
.upd-log { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--sp-05); min-width: 0; }
.upd-log li { display: flex; gap: var(--sp-2); min-width: 0; font-size: 13px; line-height: 19px; color: var(--fg-2); }
.upd-log li.dim { color: var(--fg-3); }
.upd-log code { flex: none; background: none; padding: 0; color: var(--fg-3); }
.upd-log span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upd-block { display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-2) var(--sp-3); border-radius: 10px; background: color-mix(in srgb, var(--warn) 10%, transparent); color: var(--warn); font-size: 13px; line-height: 19px; }
.upd-act { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-05); }
.upd-act .sup { color: var(--fg-3); font-size: 12px; }
@media (max-width: 600px) { .upd-box { padding-left: var(--sp-4); } }
.hs-chips { display: flex; flex-wrap: wrap; gap: var(--sp-15); }
.hs-chips .chip { height: auto; min-height: 28px; padding: var(--sp-1) var(--sp-3); text-align: left; }
.hs-chips .chip .tx { white-space: normal; overflow-wrap: anywhere; }
@media (min-width: 1700px) { #harness.hs-open { padding-right: var(--sheet-w); } }   /* below this the flow cannot keep its card width beside the drawer: the drawer lies over it, as on a phone */
/* 구성: 기능 보기 (badges on the map, 기능 목록 panel, 상세의 "여기서 작동하는 기능") */
.btn.tonal[aria-pressed="true"] { background: var(--active); color: var(--accent); }
[data-hm-refresh] { min-width: var(--btn-hit); }
.hm-bd { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin-top: var(--sp-05); }
.bd { display: inline-flex; align-items: center; height: 16px; padding: 0 var(--sp-15); border-radius: 4px; font: 500 var(--fs-tag)/var(--lh-tag) var(--font); white-space: nowrap; }
.bd.f { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.bd.a { background: var(--layer); color: var(--fg-2); }
.tag.st.enforced { color: var(--fg); font-weight: 600; }
.tag.st.advisory { color: var(--fg-3); }
.fc { margin-top: var(--sp-6); }
.fc > .sec { margin-left: 0; margin-right: 0; }
.fc-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin: var(--sp-2) 0 var(--sp-1); }
.fc-bar .fi { flex: 1 1 200px; width: auto; }
.fc-bar .sel { width: auto; min-width: 150px; }
.fc-bar .seg { flex: none; flex-wrap: nowrap; }
.fc-bar .seg button { flex: none; padding: 0 var(--sp-3); }
.fc-count { margin: var(--sp-1) 0 var(--sp-3); }
.fc-gh { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-1) var(--sp-2); width: 100%; padding: var(--sp-3) var(--sp-05) var(--sp-1) 0; border: 0; background: transparent; color: var(--fg); text-align: left; font: 600 13px/20px var(--font); }
.fc-gh .ic { width: 14px; height: 14px; color: var(--fg-3); transition: transform var(--m-fast) var(--m-ease); }
.fc-gh[aria-expanded="false"] .ic { transform: rotate(-90deg); }
.fc-gh .sup { font-weight: 400; }
.fc-gh .note { flex-basis: 100%; margin: 0 0 0 var(--sp-6); }
.fc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--sp-2); margin: var(--sp-2) 0 var(--sp-5); }
.fc-card { display: flex; flex-direction: column; gap: var(--sp-15); min-width: 0; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-ctl); background: var(--card); cursor: pointer; }
@media (hover: hover) { .fc-card:hover { background: var(--card-hover); } }
/* Material 3 card types instead of a colored side stripe: enforced = filled card, advisory = outlined card. */
.fc-card.enforced, .hs-ft.enforced { background: var(--layer); }
@media (hover: hover) { .fc-card.enforced:hover, .hs-ft.enforced.go:hover { background: var(--active); } }
.fc-card.off { opacity: .6; }
.fc-card .top, .hs-ft .top { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.fc-card .nm, .hs-ft .nm { flex: 1; min-width: 0; font: 500 14px/20px var(--font); overflow-wrap: anywhere; }
.fc-card .wh, .hs-ft .wh { color: var(--fg-2); font-size: 12px; line-height: 18px; overflow-wrap: anywhere; white-space: pre-line; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.fc-card .fc-tags { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.fc-card .src, .hs-ft .src { color: var(--fg-3); font: 11px/16px var(--mono); overflow-wrap: anywhere; }
.fc-card .dup, .hs-ft .dup { color: var(--warn); font-size: 11.5px; line-height: 16px; overflow-wrap: anywhere; }
.hs-fts { display: flex; flex-direction: column; gap: var(--sp-2); }
.hs-ft { display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-2) var(--sp-4); border-radius: var(--r-ctl); background: var(--layer); }
.hs-ft.go { cursor: pointer; }
@media (hover: hover) { .hs-ft.go:hover { background: var(--hover); } }
.hs-ft.on, .hs-ft.enforced.on { background: var(--active); }
.hs-fw > .fi { margin-top: var(--sp-2); }
.fc-sw { display: inline-flex; align-items: center; gap: var(--sp-15); flex: none; }
/* 구성: 커스텀 표시 (config.json 의 ui.origin_view 가 켜졌을 때만 그려져요) */
:root { --mine: #0e7490; }
:root[data-theme="dark"] { --mine: #38c0d9; }
.bd.m { background: color-mix(in srgb, var(--mine) 14%, transparent); color: var(--mine); }
.tag.m, .tag.scope.personal, .tag.scope.project { color: var(--mine); font-weight: 600; }
.tag.scope { height: auto; min-height: 20px; white-space: normal; text-align: left; overflow-wrap: anywhere; }
.hm-bar .hm-legend { flex: 1 1 100%; display: flex; align-items: center; gap: var(--sp-15); }
.hm-legend .bd { flex: none; }
.hm-bar .seg { flex: none; flex-wrap: nowrap; }
.hm-bar .seg button { flex: none; padding: 0 var(--sp-3); }
.hm-mine { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-15); margin-top: var(--sp-05); }
.hm-mine .mt { color: var(--mine); font: 500 11px/16px var(--font); }
.hm-chip.mine { background: color-mix(in srgb, var(--mine) 14%, var(--layer)); }
.hm-row .bd { flex: none; }
.hm-st.none { background: var(--layer); }
.hm-none { color: var(--fg-3); font-size: 13px; line-height: 19px; }
.hm-cs .hm-more { flex: none; align-self: flex-start; height: 28px; margin-top: var(--sp-05); padding: 0 var(--sp-2); font-size: 12px; }
.hm-cr .m2 { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-cs { display: flex; flex-direction: column; gap: var(--sp-05); }
.hm-cs .cl { position: sticky; top: 0; z-index: 1; margin: 0 calc(var(--sp-2) * -1); padding: var(--sp-15) var(--sp-2) var(--sp-1); background: var(--card); color: var(--fg-3); font: 500 12px/16px var(--font); }
.hm-cs .cl:not(:first-child) { margin-top: var(--sp-15); }
.hm-cr { display: flex; flex: none; flex-direction: column; gap: var(--sp-05); min-width: 0; padding: var(--sp-15) var(--sp-2); margin: 0 calc(var(--sp-2) * -1); border: 0; border-radius: 8px; background: transparent; color: var(--fg); text-align: left; font: 500 13px/18px var(--font); }
@media (hover: hover) { .hm-cr:hover { background: var(--card-hover); } }
.hm-cr .m1 { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-1) var(--sp-15); min-width: 0; word-break: keep-all; overflow-wrap: anywhere; }
.hm-cr .m2 { color: var(--fg-3); font-weight: 400; font-size: 12px; line-height: 16px; }
.hm-cr .m2.mono { font-family: var(--mono); font-size: 11px; }
.hs-or { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-15); margin-top: var(--sp-2); color: var(--fg-2); font-size: 12px; line-height: 18px; }
/* ---------- chat: decision card above the composer, todo strip above the timeline ---------- */
/* 터미널 보기 토글은 제품에서 없앴어요 (owner 2026-11-03): 대화를 터미널로 바꾸지 않고, 명령은 컴포저의 /셸이나 코드 블록의
   '터미널에서 실행'이 셸 시트로 보내요 (web/js/14-slash-commands.js, 35-code-blocks.js, 36-shell.js). LOG_VIEW가 켜져도 이 버튼은 돌아오지 않습니다. */
#vtog { display: none !important; }

/* 대화 화면의 모양 (시제품 s-chat.js·proto.css "/* chat *\/"): 컴포저는 카드와 같은 18px, 회색 상자와 그 아래 힌트 줄, 답은 한 페이지처럼 조용히 (원칙 9·5) */
.sendrow { border-radius: var(--r-card) !important; }
.sendrow.ulw { border-radius: var(--r-card) !important; }   /* ulw 테두리는 그대로, 모서리만 토큰에서 */
/* 내 말풍선 (proto .msg.me .bub): 회색 면, 18/18/6/18 모서리, 10x14 안여백. 봇 답은 말풍선 없이 한 페이지처럼 15/24, 문단 8px, 글머리표 2px (proto .bub) */
.ub { padding: var(--sp-2) var(--sp-3); border-radius: 18px 18px 6px 18px; background: var(--layer); }
.bm .md { font-size: 15px; line-height: 24px; }
.bm .md p { margin: 0 0 var(--sp-2); }
.bm .md ul, .bm .md ol { margin: 0 0 var(--sp-2); padding-left: var(--sp-5); }
.bm .md li + li { margin-top: var(--sp-05); }
.dc-wait { border-radius: var(--r-ctl); }

/* ---------- 채팅 대화 카드 안의 차례 (proto .cv: 머리 -> todo -> 타임라인 -> 진행 줄 -> 확인 카드 -> 컴포저) ---------- */
/* todo 스트립: 대화 카드 안, 타임라인 바로 위, 카드와 같은 회색 면 (proto .todo) */
:is(#v-chat, .pane-chat) > .todo { background: var(--layer); }
/* 타임라인 위아래 경계는 .kk-tl(17-kakao.css)과 같은 12px 마스크로 글자를 흐려요. 더 스크롤할 쪽에만 걸려요(edgeFade의 fade-t, fade-b).
   맨 아래에서는 마지막 줄이 그대로 보이고, 맨 아래로 버튼과 입력창은 .timeline 밖이라 흐려지지 않아요. 03-base의 덮개 페이드는 여기서 꺼요.
   메일을 열면 .mtop이 맨 위에 붙어 있어서 위쪽은 흐리지 않아요. */
:is(#v-chat, .pane-chat) .chatbox::before, :is(#v-chat, .pane-chat) .chatbox::after { content: none; transition: none; }
:is(#v-chat, .pane-chat) .timeline { --edge-t: 0px; --edge-b: 0px; -webkit-mask-image: linear-gradient(transparent, #000 var(--edge-t), #000 calc(100% - var(--edge-b)), transparent); mask-image: linear-gradient(transparent, #000 var(--edge-t), #000 calc(100% - var(--edge-b)), transparent); }
:is(#v-chat, .pane-chat) .chatbox.fade-t:not(:has(.mtop)) > .timeline { --edge-t: var(--sp-3); }
:is(#v-chat, .pane-chat) .chatbox.fade-b > .timeline { --edge-b: var(--sp-3); }

/* ---------- 컴포저: 시제품 .cmp — [첨부 · 글 · 원형 전송] 회색 18px 상자 (모든 입력 줄의 공통 기반) ----------
   .sendrow 자체가 기반이에요: 채팅 입력줄(#send)과 메신저 방 입력줄(#kk-form) 같은 어떤 입력줄도 .sendrow 안에 [#c-attach(첨부, 선택) · textarea · .ib(보내기)]와
   (선택) .cbar 칩 줄을 두면 같은 모양이에요. 채팅 컴포저의 힌트 줄(#cbar: 모델·컨텍스트 칩)은 상자 밖 아래에 서요. */
.sendrow { grid-template-columns: auto minmax(0, 1fr) auto !important; grid-template-areas: "at at at" "plus ta send" "bar bar bar" !important; align-items: flex-end; gap: 0 var(--sp-1); }   /* no row gap: the empty tray row above would add 4px of padding to the top only */
.sendrow:not(.ulw) { padding: var(--sp-15) !important; border: 0 !important; border-radius: var(--r-card) !important; background: var(--layer) !important; }
.sendrow:not(.ulw):focus-within { border-color: transparent !important; }
.sendrow textarea { grid-area: ta; padding: 7px var(--sp-1); /* nudge: 22px line + 2 x 7px = 36px, the height of the send button beside it */ font-size: 15px; line-height: 22px; text-overflow: ellipsis; }
.sendrow textarea::placeholder { white-space: nowrap; text-overflow: ellipsis; }   /* 폰에서 긴 안내 글이 두 줄로 접혀 상자를 키우지 않게 한 줄로 (시제품 .cmp는 한 줄) */
:is(#c-attach, .pane-chat [data-c="c-attach"]) { grid-area: plus; display: inline-flex; align-items: center; flex: none; width: 36px; height: 36px; padding: 0; border: 0; justify-content: center; border-radius: 50%; background: transparent; color: var(--fg-2); font-size: 0; }
:is(#c-attach, .pane-chat [data-c="c-attach"]) .ic { width: 20px; height: 20px; }
@media (hover: hover) { :is(#c-attach, .pane-chat [data-c="c-attach"]):hover { background: var(--hover); color: var(--fg); } }
.sendrow > .ib { grid-area: send; width: 36px; height: 36px; border-radius: 50%; }
.sendrow > .cbar { grid-area: bar; margin: 0; padding: var(--sp-1) var(--sp-1) var(--sp-05); min-height: 0; }
:is(#cbar, .pane-chat .cbar) { display: flex; align-items: center; flex-wrap: nowrap; gap: var(--sp-15); min-height: 20px; margin: var(--sp-1) 0 0; padding: 0 var(--sp-05); overflow-x: auto; scrollbar-width: none; }
:is(#cbar, .pane-chat .cbar)::-webkit-scrollbar { display: none; }
:is(#cbar, .pane-chat .cbar) .cchip { height: auto; min-height: 20px; padding: 0 var(--sp-05); background: transparent; color: var(--fg-3); font-size: 12px; line-height: 16px; }
:is(#cbar, .pane-chat .cbar) button.cchip { cursor: pointer; }
@media (hover: hover) { :is(#cbar, .pane-chat .cbar) button.cchip:hover { background: transparent; color: var(--fg); } }
:is(#cbar, .pane-chat .cbar) .cchip.cown { opacity: 1; color: var(--fg-3); }
@media (pointer: coarse) { :is(#cbar, .pane-chat .cbar) { min-height: var(--btn-h-sm); margin-top: 0; } :is(#cbar, .pane-chat .cbar) button.cchip { min-height: var(--btn-h-sm); padding: 0 var(--sp-15); } }
:is(#cbar, .pane-chat .cbar) .working { display: none !important; }
@media (pointer: coarse) { :is(#c-attach, .pane-chat [data-c="c-attach"]) { width: 36px; height: 36px; } }

/* 실행 상태 줄 (41-runstate.js, 시제품 .run): 입력 상자 위 한 줄, 12/16 회색 글이에요. 경고·오류는 색만 바뀝니다 */
.runstate { min-height: 20px; margin: 0 0 var(--sp-15) var(--sp-1); color: var(--fg-2); font-size: 12px; line-height: 16px; }

/* 상태 태그 (시제품 .bub .st .tag): 봇 메시지 첫 줄 맨 앞에 [확인 필요 / 완료 / 진행 중 / 실패] — 02-basic-markdown.js toneLead가 넣어요 */
.bm .st-tag { height: 22px; margin-right: var(--sp-2); font-size: 12px; line-height: 16px; vertical-align: 1px; }

/* 확인/질문 카드: 컴포저 바로 위에 붙어 있고, 흰 대화 카드 안에서도 한 면으로 읽히게 회색 위에 놓여요 (얇은 모양·동작은 그대로) */
#composer > .dcard { background: var(--layer); }


/* dotz_auth 입력 요청 (16-target-switcher-conversation.js authCard): 새 토큰의 입력칸과 버튼. 비밀 값은 type=password 그대로, 화면에만 보기/숨기기 */
.au input:not([type=checkbox]) { height: var(--field-h); padding: 0 var(--sp-3); border: 0; border-radius: var(--r-ctl); background: var(--ff-fill); color: var(--fg); font-size: var(--fs-body); }
.au input:not([type=checkbox]):focus { outline: 0; box-shadow: var(--ff-ring); }
.au .fld label { color: var(--fg-2); font-size: var(--fs-meta); line-height: var(--lh-meta); }
.au .eye { height: var(--field-h); padding: 0 var(--sp-3); border: 0; border-radius: var(--r-ctl); background: var(--ff-fill); color: var(--fg-2); font: 500 13px/20px var(--font); }
@media (hover: hover) { .au .eye:hover { background: var(--hover); color: var(--fg); } }
.au input.bad, .au input.bad:not([type=checkbox]):focus { box-shadow: inset 0 0 0 1.5px var(--err); }
.au .ferr { color: var(--err); }
.au .rem { color: var(--fg-2); font-size: 13px; }
@media (pointer: coarse), (max-width: 639px) { .au input:not([type=checkbox]) { height: var(--field-h-touch); font-size: 16px; } .au .eye { height: var(--field-h-touch); } }
/* 확인 카드 (owner 2026-11-03): 머리 한 줄(답 기다림), 카드 제목 크기의 짧은 질문, 작은 답 버튼, 지금보다 눈에 띄게 낮게 */
/* At most ~40% of the screen (owner 2026-11-04: at 60% a several-draft card hid the conversation above it); its body scrolls inside */
.dcard { display: flex; flex-direction: column; max-height: max(40dvh, 200px); margin: 0 0 var(--sp-2); border-radius: var(--r-card); background: var(--card); overflow: hidden; }
.dcard[hidden] { display: none; }
/* a waiting send-approval card that later posts pushed up: one row in the dock that opens it (10-decision-card.js dcPointer) */
.dc-wait { display: flex; align-items: center; gap: var(--sp-2); width: 100%; min-height: 44px; padding: var(--sp-2) var(--row-px); border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.dc-wait-k { flex: none; font-weight: 600; color: var(--accent); }
.dc-wait-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-wait-n { flex: none; opacity: .7; font-size: .9em; }
.dc-wait-go { flex: none; font-weight: 600; }
.dc-hd { flex: none; display: flex; align-items: flex-start; gap: var(--sp-1); padding: var(--sp-2) var(--sp-1) var(--sp-05) var(--sp-4); }
.dc-tt { flex: 1; min-width: 0; }
/* 답 기다림: the whole header on one 20px line; the question under it is the card's one lead */
.dc-meta { display: flex; align-items: center; gap: var(--sp-15); min-width: 0; }
.dc-wt { flex: none; }
.dc-q { margin-top: var(--sp-05); font-size: var(--fs-card); line-height: var(--lh-card); font-weight: 600; }
.dc-q p { margin: 0; }
.dc-decide { margin: var(--sp-1) 0 var(--sp-05); font: 400 13px/20px var(--font); letter-spacing: 0; }
.dc-decide-k { font-weight: 600; }
.dc-decide ul { margin: var(--sp-05) 0 0; padding-left: var(--sp-4); }
.dc-decide li + li { margin-top: var(--sp-05); }
.dcard.fold .dc-q { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.dcard.fold .dc-hd { padding-bottom: var(--sp-2); }
.dcard.fold .dc-decide { display: none; }
.dc-fold { flex: none; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--fg-3); }
@media (hover: hover) { .dc-fold:hover { background: var(--hover); } }
.dc-fold .ic { width: 16px; height: 16px; transition: transform var(--m-fast) var(--m-ease); }
.dcard.fold .dc-fold .ic { transform: rotate(180deg); }
.dc-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--sp-05); padding: 0 var(--sp-15) var(--sp-15); overflow-y: auto; overscroll-behavior: contain; }
.dc-sub { padding: var(--sp-05) var(--sp-1) 0; color: var(--fg-2); font-size: 12px; line-height: 16px; font-weight: 600; }
.dc-inl { display: flex; flex-direction: column; gap: var(--sp-05); margin-top: var(--sp-2); padding: var(--sp-2); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); }
.dc-inl .dc-q { margin: 0 0 var(--sp-05); padding: 0 var(--sp-1); }
.dc-inl > .dc-ds { padding: 0 var(--sp-1); }
.dc-row, .dcm-row { flex: none; display: flex; align-items: flex-start; gap: var(--sp-2); width: 100%; min-height: 40px; padding: var(--sp-15) var(--sp-3); border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
@media (hover: hover) { .dc-row:hover:not(:disabled), .dcm-row:hover:not(:disabled) { background: var(--hover); } }
.dc-row:active:not(:disabled), .dcm-row:active:not(:disabled) { background: var(--active); }
.dc-row:disabled, .dcm-row:disabled { cursor: default; }
.dc-row:disabled:not(.on), .dcm-row:disabled:not(.on) { opacity: .6; }

.dc-row.on, .dcm-row.on { background: color-mix(in srgb, var(--accent) 12%, var(--card)); }
.dc-key { flex: none; display: grid; place-items: center; min-width: 18px; height: 20px; padding: 0; color: var(--fg-3); font-size: 12px; line-height: 20px; font-weight: 400; font-variant-numeric: tabular-nums; }
.dc-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-05); }
.dc-lb { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-15); font-size: 14px; line-height: 20px; font-weight: 500; }
.dc-ds { color: var(--fg-3); font-size: 12px; line-height: 16px; }
.dc-draft { flex: none; display: flex; flex-direction: column; gap: var(--sp-1); margin: 0 0 var(--sp-1); padding: var(--sp-2) var(--sp-3); border-radius: 10px; background: color-mix(in srgb, var(--fg) 5%, transparent); }
.dc-brief { display: grid; gap: var(--sp-05); padding-bottom: var(--sp-2); margin-bottom: var(--sp-2); border-bottom: 1px solid var(--line); }
.dc-brief .dc-dr-v { font-weight: 400; overflow-wrap: anywhere; word-break: keep-all; }
.dc-brief .dc-dr-v b { font-weight: 700; }
.dc-brief .mln { margin: var(--sp-05) 0 0; }
.dc-dr-h { display: flex; gap: var(--sp-2); font-size: 13px; line-height: 20px; }
.dc-dr-k { flex: none; color: var(--fg-3); }
.dc-dr-v { min-width: 0; color: var(--fg); font-weight: 500; }
.dc-dr-b { max-height: min(22dvh, 180px); margin-top: var(--sp-05); overflow-y: auto; overscroll-behavior: contain; color: var(--fg); font-size: 14px; line-height: 22px; white-space: pre-wrap; }
.dc-edit { flex: none; display: flex; flex-direction: column; gap: var(--sp-2); }
.dc-ctx { display: flex; align-items: center; gap: var(--sp-2); }
.dc-note { width: 100%; box-sizing: border-box; min-height: 72px; padding: var(--sp-2) var(--sp-3); border: 0; border-radius: var(--r-ctl); background: var(--ff-fill); resize: vertical; font-size: 14px; line-height: 22px; }
.dc-note:focus { outline: 0; box-shadow: var(--ff-ring); }
.dc-eb { display: flex; gap: var(--sp-2); }
.dc-fl { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.dc-fl .dr-add { flex: none; padding: 0 var(--sp-3); }
.dc-fl .fatt { height: 48px; max-width: 100%; }
/* 돌아가기 (secondary) and the send button (primary) are the one button system (01-tokens.css); only the row layout is here */
.dc-back, .dc-go { flex: 1; }
@media (pointer: coarse) { .dc-note { font-size: 16px; } }
.dc-st { flex: none; padding: var(--sp-1) var(--sp-4) var(--sp-2); color: var(--fg-3); font-size: 12.5px; line-height: 18px; }
/* 답한 결정의 기록 (10-decision-card.js dcRecordNode): 카드가 접힌 뒤 대화에 남는 조용한 한 줄 — 질문과 고른 답만, 바탕·테두리 없이 */
.tl-in > .dc-rec { align-self: flex-end; display: grid; gap: var(--sp-05); max-width: 80%; min-width: 0; margin-top: var(--sp-3); color: var(--fg-3); font: 400 12.5px/18px var(--font); text-align: right; }
.tl-in > .dc-rec:first-child { margin-top: 0; }
.dc-rec-r { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: 0 var(--sp-15); min-width: 0; }
.dc-rec-k { flex: none; color: var(--fg-3); }
.dc-rec-q, .dc-rec-a { min-width: 0; overflow-wrap: anywhere; }
.dc-rec-q { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dc-rec-a { color: var(--fg-2); }
.dc-rec .mt { margin: 0; color: var(--fg-3); }
@container tlcol (max-width: 559.98px) { .tl-in > .dc-rec { max-width: 90%; } }
/* In the 알림 / 작업내역 conversations the rows are not answer buttons: a tap on the message opens the decision sheet (30-notices.js). */
.dcm.fx { cursor: pointer; }
.dcm.fx .dcm-row { pointer-events: none; }
.dcm { display: flex; flex-direction: column; gap: var(--sp-05); max-width: 520px; margin-top: var(--sp-2); }
.todo { --td-lh: 20px; --td-g: 14px; flex: none; margin: 0 0 var(--sp-2); border-radius: 12px; background: var(--card); }
.todo[hidden] { display: none; }
.td-bar { display: flex; align-items: center; gap: var(--sp-2); width: 100%; min-height: 36px; padding: var(--sp-1) var(--sp-3); border: 0; border-radius: 12px; background: transparent; color: var(--fg); font: inherit; font-size: 13.5px; line-height: 20px; text-align: left; cursor: pointer; }
.td-bar .td-g { margin-top: 0; }
.td-cur { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-n { flex: none; color: var(--fg-3); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.td-ch { flex: none; width: 16px; height: 16px; color: var(--fg-3); transition: transform var(--m-fast) var(--m-ease); }
.td-bar[aria-expanded="true"] .td-ch { transform: rotate(180deg); }
.td-list { max-height: min(40dvh, 320px); padding: 0 var(--sp-3) var(--sp-2); overflow-y: auto; overscroll-behavior: contain; }
.td-ph { margin: var(--sp-2) 0 var(--sp-05); color: var(--fg-3); font-size: 12px; line-height: 16px; font-weight: 400; }
.td-r { display: flex; align-items: flex-start; gap: var(--sp-2); padding: var(--sp-1) 0; color: var(--fg-2); font-size: 13.5px; line-height: var(--td-lh); }
.tr-act .td-tx { color: var(--fg); font-weight: 500; }
.td-tx { min-width: 0; }
.tr-done .td-tx { color: var(--fg-3); }
.tr-drop .td-tx { color: var(--fg-3); text-decoration: line-through; }
.td-g { flex: none; position: relative; width: var(--td-g); height: var(--td-g); margin-top: calc((var(--td-lh) - var(--td-g)) / 2); box-sizing: border-box; border-radius: 50%; }
.tg-pend { border: 1.5px solid var(--fg-3); }
.tg-act { border: 1.5px solid var(--fg); }
.tg-act::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: var(--fg); }
.tg-done { background: var(--fg-3); }
.tg-done::after { content: ""; position: absolute; left: 4px; top: 1.5px; width: 3px; height: 6px; border: solid var(--card); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.tg-drop { border: 1.5px dashed var(--fg-3); }
@media (pointer: coarse) { .dc-fold { width: 44px; height: 44px; margin: calc(var(--sp-15) * -1) calc(var(--sp-1) * -1) 0 0; } .td-bar { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) { .dc-fold .ic, .td-ch { transition: none; } }
/* 메신저 화면: the primary action row, the shared onboarding panel, and the closed "직접 입력" disclosure. */
.ms-adv { margin: var(--sp-5) var(--sp-1) var(--sp-2); }
.ms-adv > summary { display: flex; align-items: center; min-height: 32px; color: var(--fg-2); font: 600 13px/20px var(--font); cursor: pointer; list-style: none; }
.ms-adv > summary::-webkit-details-marker { display: none; }
.ms-adv > summary::before { content: "+"; display: inline-block; width: 18px; color: var(--fg-3); font-weight: 500; }
.ms-adv[open] > summary::before { content: "-"; }
.ms-adv-body { margin-top: var(--sp-2); }
.ms-adv-body > .list + .sec { margin-top: var(--sp-5); }

/* ---- 프로젝트 · 세션 (docs/layers.md §5) ---- */
#v-project { max-width: 1180px; }
#v-project .pmv-head { padding: var(--sp-5); border-radius: var(--r-card); background: var(--card); }
@media (max-width: 1099px) { #v-project .pmv-head { max-width: 760px; } }
@media (max-width: 639px) { #v-project .pmv-head { padding: var(--sp-4); } }
/* phone: the app bar already says the name, so the card does not write it again. The ⋯ menu's 프로젝트 수정 opens the same edit field in this row (pmMenuButton);
   a head without that menu (no work channel) keeps the name as it is. A row left with nothing in it goes too, so no gap stays where the title was. */
@media (max-width: 639px) {
  #v-project .pmv-head:has(.pmv-more) .pmv-htop > .pmv-ed:has(> .pmv-title) { display: none; }
  #v-project .pmv-head:has(.pmv-more) .pmv-htop:not(:has(> .tag, > .pmv-upd, > .pmv-ed > .pmv-form)) { display: none; }
  #v-project .pmv-head:has(.pmv-more) .pmv-htop > .pmv-upd { margin-left: 0; }
}
.pmv-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--sp-3) var(--sp-4); }
.pmv-hmain { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-1); }
/* the title row of the header card: name, state tag, last activity (site/prototype/s-work.js project head) */
.pmv-htop { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); min-width: 0; }
.pmv-htop > .pmv-ed { flex: 1 1 auto; min-width: 0; }
.pmv-htop > .tag { flex: none; max-width: 100%; }
.pmv-upd { flex: none; margin-left: auto; color: var(--fg-3); font: 400 12px/16px var(--font); white-space: nowrap; }
/* Left-aligned: when the head wraps (narrow screens, or the hint under a disabled button widens the box) a right-aligned button floated away from the text above it. */
.pmv-hact { flex: none; max-width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-1); }
.pmv-hact .note { margin-top: 0; }
.pmv-hrow { display: flex; align-items: center; gap: var(--sp-2); }
.pmd { display: flex; flex-direction: column; gap: var(--sp-3); }
.pmd .as-h { overflow-wrap: anywhere; }
.pmd-ft .btn { flex: 1; }
.pmd-ft .note { flex: 1 0 100%; }   /* the failure sits on its own line right above the buttons */
.pmd-ft .note:empty { display: none; }
.pmv-edit { display: block; width: 100%; margin: 0 calc(var(--sp-2) * -1); padding: var(--sp-05) var(--sp-2); border: 0; border-radius: var(--r-ctl); background: transparent; color: inherit; font: inherit; text-align: left; cursor: text; overflow-wrap: anywhere; box-sizing: content-box; }
@media (hover: hover) { .pmv-edit:hover { background: var(--hover); } }
.pmv-edit.empty { color: var(--fg-3); }
.pmv-title { font: 700 20px/28px var(--font); }
.pmv-purpose { color: var(--fg-2); font-size: 13px; line-height: 20px; }
.pmv-form { display: flex; flex-direction: column; gap: var(--sp-2); width: 100%; }
.pmv-form .fi { width: 100%; }
.pmv-code { font-family: var(--mono); font-size: 12.5px; line-height: 18px; white-space: pre; overflow: auto; }
.pmv-ta { height: auto; min-height: 72px; padding: var(--sp-2) var(--sp-3); resize: vertical; line-height: 22px; }
.pmv-acts { display: flex; justify-content: flex-end; gap: var(--sp-2); }
.pmv-cols { display: flex; flex-direction: column; }
.pmv-col { display: contents; }
.pmv-sec { display: flex; flex-direction: column; min-width: 0; margin-top: var(--sp-6); }
.pmv-sec > .sec { margin-top: 0; }
@media (min-width: 640px) {
  .pmv-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--sp-4); align-items: start; }
  .pmv-col { display: flex; flex-direction: column; min-width: 0; }
}
.pmv-rt { display: flex; flex-direction: column; gap: var(--sp-15); padding: var(--sp-3) var(--sp-4); }
.pmv-rt-top { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-15) var(--sp-2); min-width: 0; }
.pmv-rt-name { flex: 1 1 120px; min-width: 0; font: 500 15px/22px var(--font); overflow-wrap: anywhere; }
.pmv-rt-meta { display: flex; flex-wrap: wrap; gap: var(--sp-05) var(--sp-3); color: var(--fg-3); font-size: 12px; line-height: 16px; overflow-wrap: anywhere; }
.pmv-rt-acts { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-1); }
.pmv-rt-form { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--sp-2) var(--sp-3); }
.pmv-fld { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.pmv-fld .fi { flex: 1; min-width: 0; }
/* the overview's inline sections (세션 · 작업 · 결과): the prototype's .sec + .list inside the detail column */
.pm-block { display: flex; flex-direction: column; min-width: 0; }
.pm-o .pm-sec { margin: var(--sp-5) var(--sp-1) var(--sp-2); }
.pm-o .pm-sec:first-child { margin-top: 0; }
.pm-o .pm-sec .btn { flex: none; }
.pm-sec-list .li .tx { display: flex; flex-direction: column; gap: var(--sp-05); }
.pm-sec-list .li .hd { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-sec-list .li .sup { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-sec-list .li .hd.pmv-wrap { white-space: normal; overflow-wrap: anywhere; }
.pmv-day { margin: var(--sp-3) var(--sp-1) var(--sp-15); color: var(--fg-3); font-size: 12px; line-height: 16px; }
.pmv-day:first-child { margin-top: 0; }
.pmv-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 알림 화면 (31-notices-screen.js, the prototype's #notices): a filter row, one meta line, then up to three lists of one row shape: the dot, the title with its
   time, a one-line summary with the kind tag, and one cell at the end. Emphasis is the title weight only; the dot is the only colour, the tag stays grey. */
#v-notices { display: flex; flex-direction: column; }
.nsc-f { display: flex; flex-wrap: nowrap; gap: 0; margin: var(--sp-1) 0 var(--sp-2); overflow-x: auto; scrollbar-width: none; }
.nsc-f::-webkit-scrollbar { display: none; }
/* .nsc-fb is a filter segment: its shape is in 16-result-card.css with .mr-f */
.nsc-fb { display: inline-flex; align-items: center; gap: var(--sp-15); }
.nsc-fb .n { color: var(--fg-3); font-variant-numeric: tabular-nums; }
.nsc-fb.on .n { color: inherit; }
.nsc-fb .n:empty { display: none; }
/* the tabs and 모두 읽음 are one row on a wide screen; a phone puts the button on the row under the tabs (as 답장 대기 does, 15-reply-card.css), so no tab hides behind it. A 44px tap area either way */
.nsc-bar { display: flex; align-items: center; gap: var(--sp-2); }
@media (max-width: 639px) { .nsc-bar { flex-wrap: wrap; row-gap: 0; } .nsc-bar > .nsc-f { flex: 1 0 100%; } }
.nsc-bar > .nsc-f { flex: 0 1 auto; min-width: 0; }
.nsc-bar > .btn { flex: none; margin-left: auto; position: relative; }
.nsc-bar > .btn[hidden] { display: none; }
.nsc-bar > .btn::after { content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, var(--btn-hit)); height: max(100%, var(--btn-hit)); transform: translate(-50%, -50%); }
.nsc-m { display: flex; align-items: center; min-height: var(--btn-h); margin: 0 var(--sp-1); }
.nsc-m[hidden] { display: none; }
.nsc-m .meta { color: var(--fg-3); font: 400 var(--fs-meta)/var(--lh-meta) var(--font); font-variant-numeric: tabular-nums; }
.nsc-l .sec { margin: var(--sp-6) var(--sp-1) var(--sp-2); }
.nsc-l .sec:first-child { margin-top: var(--sp-2); }
.nsc-r { position: relative; align-items: flex-start; padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--row-px); }
.nsc-r + .nsc-r { border-top: 1px solid var(--line); }
/* 처리할 것 draws every open question (hundreds on a busy day): rows below the fold skip layout and paint until they scroll near. The size is the row's content box (the title line, the gap, the summary line at the tag's 20px: --lh-row + --sp-05 + --lh-meta + --sp-1; padding and the top line come on top), so the list's height and the scroll place hold; `auto` remembers a row's measured height once seen. Only this list: 답장 대기 (30-replies.js) reuses .nsc-r and holds the reader's place by measuring rows above it. */
.nsc-l .nsc-r { content-visibility: auto; contain-intrinsic-block-size: auto calc(var(--lh-row) + var(--sp-05) + var(--lh-meta) + var(--sp-1)); }
@media (hover: hover) { .nsc-r:hover { background: var(--card-hover); } }
.nsc-r:has(> .nsc-tx:active) { background: var(--row-sel); }
.nsc-r .lead { align-items: center; width: 8px; height: var(--lh-row); }
.nsc-tx { display: flex; flex-direction: column; gap: var(--sp-05); padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; }
.nsc-tx::after { content: ""; position: absolute; inset: 0; }
.nsc-tx:focus-visible { outline: none; }
.nsc-tx:focus-visible::after { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: inherit; }
.nsc-r .ln { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.nsc-r .hd { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; color: var(--fg-2); }
.nsc-r.unread .hd { font-weight: 700; color: var(--fg); }
.nsc-r .t { flex: none; color: var(--fg-3); font: 400 var(--fs-meta)/var(--lh-row) var(--font); }
.nsc-s { flex: 1; min-width: 0; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-2); font: 400 var(--fs-meta)/var(--lh-meta) var(--font); }
.nsc-r .ib, .nsc-tr { position: relative; z-index: 1; flex: none; display: grid; place-items: center; width: var(--btn-h-row); height: var(--btn-h-row); align-self: center; margin-left: calc(var(--sp-1) * -1); color: var(--fg-3); }
.nsc-tr { z-index: 0; pointer-events: none; }
.nsc-r .ib::before { content: ""; position: absolute; inset: -6px; }
.nsc-fold .ic { transition: transform var(--m-fast) var(--m-ease); transform: rotate(90deg); }
.nsc-fold[aria-expanded="true"] .ic { transform: rotate(-90deg); }

/* Rows of the 모니터링 screen (30-monitoring.js), the jump highlight (30-notices.js), the 홈 cards (08-home.js) and the decision sheet (30-notices.js). */
.nt-dot { flex: none; width: 8px; height: 8px; margin-top: 7px; /* nudge: 8px dot centred on the first 22px text line */ border-radius: 50%; background: var(--fg-3); }
.nt-dot.tone-done { background: var(--ok); }
.nt-dot.tone-run { background: var(--accent); }
.nt-dot.tone-ask { background: var(--warn); }
.nt-dot.tone-fail { background: var(--err); }
/* The one highlight rule, for ntFlash (30-notices.js, .nt-hl) and a Messenger quote (17-kakao.css): an overlay painted over the host, so a highlight never changes the host's size, radius, padding or margin.
   - anything with its own fill (a card, a bubble, a work card) is lit inside its own rounded shape: a faint tint of itself plus a soft accent ring (the overlay copies the host's radius);
   - plain text (.nt-hl.nt-bar) gets only a faint tint around the message (no left bar: owner 2026-10-22).
   It fades in --m-base after the scroll lands (delay), holds, and is gone after --nt-hl-t, one length for a notice row and a Messenger bubble.
   (The "원래 메시지" label of a quote stays longer: kkFlash in 30-kakao.js.) The ring and glow stay within 8px: the timeline's own 8px gutter (03-base.css) keeps them from being clipped. */
:root { --nt-hl-t: calc(var(--m-slow) * 6); }
.nt-hl { position: relative; --hl: 9%; --hl-ring: 34%; --hl-glow: 20%; }
:root[data-theme="dark"] .nt-hl { --hl: 13%; --hl-ring: 46%; --hl-glow: 26%; }
.nt-hl::after, .kk-m.kk-hl :is(.kk-bub, .kk-media, .kk-sticker)::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: color-mix(in srgb, var(--accent) var(--hl), transparent); box-shadow: 0 0 0 var(--hl-spread, 2px) color-mix(in srgb, var(--accent) var(--hl-ring), transparent), 0 0 8px 0 color-mix(in srgb, var(--accent) var(--hl-glow), transparent); opacity: 0; pointer-events: none; }
.nt-hl::after { animation: nt-hl var(--nt-hl-t) var(--m-ease) var(--m-base) both; }
/* Plain text: the phone's message already has 16px side padding, so the tint sits in it. From 640px up the tint hangs 8px past each side, into the timeline's gutter. */
.nt-hl.nt-bar::after { border-radius: var(--r-ctl); box-shadow: none; }
@container tlcol (min-width: 560px) { .tl-in > .nt-hl.nt-bar::after { inset-inline: calc(var(--sp-2) * -1); } }
@keyframes nt-hl { 0% { opacity: 0; } 14% { opacity: 1; } 50% { opacity: 1; } 100% { opacity: 0; } }
/* Reduced motion: no fade or scroll animation, just a still tint for a moment (a step animation; !important beats the global animation: none). */
@media (prefers-reduced-motion: reduce) {
  .nt-hl::after { animation: nt-hl-still var(--nt-hl-t) step-end both !important; }
}
@keyframes nt-hl-still { 0% { opacity: 1; } 100% { opacity: 0; } }


.mon-list { padding: var(--sp-1); }

/* Home cards: 알림 / 작업내역 / 모니터링 (as tall as their content on the board, 07-board.js fit). */
.card.hc { display: flex; flex-direction: column; }
.hc .ch .tag { flex: none; }
.hc-list { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.hc-row { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; font: 400 14px/20px var(--font); }
.hc-row { cursor: pointer; border-radius: var(--r-ctl); margin-inline: calc(var(--sp-15) * -1); padding: var(--sp-1) var(--sp-15); }
@media (hover: hover) { .hc-row:hover { background: var(--card-hover); } }
.hc-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.hc-row .nt-dot { margin-top: 0; }
.hc-row .tb { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hc-row .t, .hc-row .n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-row .n { color: var(--fg-3); font: 400 12px/16px var(--font); }
.hc-row .m { flex: none; color: var(--fg-3); font: 400 12px/16px var(--font); }
.hc-mon { display: flex; align-items: flex-start; gap: var(--sp-2); min-width: 0; }
.hc-mon .nt-dot { margin-top: var(--sp-15); }
.hc-mon .b { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hc-mon .n, .hc-mon .s { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-mon .n { font: 500 14px/20px var(--font); }
.hc-mon .s { color: var(--fg-3); font: 400 12px/16px var(--font); }
.hc-more { margin-top: var(--sp-2); color: var(--fg-3); font: 400 12px/16px var(--font); }
.hc-none { margin-top: var(--sp-2); color: var(--fg-3); font: 400 14px/22px var(--font); }
/* head note and count: plain grey text, a dot is the only colour; an empty card is just this head (fold) */
.hc-n { flex: none; display: inline-flex; align-items: center; gap: var(--sp-15); color: var(--fg-3); font: 400 13px/18px var(--font); }
/* the head's gap belongs to a body: with nothing under it, or a one-line state (.hc-none brings its own 8px), the card stays balanced */
.ch:last-child, .ch:has(+ .hc-none), .ch:has(+ .hn > .hc-none) { margin-bottom: 0; }
.ch:has(+ .hc-none), .ch:has(+ .hn > .hc-none) { min-height: 24px; }   /* the height of a head with a ⋯, so side-by-side state lines share a baseline */
.bi[data-id="main"] .subline { margin-top: var(--sp-3); padding: 0; background: none; color: var(--fg-2); }

/* Decisions (30-notices.js): a question that waits on the owner. Tapping its card on 홈 opens the full-screen overlay (14-overlay.css): the whole text, then one button per option. */
/* Computer switch sheet (33-peers.js): the bottom sheet on the phone and a centered dialog from 700px. Decisions and notices use the full-screen overlay (14-overlay.css), not this. */
.ds-bd { position: fixed; inset: 0; z-index: 1300; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .42); }
.ds-sheet { --fs-fill: var(--layer); display: flex; flex-direction: column; width: 100%; max-width: 520px; max-height: 90dvh; border-radius: var(--r-sheet) var(--r-sheet) 0 0; background: var(--pop); color: var(--fg); padding-bottom: env(safe-area-inset-bottom); box-shadow: var(--float); }
.ds-ey { flex: 1; color: var(--warn); font: 600 13px/20px var(--font); }
@media (min-width: 700px) {
  .ds-bd { align-items: center; }
  .ds-sheet { border-radius: var(--r-sheet); max-height: min(80vh, 760px); padding-bottom: 0; }
}
.ds-t { margin: var(--sp-1) 0 0; font: 700 20px/28px var(--font); letter-spacing: -.02em; overflow-wrap: anywhere; }
.ds-m { margin: var(--sp-05) 0 var(--sp-3); color: var(--fg-3); font: 400 12px/16px var(--font); }
.ds-md { color: var(--fg-2); font: 400 14px/22px var(--font); overflow-wrap: anywhere; }
.ds-md p { margin: 0 0 var(--sp-2); }
.ds-md p:last-child { margin-bottom: 0; }
.ds-md code { overflow-wrap: anywhere; }
.ds-opt, .ds-direct { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: var(--sp-05); width: 100%; min-height: var(--sheet-h); padding: var(--sp-2) var(--sp-4); border: 0; border-radius: var(--r-ctl); background: var(--fs-fill); color: var(--fg); font: inherit; text-align: left; }
.ds-opt.c { align-items: center; }
@media (hover: hover) { .ds-opt:hover, .ds-direct:hover { background: var(--hover); } }
.ds-opt:active, .ds-direct:active { background: var(--active); }
.ds-opt:disabled, .ds-direct:disabled { opacity: .55; }
.ds-lb { display: flex; align-items: center; gap: var(--sp-2); font: 600 15px/22px var(--font); overflow-wrap: anywhere; }
.ds-ds { font: 400 13px/18px var(--font); opacity: .82; overflow-wrap: anywhere; }
.ds-direct { align-items: center; background: transparent; color: var(--fg-2); font: 500 14px/20px var(--font); }
.ds-st { color: var(--fg-3); font: 400 13px/18px var(--font); text-align: center; }
.ds-res { display: flex; flex-direction: column; gap: var(--sp-05); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-ctl); background: var(--fs-fill); }
.ds-rl { color: var(--ok); font: 600 12px/16px var(--font); }
.ds-ra { font: 600 15px/22px var(--font); overflow-wrap: anywhere; }

/* Decision overlay (30-notices.js dkOpen, 10-decision-card.js renderSheet) and draft approval (hub/draft-approval.ts): content only; the frame is 14-overlay.css. */
.dc-dh { display: flex; align-items: baseline; gap: var(--sp-2); font-size: 14px; line-height: 22px; }
.dc-dh .dc-dr-v { font-size: 16px; word-break: keep-all; }
.dc-dh .dc-dr-v.sub { font-weight: 500; }
.fs-body .dc-dr-b { max-height: none; margin: 0; overflow: visible; font-size: 15px; line-height: 24px; word-break: keep-all; }
.fs-body .dc-q { margin-top: 0; font-size: 17px; line-height: 26px; }
/* the send sheet's buttons are the one button system (01-tokens.css): .dc-act quiet, .dc-act.alt secondary, .dc-act.main primary */
.dc-acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-15); }
.dc-act { flex: none; }
.dc-act:active:not(:disabled) { background: var(--active); }
.dc-act.alt { background: var(--fs-fill); }
.dc-act.main { order: 0; padding: 0 var(--sp-5); }
.dc-act.main:active:not(:disabled) { background: color-mix(in srgb, var(--accent) 85%, #000); }
.dc-act:disabled { opacity: .55; }

/* x (무시): a question that waits on the owner can be waved off. 44px thumb target on every surface, quiet --fg-3 until pressed. */
button.nt-x { width: 44px; height: 44px; border-radius: var(--r-ctl); color: var(--fg-3); }
button.nt-x:active { background: var(--active); color: var(--fg); }
.hr.hrx { gap: 0; padding: 0; }
.hrx-m { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--sp-3); min-height: 48px; padding: var(--sp-2) var(--sp-1) var(--sp-2) var(--sp-4); border: 0; background: transparent; color: inherit; font: inherit; text-align: left; }
.hrx-m:last-child { padding-right: var(--sp-4); }
.hrx .nt-x { margin-right: var(--sp-2); }
/* The x keeps its 44px target but takes no row height (it overhangs into the row padding and the list gap), so a row with an x is as tall as one without. */
.hc-row .nt-x { margin-block: calc(var(--sp-3) * -1); margin-right: calc(var(--sp-15) * -1); }
/* A row without an x keeps the x's slot (44px minus the -6px overhang) when its list has one, so the times line up in one column. */
.hc-list:has(.nt-x) > .hc-row:not(:has(.nt-x))::after { content: ""; flex: none; width: 38px; }
.ds-rl.ign { color: var(--fg-3); }
.dc-hb { flex: none; display: flex; align-items: center; gap: var(--sp-05); }

/* 알림 conversation: the record behind the 알림 screen has no composer (31-conversations.js convPaint sets .no-composer) */
:is(#v-chat, .pane-chat).no-composer > .composer { display: none; }

/* 채팅 (web/js/31-conversations.js): the chat list (a row = icon, title, one-line preview, status; never a time) and the "새 메시지" divider.
   Below 1100px the list and a conversation are two screens (#v-chat.cv-listing = the list); from 1100px they sit side by side. */
.cv-side { background: var(--card); border-radius: var(--r-card); overflow: hidden auto; }
.cv-side { display: none; }
.cv-head { display: none; }
#v-chat.cv-listing > .cv-side, #v-monitoring.cv-listing > .cv-side { display: block; }
#v-chat.cv-listing > :not(.cv-side), #v-monitoring.cv-listing > :not(.cv-side) { display: none; }

.cv-row { display: flex; align-items: center; gap: var(--sp-3); width: 100%; min-width: 0; min-height: var(--row-h); padding: var(--row-py) var(--sp-4); border: 0; border-radius: 0; background: transparent; color: inherit; text-align: left; }
.cv-row + .cv-row { margin-top: var(--sp-05); }
/* the open conversation: a small accent dot in the row's left padding (the slot every row already has, so text never shifts); phone only — the wide layout already highlights the row */
.cv-row { position: relative; }
@media (max-width: 1099px) { .cv-row.on::before { content: ""; position: absolute; top: 50%; left: 5px; --dot: 6px; width: var(--dot); height: var(--dot); margin-top: calc(var(--dot) / -2); border-radius: 50%; background: var(--accent); } }
@media (hover: hover) { .cv-row:hover { background: var(--card-hover); } }
.cv-av { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--layer); color: var(--fg-2); font: 700 15px/24px var(--font); }
.cv-av .ic { width: 20px; height: 20px; }
/* 아이콘이 든 면은 둥근 사각 (시제품 .li .ico, 10px); 이니셜이 든 사람 아바타는 원 */
.cv-av:has(> .ic), .cv-av:has(> .logo) { border-radius: var(--r-ctl); }
/* the app's own mark (the top bar's .logo) as the main assistant's icon */
.cv-av .logo { width: 55%; height: 55%; }
.cv-av.nt { background: var(--layer); color: var(--fg); }
.cv-b { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cv-n, .cv-p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-n { font: 500 15px/22px var(--font); }
.cv-p { color: var(--fg-2); font: 400 13px/18px var(--font); }
.mon-pc { margin-left: var(--sp-2); white-space: nowrap; color: var(--fg-3); font: 400 11px/16px var(--font); }
.cv-row.unread .cv-n { font-weight: 600; }
/* the unread count and the 미답장 count: 11px, one step up from the tab bar's 10.5 (docs/ui-spec.md 배지·점); the same size on a list row, a home row and the head of a card or app */
.cv-row .nb, .hr .nb, .hn-h .nb, #mon-head .nb { min-width: 18px; height: 18px; border-radius: 9px; font-size: 11px; line-height: 18px; }
/* a session under its project: indented, smaller avatar; the group label for sessions started from chat */
.cv-row.sub { min-height: 40px; padding-left: var(--sp-8); }
.cv-row.sub .cv-av { width: 28px; height: 28px; }
.cv-row.sub .cv-n { font-size: 14px; }
.cv-gh { padding: var(--sp-3) var(--sp-4) var(--sp-1); color: var(--fg-3); font: 500 12px/16px var(--font); }
.cv-m { flex: 0 1 auto; min-width: 0; max-width: 50%; display: flex; align-items: center; gap: var(--sp-15); }
/* 오른쪽 시각 (시제품 .li .end): 목록 행에서 제목·미리보기 다음, 상태 표시 앞 */
.cv-t { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--fg-3); font: 400 12px/16px var(--font); white-space: nowrap; }
/* 대화 머리 (시제품 .cv-hd): 제목 한 줄과 그 아래 상태 한 줄, 오른쪽에 그 대화의 동작 */
#cv-head .cv-hd-b, .pane-hd .cv-hd-b { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#cv-head .cv-hd-t, .pane-hd .cv-hd-t { display: flex; align-items: center; gap: var(--sp-15); min-width: 0; color: var(--fg); font: 600 16px/22px var(--font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#cv-head .cv-hd-s, .pane-hd .cv-hd-s { color: var(--fg-3); font: 400 12px/16px var(--font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#cv-head .cv-hd-a, .pane-hd .cv-hd-a { flex: none; display: flex; align-items: center; gap: var(--sp-1); margin-left: auto; }
#cv-head .cvmenu, .pane-hd .cvmenu { margin-left: 0; }
/* a row with a preview line (running sessions, 모니터링) */
.cv-row.pv { align-items: flex-start; padding-block: var(--sp-2); }
.cv-row.pv .cv-p { font-size: 13px; line-height: 18px; }
.cv-row.pv .cv-m { align-self: center; }
.cv-m2 { display: flex; align-items: center; gap: var(--sp-15); }
.cv-m2:empty { display: none; }
/* a status word that ends the row keeps the old tag's inset, so its last letter lines up with a count badge's digit on the next row */
.cv-m2 > .tag:last-child { margin-right: var(--tag-px); }
.cv-head .cvmenu { margin-left: auto; }

/* the header picker (chips / caret menu) is replaced by the list in 대화; 로그 keeps it */
.thead[data-mode="chat"] :is(.tsw, .tdrop) { display: none !important; }
/* phone, inside a conversation: back arrow + the conversation's name take the whole bar */
.appbar.cvconv h1 { flex: 1 1 0; min-width: 0; margin-right: 0; }
.appbar.cvconv .thead { flex: 0 0 auto; margin: 0; }

.tl-in > .a-div { color: var(--fg-3); }
.tl-in > .cv-new { display: flex; align-items: center; gap: var(--sp-3); margin: var(--sp-2) 0 0; color: var(--accent); font: 600 12px/16px var(--font); }
.tl-in > .cv-new::before, .tl-in > .cv-new::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
/* a gateway system line (11-todo-strip.js sysLine): small, muted and centered like the divider above, no bubble */
.tl-in > .cv-sys { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: var(--sp-1) var(--sp-15); align-self: center; width: fit-content; max-width: 100%; margin: var(--sp-2) auto 0; padding: var(--sp-05) var(--sp-3); border: 0; border-radius: var(--r-ctl); background: none; color: var(--fg-3); font: 500 12px/16px var(--font); text-align: center; overflow-wrap: anywhere; }
.tl-in > button.cv-sys { cursor: pointer; }
@media (hover: hover) { .tl-in > button.cv-sys:hover { background: var(--line-2); color: var(--fg-2); } }
.cv-sys .ic { width: 14px; height: 14px; flex: none; }
.cv-sys .cv-sys-st { display: inline-flex; align-items: center; gap: var(--sp-1); color: var(--fg-2); }
.cv-sys .cv-sys-st[hidden] { display: none; }
.cv-sys .cv-sys-mt { font-variant-numeric: tabular-nums; }
/* 백그라운드 작업 카드 (소개 페이지 작업 카드): 이어진 작업은 한 격자(.cv-tasks)로 묶여 채팅 폭을 꽉 채워요. 한 줄 3장까지, 남는 줄은 그 줄 안에서 폭을 나눠 가져요(4장 = 3 + 1, 5장 = 3 + 2).
   장 수는 창이 아니라 격자 폭으로 정해요. 6칸 격자라 1·2·3장이 모두 나눠떨어져요.
   카드는 내용만큼만 높아요(제목 아래 빈 자리 없음): 한 줄의 카드는 가장 높은 카드에 맞춰 늘어나고, 결과 파일은 제목 아래 줄에 붙고, 막대는 카드 아래 여백에 떠요(원칙 3·6·7·9). */
.tl-in > .cv-tasks { container: cv-tasks / inline-size; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--sp-2); align-self: stretch; margin: var(--sp-2) 0 0; }
.cv-tasks:empty { display: none; }
.cv-task { container: cv-task / inline-size; position: relative; grid-column: span 6; min-width: 0; padding: var(--sp-3) var(--sp-4) var(--sp-4); border-radius: var(--r-card); background: var(--layer); color: var(--fg); text-align: left; }
@container cv-tasks (min-width: 320px) and (max-width: 559.98px) {
  .cv-task { grid-column: span 3; }
  .cv-task:nth-child(odd):last-child { grid-column: span 6; }
}
@container cv-tasks (min-width: 560px) {
  .cv-task { grid-column: span 2; }
  .cv-task:nth-child(3n+1):last-child { grid-column: span 6; }
  .cv-task:nth-child(3n+1):nth-last-child(2), .cv-task:nth-child(3n+2):last-child { grid-column: span 3; }
}
.cv-task .ct-hd { display: grid; grid-template: "lb st" minmax(24px, auto) "t t" auto / minmax(0, 1fr) auto; align-items: center; gap: var(--sp-05) var(--sp-2); width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.cv-task .ct-nm { display: contents; }
.cv-task .ct-lb { grid-area: lb; overflow: hidden; color: var(--fg-2); font: 400 12px/16px var(--font); text-overflow: ellipsis; white-space: nowrap; }
.cv-task .ct-t { grid-area: t; display: -webkit-box; min-height: 1lh; overflow: hidden; color: var(--fg); font: 500 15px/22px var(--font); overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
@container cv-task (max-width: 299.98px) { .cv-task .ct-kind:not(:only-child) { display: none; } }   /* 좁은 카드는 알약 옆에 시각만 */
.cv-task:has(.ct-file) .ct-t { min-height: 1lh; -webkit-line-clamp: 1; }
/* the card's state: its own dot and the word in --fg-2, no fill (web/DESIGN.md 상태) */
.cv-task .ct-pill { grid-area: st; flex: none; gap: var(--sp-15); height: 24px; padding: 0; background: none; color: var(--fg-2); font: 600 12px/16px var(--font); }
.cv-task .ct-body { display: flex; gap: var(--sp-3); overflow-x: auto; scrollbar-width: none; }
.cv-task .ct-file { display: flex; flex: 1 1 0; align-items: center; gap: var(--sp-15); min-width: 96px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.cv-task .ct-file .ic { flex: none; width: 16px; height: 16px; color: var(--fg-2); }
.cv-task .ct-ft { display: flex; align-items: baseline; gap: var(--sp-15); min-width: 0; }
.cv-task .ct-ft b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); font: 500 14px/22px var(--font); }
.cv-task .ct-ft span { flex: none; color: var(--fg-3); font: 400 12px/16px var(--font); }
.cv-task .ct-bar { position: absolute; right: var(--sp-4); bottom: var(--sp-15); left: var(--sp-4); height: 3px; border-radius: 2px; background: var(--track); overflow: hidden; }
.cv-task .ct-bar span { display: block; height: 100%; background: var(--ok); }

/* 목록 행 (시제품 채팅 목록 proto .li) — 모든 너비의 공통 기반이에요: 48px 두 줄, 36px 둥근 사각 아이콘 면, 오른쪽 시각·대기 표시, 구분선 한 줄, 고른 행은 회색 면.
   프로젝트·모니터링 목록 패널도 이 형식(.cv-side 안의 .cv-row)에 맞춰요. */
#chat-convo { padding: 0; }
/* 채팅 목록 (proto listHtml): 대화는 한 장의 카드에, '메일'은 제목과 그 아래 카드로. */
#chat-convo:not(.mon-side) { background: transparent; border-radius: 0; }
.cv-foot { display: flex; justify-content: center; margin-top: var(--sp-2); }
.cv-card { overflow: hidden; border-radius: var(--r-card); background: var(--card); }
.cv-sec { margin: var(--sp-6) var(--sp-1) var(--sp-2); color: var(--fg-2); font: 600 14px/20px var(--font); }
.cv-sec:first-child { margin-top: 0; }
.cv-grp > .cv-sec:first-child { margin-top: var(--sp-6); }   /* 진행 중 leaving with its last session: header and card stay as they were */
.cv-card + :is(.cv-card, .card.empty) { margin-top: var(--sp-6); }   /* the list's loading / failed card keeps the gap between groups */
#chat-convo .cv-gh { padding: var(--sp-3) var(--sp-4) var(--sp-1); }
#chat-convo .cv-row { min-height: 48px; padding: var(--sp-2) var(--sp-4); gap: var(--sp-3); border-radius: 0; }
#chat-convo .cv-row + .cv-row { margin-top: 0; border-top: 1px solid var(--line); }
#chat-convo .cv-row.on { background: var(--row-sel); }
#chat-convo .cv-row.sub { min-height: 44px; padding-left: var(--sp-8); }
#chat-convo .cv-row .cv-n, #chat-convo .cv-row.sub .cv-n { font: 500 15px/22px var(--font); }
#chat-convo .cv-row.unread .cv-n { font-weight: 600; }
#chat-convo .cv-row .cv-p { color: var(--fg-2); font: 400 12px/16px var(--font); }
#chat-convo .cv-row.pv { align-items: center; padding-block: var(--sp-2); }
#chat-convo .cv-row.pv .cv-m { align-self: center; }
#chat-convo .cv-av { width: 36px; height: 36px; }
#chat-convo .cv-av .ic { width: 20px; height: 20px; }
#chat-convo .cv-row.sub .cv-av { width: 28px; height: 28px; }
#chat-convo .cv-m { gap: var(--sp-2); }
#chat-convo .cv-row.on::before { content: none; }   /* 폰 목록에서도 고른 행은 회색 면 하나로 (점 표시는 쓰지 않아요) */

@media (max-width: 1099px) {
  .cv-row.on { background: transparent; }
  /* 폰·태블릿: 대화는 시제품처럼 한 장의 흰 카드 (proto .cv)이고, 목록은 따로 한 화면이에요. */
  #v-chat { position: relative; height: calc(100% - 8px); margin: 0 var(--sp-3) var(--sp-2); padding: 0; border-radius: var(--r-card); background: var(--card); overflow: hidden; }
  #v-chat::before { content: none; }
  #v-chat > .cv-head { display: none; }
  #v-chat > .todo { order: 1; margin: var(--sp-2) var(--sp-3) var(--sp-1); }
  #v-chat > .chatbox { order: 4; }
  #v-chat > .composer { order: 6; padding: var(--sp-2) var(--sp-3) var(--sp-3); }
  #v-chat.cv-listing { height: 100%; margin: 0; padding: var(--sp-2) var(--sp-3) var(--sp-6); border-radius: 0; background: transparent; overflow: visible; }
  #v-chat.cv-listing > .cv-side { border-radius: var(--r-card); }
}

@media (min-width: 1100px) {
  :root { --cv-w: 240px; }
  /* 모니터링: 채팅과 같은 두 단 (docs/web-app-design.md 앱 틀). 왼쪽은 --frame-list-w의 목록(또는 앱의 패널), 오른쪽은 채팅 내용 상자까지 이어지는 내용이에요 */
  #v-monitoring { display: grid; width: 100%; max-width: none; column-gap: var(--frame-gap); grid-template-columns: var(--frame-list-w) minmax(0, 1fr); grid-template-rows: auto auto auto minmax(0, 1fr) auto; }
  #v-monitoring > * { grid-column: 2; }
  #v-monitoring > .cv-side { grid-column: 1; grid-row: 1 / -1; min-height: 0; margin-bottom: var(--sp-4); padding: var(--sp-2); }
  #v-monitoring:not(.app-two):not(.kk-on):not(.mx-on) > .cv-side { display: block; }
  :root:has(#v-monitoring:not([hidden])) { --mbox-r: var(--edge); }   /* the mail column now ends at the frame's right margin, not at a centred page */
  #v-monitoring > .cv-head { grid-row: 1; display: flex; align-items: center; gap: var(--sp-3); min-width: 0; padding: 0 0 var(--sp-3); }
  #v-monitoring > .chatbox { grid-row: 4; }
  /* 채팅: 시제품의 두 단 (proto .chat2 = 340px 목록 + 대화 카드 하나). 카드는 ::before가 그려 머리·todo·타임라인·컴포저가 한 면 안에 있어요 */
  :is(#v-chat, .pane-chat) { --cv-w: var(--frame-list-w); position: relative; display: grid; max-width: none; column-gap: var(--frame-gap); grid-template-columns: var(--cv-w) minmax(0, 1fr); grid-template-rows: auto auto auto minmax(0, 1fr) auto auto; }
  #v-chat::before { content: ""; grid-column: 2; grid-row: 1 / -1; border-radius: var(--r-card); background: var(--card); }
  #v-chat.mail-open { --cv-w: 240px; }   /* 메일 스레드 패널이 대화 옆에 서면 목록 단을 좁혀 메일 원문 폭을 지켜요 */
  :is(#v-chat, .pane-chat) > * { grid-column: 2; position: relative; z-index: 1; }
  #v-chat > .cv-side { grid-column: 1; grid-row: 1 / -1; display: block; min-height: 0; margin-bottom: var(--sp-4); padding: 0; }
  :is(#v-chat, .pane-chat) > .cv-head { grid-row: 1; display: flex; align-items: center; gap: var(--sp-2); min-width: 0; padding: var(--sp-3) var(--sp-4); }
  :is(#v-chat, .pane-chat) > .todo { grid-row: 2; margin: 0 var(--sp-3) var(--sp-1); }
  :is(#v-chat, .pane-chat) > .chatbox { grid-row: 4; }
  :is(#v-chat, .pane-chat) > .composer { grid-row: 6; width: auto; max-width: none; margin: 0; padding: var(--sp-2) var(--sp-3) var(--sp-3); }
  .cv-row.pv { padding-block: var(--sp-15); }
  .cv-row { min-height: 36px; padding: var(--sp-1) var(--sp-3); gap: var(--sp-2); border-radius: var(--r-ctl); }
  .cv-row.sub { min-height: 36px; padding-left: var(--sp-5); }
  .cv-row .cv-n, .cv-row.sub .cv-n { font-size: 14px; line-height: 20px; }
  .cv-row + .cv-row { margin-top: var(--sp-05); border-top: 0; }
  .cv-row.on { background: var(--row-sel); }
  .cv-side .cv-av, .cv-row.sub .cv-av { width: 24px; height: 24px; font-size: 12px; }
  .cv-side .cv-av .ic { width: 14px; height: 14px; }
  /* 프로젝트: the list beside the open project's page, in 채팅's frame (the same --frame-* tokens; go() in 05-command-palette.js sets .pp) */
  .views.pp { --cv-w: var(--frame-list-w); display: grid; grid-template-columns: var(--cv-w) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); column-gap: var(--frame-gap); overflow: hidden; width: 100%; padding: var(--sp-6) var(--edge) 0; }
  .views.pp > .view { min-height: 0; max-width: none; margin: 0; padding: 0 0 var(--sp-6); overflow-y: auto; }
  .views.pp > #v-projects { grid-column: 1; grid-row: 1; margin-bottom: var(--sp-4); padding: 0; background: transparent; }
  .views.pp > #v-project { grid-column: 2; grid-row: 1; max-width: none; }
  .cv-head .cv-av { width: 36px; height: 36px; font-size: 15px; }
}

/* a tab is its name and its count: the count is a plain number after the name, not a pill badge (proto .tabs) */
.nb.err { background: var(--err); }
.hr .dot.un { background: var(--accent); }
/* A watch change in a row's sub line or a card (nwChangeNode): the old value grey and struck, the new one the only emphasis (the landing page's 가격 알림 card). */
.nw-chg s { color: var(--fg-3); }
.nw-chg em { font-style: normal; font-weight: 600; color: var(--accent); }
/* In the 알림 timeline every message carried a red dot; it is a quiet grey now, the new one arrives by moving in, not by colour. */
#tl > .bm.alert .mn::before { background: var(--fg-3); opacity: .6; }

/* the result file of a finished worker under its system line (11-todo-strip.js hcSysFiles); a running line does not pulse */
.tl-in > .cv-sys-f { display: flex; flex-wrap: wrap; justify-content: center; align-self: center; gap: var(--sp-15); max-width: 100%; margin: var(--sp-15) auto 0; }
.cv-sys-f .fatt { height: 44px; max-width: 100%; background: var(--card); text-decoration: none; cursor: pointer; }
@media (hover: hover) { .cv-sys-f .fatt:hover { background: var(--hover); } }

/* 감시 변화 알림 행 (소개 페이지 가격 알림): 32px 둥근 아이콘 칸, 500 제목, 아래 13px 회색 변화 줄(옛값 취소선·새값 600 강조색), 오른쪽 회색 시각(원칙 2·4) */
.hr.nt-w .hn1 { font-weight: 500; }
.hr.nt-w .ha { color: var(--fg-3); }
.nt-wi { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--layer); color: var(--fg-2); }
.nt-wi.new { background: color-mix(in srgb, var(--accent) 12%, var(--card)); color: var(--accent); }
.nt-wi .ic { width: 16px; height: 16px; }
.nt-wt { flex: none; align-self: flex-start; padding-top: var(--sp-05); color: var(--fg-3); font: 400 12px/16px var(--font); font-variant-numeric: tabular-nums; }
.nw-chg em { font-weight: 600; }

/* Computers (33-peers.js): the bot name as the switcher (its unread dot), the switch sheet (on the .ds-* sheet of 09-notices.css) and the bell's other-computer lines. */
/* the trigger: the brand row (wide) and the page title (phone, a page without a back arrow). On the phone the dot sits at the name's bottom right, inside its padding so the ellipsis clip keeps it */
.appbar.hasp:not(.back) h1 { cursor: pointer; }
@media (max-width: 1099px) { .appbar.hasp:not(.back) h1 { flex: 0 1 auto; margin-right: auto; } }
.appbar:not(.back) h1.pdot { position: relative; padding-right: var(--sp-3); }
.appbar:not(.back) h1.pdot::after { content: ""; position: absolute; right: 0; bottom: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
/* A computer switcher is there: a small chevron after the name says the name opens it (owner 2026-11-03). On the phone's page title the chevron
   sits at the title's right end and the computer dot keeps the name's bottom-right corner just before it. */
.appbar.hasp:not(.back) h1::before { content: ""; flex: none; width: 6px; height: 6px; border-right: 1.5px solid var(--fg-3); border-bottom: 1.5px solid var(--fg-3); transform: rotate(45deg); }
/* the brand row: one chevron right after the name, only with a computer to switch to (it reserves nothing otherwise); the other computers' dot sits at its bottom right */
.brand-c { position: relative; display: flex; flex: none; margin-left: calc(var(--sp-1) * -1); color: var(--fg-3); }
.brand-c[hidden] { display: none; }
.brand-c .ic { width: 14px; height: 14px; }
.brand-c.pdot::after { content: ""; position: absolute; right: -2px; bottom: -1px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.brand-c.p-need::after { background: var(--warn); }
/* the phone tab bar's Home icon: the same dot (size and place are the tab dot's, 01-tokens.css .ni .nub), the same colors; the wide sidebar hides it (22-shell.css) */
.ni .nub.pc { background: var(--accent); }
.ni .nub.pc.p-need { background: var(--warn); }
.appbar.hasp:not(.back) h1 { position: relative; padding-right: var(--sp-4); }
.appbar.hasp:not(.back) h1::before { position: absolute; right: 2px; top: 50%; margin-top: calc(var(--sp-15) * -1); }
.appbar.hasp:not(.back) h1.pdot { min-width: var(--btn-hit); }
.appbar.hasp:not(.back) h1.pdot::after { right: 0; bottom: auto; top: calc(50% - var(--sp-4)); }
.appbar:not(.back) h1.p-need::after { background: var(--warn); }
/* the switcher (proto.css .pop): "내 컴퓨터" over one low row per computer - status dot, name over one quiet line, the check or the waiting count at the right -
   and 컴퓨터 관리 under a line. With the sidebar's brand row on screen it is a popover right under that row (no scrim, .anch); the phone keeps its bottom sheet. */
.ds-sheet.pr-sheet { box-shadow: none; animation: none; }
@media (min-width: 700px) { .ds-sheet.pr-sheet { max-width: 340px; } }
.ds-bd.anch { display: block; background: transparent; animation: none; }
.ds-bd.anch .ds-sheet.pr-sheet { position: fixed; width: 240px; max-width: calc(100vw - 24px); padding: var(--sp-15); border-radius: 14px; box-shadow: var(--float); }
.pr-hd { padding: var(--sp-4) var(--sp-5) var(--sp-15); color: var(--fg-3); font: 600 12px/16px var(--font); }
.anch .pr-hd { padding: var(--sp-2) var(--sp-2) var(--sp-1); font-weight: 400; }
.pr-list { display: flex; flex-direction: column; gap: var(--sp-05); padding: 0 var(--sp-2) var(--sp-2); }
.anch .pr-list { padding: 0; }
.pr-row { display: flex; align-items: center; gap: var(--sp-3); width: 100%; min-height: 48px; padding: var(--sp-15) var(--sp-3); border: 0; border-radius: 10px; background: transparent; color: var(--fg); font: inherit; text-align: left; }
.anch .pr-row { padding: var(--sp-15) var(--sp-2); }
@media (hover: hover) { .pr-row:hover { background: var(--hover); } }
.pr-row:active { background: var(--active); }
.pr-row.off .pr-t { color: var(--fg-3); }
.pr-row.off { cursor: default; }
.pr-row.off:active { background: transparent; } @media (hover: hover) { .pr-row.off:hover { background: transparent; } }
.pr-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pr-t { min-width: 0; font: 500 15px/22px var(--font); word-break: keep-all; overflow-wrap: anywhere; }
.pr-sub { color: var(--fg-3); font: 400 12px/16px var(--font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-n { flex: none; min-width: 18px; height: 18px; padding: 0 var(--sp-15); border-radius: 9px; background: var(--layer); color: var(--fg-2); font: 600 11px/18px var(--font); text-align: center; }
.pr-n.need { background: var(--warn); color: var(--bg); }
.pr-ck { flex: none; width: 16px; height: 16px; margin-left: auto; color: var(--fg-3); }
.pr-manage { min-height: 44px; margin-top: var(--sp-1); border-radius: 0 0 10px 10px; box-shadow: 0 -1px 0 var(--line); }
.pr-manage .ic { flex: none; width: 16px; height: 16px; color: var(--fg-3); }
@media (prefers-reduced-motion: reduce) { .pr-row { transition: none; } }
.pr-line .chev { flex: none; align-self: center; color: var(--fg-3); }

/* another computer opened inside the installed app (33-peers.js prGo): the whole screen, the safe areas kept by this frame because a page in an iframe reads them as 0 */
.pr-frame { position: fixed; inset: 0; z-index: 2000; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); background: var(--bg); }
.pr-frame iframe { display: block; width: 100%; height: 100%; border: 0; background: var(--bg); }
.pr-frame-x { position: absolute; top: calc(env(safe-area-inset-top) + 4px); right: calc(env(safe-area-inset-right) + 4px); z-index: 1; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); box-shadow: var(--shadow-menu); }

/* a relayed computer's chat (42-relay-chat.js): the normal chat view; what its messenger cannot carry is not drawn */
body.rl :is(#c-attach, #c-own, #c-model, #c-effort, #c-worker, #ctx-ring, #c-pc, #c-api, #c-fb, #working, #runline, #runstate, #pausenote, #dcard, #hints, #atray, #todo, #vtog, #cvmenu, #pjmenu) { display: none !important; }
.relaynote { margin: 0 0 var(--sp-15); padding: 0 var(--sp-1); color: var(--fg-3); font: 400 12px/16px var(--font); }
.rl-pend { opacity: 0.6; }

/* A messenger-only computer's 홈 / 프로젝트 / 모니터링 / 설정, drawn read-only from its last snapshot (js/44-relay-views.js). Rows are the screens' own (.hr, .pl-row, .li). */
/* !important: the screens' own id rules (#v-monitoring > .cv-side, #home-now) would otherwise draw this computer's data under the snapshot */
.view.rv-on > :not(.rv) { display: none !important; }
#v-monitoring.rv-on > .rv { display: block !important; grid-column: 1 / -1; grid-row: 1 / -1; }   /* its list mode (.cv-listing) hides every child but the list */
.rv { min-width: 0; }
.view.fill.rv-on > .rv { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: var(--sp-6); }
.rv-head { display: flex; align-items: baseline; gap: var(--sp-2); min-width: 0; margin: 0 var(--sp-1) var(--sp-2); }
.rv-head .rv-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); font: 600 var(--fs-sec)/var(--lh-sec) var(--font); }
.rv > .list + .sec, .rv > .pl-list + .rv-foot, .rv > .list + .rv-foot, .rv > .card + .rv-foot { margin-top: var(--sp-6); }
.rv-row { cursor: default; }
.rv .li > .dot { margin-top: 0; }
.rv-foot { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-2); margin-top: var(--sp-6); padding: 0 var(--sp-1); }
.rv-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2); margin-top: var(--sp-3); }

/* ---------- composer above the phone keyboard ----------
   --kb / --vvh come from web/js/34-composer-viewport.js (visualViewport). With interactive-widget=resizes-content the page already shrinks
   above the keyboard and --kb stays 0; on a browser that ignores it, --kb shrinks the app so the whole composer still sits above the keyboard.
   The layout is the default one; only the box's growth is capped: about 5 lines, and never more than 40% of the visible height for the
   whole composer (box + chip row + paddings, ~72px), then the box scrolls inside itself. */
@media (max-width: 639px) {
  .app { height: calc(100dvh - var(--kb, 0px)); }
  .sendrow textarea { max-height: max(calc(2.5em + 2 * var(--ta-pad)), min(calc(7.5em + 2 * var(--ta-pad)), calc(var(--vvh, 100dvh) * .4 - 72px))); overflow-y: auto; }
}

/* code blocks in messages: a bar with copy / run buttons above the code (web/js/35-code-blocks.js); web terminal sheet (36-shell.js) */
.md .cb { max-width: 100%; margin: var(--sp-3) 0 var(--sp-4); border: 1px solid var(--line-2); border-radius: 12px; background: var(--layer); overflow: hidden; }
.md .cb > pre { margin: 0; padding-top: var(--sp-15); border: 0; border-radius: 0; background: none; }
.cb-bar { display: flex; align-items: center; justify-content: flex-end; gap: var(--sp-15); padding: var(--sp-15) var(--sp-15) 0 var(--sp-3); -webkit-user-select: none; user-select: none; }
.cb-bar[data-lang]::before { content: attr(data-lang); margin-right: auto; color: var(--fg-3); font: 500 11px/16px var(--mono); }
.cb-btn { display: inline-flex; align-items: center; justify-content: center; flex: none; min-height: 36px; padding: 0 var(--sp-3); border: 0; border-radius: var(--r-ctl); background: var(--hover); color: var(--fg-2); font: 600 13px/20px var(--font); cursor: pointer; touch-action: manipulation; }
.cb-btn::after { content: attr(data-label); }
@media (hover: hover) { .cb-btn:hover { background: var(--active); color: var(--fg); } }
.cb-btn.run { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.cb-btn.done { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.cb-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

dialog.dlg.shell[open] { display: flex; flex-direction: column; width: min(820px, calc(100vw - 24px)); height: min(760px, calc(var(--vvh, 100dvh) - 24px)); padding: var(--sp-3); overflow: hidden; }
dialog.dlg.shell .fs-hd { padding: 0 0 var(--sp-2); }
dialog.dlg.shell .dbody { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 0; overflow: hidden; }
dialog.dlg.shell .dact { display: none; }
.sh-wrap { position: relative; display: flex; flex-direction: column; gap: var(--sp-2); flex: 1; min-height: 0; min-width: 0; }
.sh-st { margin-right: var(--sp-1); font: 500 12px/16px var(--font); color: var(--fg-3); white-space: nowrap; }
.sh-st[data-tone="ok"] { color: var(--ok); }
.sh-st[data-tone="err"] { color: var(--err); }
.sh-fail { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-3); }
.sh-term { flex: 1; min-height: 120px; min-width: 0; padding: var(--sp-2) var(--sp-1) var(--sp-1) var(--sp-2); border-radius: 12px; background: var(--tb); overflow: hidden; }
.sh-term .xterm { height: 100%; }
.sh-term .xterm-viewport { background: transparent !important; scrollbar-width: thin; }
.sh-term .xterm-screen { cursor: text; }
@media (pointer: coarse) { .sh-term .xterm-helper-textarea { font-size: 16px; } }
.ib.sh-k-pw, .ib.sh-more { display: inline-flex; align-items: center; justify-content: center; height: 32px; width: auto; min-width: 32px; padding: 0 var(--sp-2); gap: var(--sp-1); color: var(--fg-2); }
.ib.sh-k-pw .ic { width: 16px; height: 16px; }
.ib.sh-k-pw .sh-k-t { font: 500 12px/16px var(--font); }
.ib.sh-k-pw.hot { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.ib.sh-more { font-size: 20px; line-height: 28px; }
.sh-keys { display: flex; gap: var(--sp-1); padding-bottom: var(--sp-05); overflow-x: auto; scrollbar-width: none; }
.sh-keys::-webkit-scrollbar { display: none; }
.btn.sh-k { flex: 1 1 0; min-width: 0; height: 40px; padding: 0 var(--sp-05); font-family: var(--mono); }
.btn.sh-k.on { background: var(--accent); color: var(--bg); }
.sh-pw { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 2; display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-3); border-radius: 12px; background: color-mix(in srgb, var(--accent) 14%, var(--card)); box-shadow: 0 8px 24px rgb(0 0 0 / .3); }
.sh-pw[hidden] { display: none; }
.sh-pw-t { color: var(--fg-2); font: 500 12.5px/18px var(--font); }
.sh-pw-r { display: flex; align-items: center; gap: var(--sp-15); }
.btn.sh-pw-send { flex: none; height: 44px; min-width: 76px; }
.sh-pw-in { flex: 1; min-width: 0; height: 44px; padding: 0 var(--sp-3); border: 0; border-radius: var(--r-ctl); background: var(--ff-fill); color: var(--fg); font: 16px var(--font); }
.sh-pw-in:focus { outline: 0; box-shadow: var(--ff-ring); }
@media (max-width: 639px) {
  dialog.dlg.shell[open] { width: 100vw; max-width: 100vw; height: var(--vvh, 100dvh); max-height: none; margin: 0; border-radius: 0; padding: max(var(--sp-2), env(safe-area-inset-top)) var(--sp-2) max(var(--sp-2), env(safe-area-inset-bottom)); }
}

/* a 목록 fence (02-basic-markdown.js listBlockHtml): list rows like a messenger's chat list */
/* a ```chart fence (web/js/02-chart.js): the gateway's drawing in the app's theme, one <img> per theme */
.md .ans-chart { margin: var(--sp-3) 0 var(--sp-4); min-height: var(--sp-12); }
.md .ans-chart img { display: block; width: 100%; max-width: 720px; height: auto; }
.md .ans-chart .ans-chart-dark, :root[data-theme="dark"] .md .ans-chart .ans-chart-light { display: none; }
:root[data-theme="dark"] .md .ans-chart .ans-chart-dark { display: block; }
.md .mlist { margin: var(--sp-3) 0 var(--sp-4); border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); overflow: hidden; }
.md .mlist-h { padding: var(--sp-3) var(--sp-4) var(--sp-15); color: var(--fg-3); font: 600 13px/18px var(--font); }
.md .mlist-row { display: flex; align-items: center; gap: var(--sp-3); min-height: 48px; padding: var(--row-py) var(--sp-4); }
.md .mlist-row + .mlist-row { border-top: 1px solid var(--line); }
.md .mlist-av { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 15px; background: var(--layer); color: var(--fg-2); font: 600 16px/1 var(--font); }
.md .mlist-main { flex: 1; min-width: 0; }
.md .mlist-t, .md .mlist-s { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md .mlist-t { color: var(--fg); font: 500 15px/22px var(--font); }
.md .mlist-s { color: var(--fg-3); font: 400 13px/18px var(--font); }
.md .mlist-r { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: var(--sp-1); }
.md .mlist-m { color: var(--fg-3); font: 400 12px/16px var(--font); }
/* a source list (02-basic-markdown.js sourceListHtml): the same frame with low link rows; the clipped full URL is what a copy picks up */
.md a.mlist-row { position: relative; min-height: var(--row-h); color: inherit; text-decoration: none; }
@media (hover: hover) { .md a.mlist-row:hover { background: var(--card-hover); } }
.md .mlist-src .mlist-av { width: 28px; height: 28px; border-radius: var(--r-seg); font-size: var(--fs-sec); }
.md .mlist-src .mlist-t { font: 500 var(--fs-sec)/var(--lh-sec) var(--font); }
.md .mlist-src .mlist-s { font: 400 var(--fs-meta)/var(--lh-meta) var(--font); }
.md .mlist-src .mlist-av { -webkit-user-select: none; user-select: none; }
.md .mlist-url { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.md .mlist-b { min-width: 20px; height: 20px; padding: 0 var(--sp-15); border-radius: 10px; background: var(--err); color: #fff; font: 600 11px/20px var(--font); text-align: center; }

/* menus: they open where they are anchored, fading in from the edge they came from (--m-fast, 8px); a phone menu sheet rises from the bottom (--m-base). Both fade out (--m-fast) in closeMenu (03-menu.js).
   The global reduced-motion rule (01-tokens.css) turns both off. */
.menu { animation: menu-in var(--m-fast) var(--m-ease); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } }
.menu.msheet { animation: menu-sheet-in var(--m-base) var(--m-ease); }
@keyframes menu-sheet-in { from { transform: translateY(100%); } }
/* The scrim of a native <dialog> (dialog(), the palette): fades in with it (--m-base; the palette --m-fast) and out while it leaves (motionDialog sets [data-leaving], 150ms). */
dialog[open]::backdrop { animation: m-scrim-in var(--m-base) var(--m-ease); }
dialog.pal[open]::backdrop { animation-duration: var(--m-fast); }
dialog[data-leaving][open]::backdrop { animation: m-scrim-out var(--m-fast) var(--m-ease) forwards; }
@keyframes m-scrim-in { from { opacity: 0; } }
@keyframes m-scrim-out { to { opacity: 0; } }

/* command palette (05-command-palette.js): the prototype's floating card (proto.css .pal) - one 52px search field with a line under it,
   low rows, and a footer that names the keys. The chosen row is the selected-row fill (docs/ui-spec.md 목록 행). */
dialog.pal { display: flex; flex-direction: column; width: min(560px, calc(100vw - 24px)); max-height: min(560px, calc(100dvh - 24px)); border-radius: var(--r-card); overflow: hidden; }
dialog.pal .pal-head { flex: none; gap: 0; height: 52px; padding: 0 var(--sp-5); }
dialog.pal .pal-head { border-bottom: 1px solid var(--line); }
dialog.pal .pal-in { font-size: 16px; }
dialog.pal .pal-list { flex: 1 1 auto; min-height: 0; max-height: min(56dvh, 420px); padding: var(--sp-15); }
dialog.pal .ph { padding: var(--sp-2) var(--sp-3) var(--sp-1); }
dialog.pal .pal-i { min-height: var(--row-h); padding: var(--sp-15) var(--sp-3); gap: var(--sp-3); }
dialog.pal .pal-i .pd { flex: 0 1 auto; max-width: 45%; margin-left: auto; text-align: right; }
dialog.pal .pal-i.on, dialog.pal .pal-i:focus-visible { background: var(--row-sel); }
dialog.pal .pal-out { flex: 1 1 auto; min-height: 0; }
dialog.pal .pal-ft { flex: none; display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-4); border-top: 1px solid var(--line); color: var(--fg-3); font: 400 12px/16px var(--font); }
:root[data-pointer] dialog :focus-visible { outline: 0; }
@media (hover: none) and (pointer: coarse) { dialog.pal .pal-ft, dialog.pal .pd.key { display: none; } }
@media (max-width: 639px) {
  dialog.pal { margin-top: 12vh; }
  dialog.pal .pal-i { min-height: 44px; }
}

/* Full-screen overlay: the one frame for every pop-up over the app (38-overlay.js fsOpen; 02-basic-markdown.js dialog() wears the same classes on a native <dialog>).
   Phone: covers the whole screen, tab bar included: header (title, 무시, close) and footer (actions) stay put, only the body scrolls, safe-area padded,
   kept above the keyboard (.kb, set by fsOpen). Desktop: a centered dialog (.tall = the large one, for a draft). Menus, toasts and tooltips are not overlays. */
.fs-bd { position: fixed; inset: 0; z-index: 1300; display: flex; align-items: center; justify-content: center; background: var(--scrim); }
.fs-card { --fs-fill: var(--layer); display: flex; flex-direction: column; width: min(560px, calc(100% - 48px)); max-height: min(86dvh, 820px); margin: 0; border-radius: var(--r-sheet); background: var(--card); color: var(--fg); box-shadow: var(--float); overflow: hidden; }
/* fsOpen and dialog() move their own sheet (38-overlay.js, 02-basic-markdown.js: motionSheet / motionDialog in 01-motion.js). */
.fs-card:focus { outline: 0; }
.fs-card.tall { width: min(720px, calc(100% - 48px)); height: min(86dvh, 820px); }
dialog.fs-card:not([open]) { display: none; }
dialog.fs-card::backdrop { background: var(--scrim); }
.fs-hd { flex: none; display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-4) var(--sp-2) var(--sp-3) var(--sp-6); }
.fs-tt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-05); }
.fs-ey { display: block; color: var(--fg-2); font: 600 13px/20px var(--font); }
.fs-ey .fs-left { color: var(--accent); }
.fs-t .fs-left { color: var(--fg-3); font: 400 var(--fs-meta)/var(--lh-meta) var(--font); letter-spacing: 0; }   /* the mail sheet's progress, quiet beside the title */
.fs-t { margin: 0; font: 700 var(--fs-page-sm)/var(--lh-page-sm) var(--font); letter-spacing: -.02em; overflow-wrap: anywhere; }
.fs-ey.warn { color: var(--warn); }
.fs-ey.err { color: var(--err); }
.fs-ey.done { color: var(--ok); }
.fs-ey.ign { color: var(--fg-3); }
.fs-hb { flex: 0 1 auto; min-width: 0; max-width: 60%; display: flex; align-items: center; gap: var(--sp-05); }
.fs-hb > :not(.fs-x) { flex: 0 1 auto; min-width: 0; }
.fs-hb > :not(.fs-x) > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-ign { display: inline-flex; align-items: center; gap: var(--sp-1); min-height: 44px; padding: 0 var(--sp-3); border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--fg-2); font: 500 14px/20px var(--font); }
@media (hover: hover) { .fs-ign:hover { background: var(--hover); color: var(--fg); } }
.fs-ign:active { background: var(--active); }
.fs-ign:disabled { opacity: .55; }
.ib.fs-x { width: 44px; height: 44px; border-radius: var(--r-ctl); color: var(--fg-3); }
.fs-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: var(--sp-1) var(--sp-6) var(--sp-4); }
.fs-body.panel { margin: 0 var(--sp-4); padding: var(--sp-4); border-radius: var(--r-ctl); background: var(--fs-fill); }
.fs-body.fit { flex: 0 1 auto; }
.fs-body:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.fs-ft { flex: none; margin-top: auto; display: flex; flex-direction: column; gap: var(--sp-2); max-height: 55%; overflow-y: auto; overscroll-behavior: contain; padding: var(--sp-3) var(--sp-6) var(--sp-4); }
@media (min-width: 640px) { .fs-body.panel ~ .fs-ft { padding-inline: var(--sp-4); } }   /* a panel body stands 16px from the sheet edge: the footer lines up with the panel */
.fs-ft.row { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; max-height: none; }
.fs-ft:empty { display: none; }
.fs-ft .dc-row, .fs-ft .dc-note, .fs-ft .dc-back { background: var(--fs-fill); }
.fs-ft .dc-row.on { background: color-mix(in srgb, var(--accent) 12%, var(--fs-fill)); }
.fs-ft .dc-st { padding: 0 var(--sp-1); }
.fs-ft .dc-note { min-height: 88px; }
@media (max-width: 639px) {
  .fs-bd { align-items: stretch; background: var(--bg); }
  .fs-bd.kb { bottom: auto; }
  .fs-card, .fs-card.tall, dialog.dlg.fs-card[open] { --fs-fill: var(--card); width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; border-radius: 0; background: var(--bg); box-shadow: none; padding-top: env(safe-area-inset-top); }
  dialog.dlg.fs-card[open] { height: var(--vvh, 100dvh); }
  .fs-card:not(.mid) .btn.tonal, .fs-card:not(.mid) .btn.outlined { background: var(--card); }
  .fs-card:not(.mid) :is(.card, .list, .app-sw) :is(.btn.tonal, .btn.outlined) { background: var(--layer); }   /* but a pale button on a card inside the sheet keeps its own grey, or it would vanish into the card */   /* the sheet is --bg and a pale button is --layer, the same grey in light: the button sits on --card */
  .fs-hd { padding-left: max(var(--sp-4), env(safe-area-inset-left)); padding-right: max(var(--sp-2), env(safe-area-inset-right)); }
  .fs-body { padding-left: max(var(--sp-4), env(safe-area-inset-left)); padding-right: max(var(--sp-4), env(safe-area-inset-right)); }
  .fs-body.panel { margin: 0 max(var(--sp-2), env(safe-area-inset-left)); padding: var(--sp-4); }
  .fs-ft { padding: var(--sp-3) max(var(--sp-4), env(safe-area-inset-right)) max(var(--sp-4), env(safe-area-inset-bottom)) max(var(--sp-4), env(safe-area-inset-left)); }
  .fs-ft.row .btn:only-child { flex: 1; }
}
/* .mid: a middle sheet for one short input with a short list under it (앱 관리). PC the centered card above; phone a sheet from the bottom, not full screen. */
@media (max-width: 639px) {
  .fs-bd:has(> .fs-card.mid) { align-items: flex-end; background: var(--scrim); }
  dialog.dlg.fs-card.mid[open] { margin: auto 0 0; }
  /* the sheet is a card, so a field in it takes the fill a field has on a card (on the full screen it sits on --bg) */
  .fs-card.mid, dialog.dlg.fs-card.mid[open] { --ff-fill: var(--ff-pop); height: fit-content; max-height: min(86dvh, 820px, calc(var(--vvh, 100dvh) - var(--sp-2))); border-radius: var(--r-sheet) var(--r-sheet) 0 0; background: var(--card); padding-top: 0; }
}

/* ---------- 원문 보기 (web/js/10-draft-original.js): the mail or comment a draft answers, as its own panel next to the draft ---------- */
/* Hosts: the send sheet (.fs-card.od-host, 14-overlay.css) and the comment view's draft (.od-cwrap). The draft is untouched; .od-on = the original is shown.
   >= 900px: the original is a separate card (header 원문 + x, own scroll) to the left, the draft slides right (250ms). Narrower: the 초안 | 원문 toggle slides between them. */
.od-bar { flex: none; display: flex; margin: 0 var(--sp-4) var(--sp-2); }
.od-tg { display: inline-flex; align-items: center; gap: var(--sp-15); min-height: 36px; padding: 0 var(--sp-3); border: 0; border-radius: var(--r-ctl); background: var(--fs-fill); color: var(--fg-2); font: 500 14px/20px var(--font); }
@media (hover: hover) { .od-tg:hover { background: var(--hover); } }
.od-tg:active { background: var(--active); }
.od-tg svg { flex: none; width: 16px; height: 16px; }
.od-tt { color: var(--fg); font-weight: 600; }
.od-seg { display: none; }
.od-sg { min-height: 36px; padding: 0 var(--sp-3); border: 0; border-radius: 8px; background: transparent; color: var(--fg-3); font: 600 14px/20px var(--font); }
.od-sg[aria-pressed="true"] { background: var(--card); color: var(--fg); box-shadow: 0 1px 3px rgb(0 0 0 / .14); }
.od-stage, .od-draftcol { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.od-orig { display: flex; flex-direction: column; min-width: 0; color: var(--fg); transition: opacity var(--m-slow) var(--m-ease), transform var(--m-slow) var(--m-ease), visibility 0s; }
.od-orig[inert] { visibility: hidden; transition-delay: 0s, 0s, .25s; }
.od-oh { flex: none; display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-4) var(--sp-2) var(--sp-2) var(--sp-6); }
.od-ot { flex: 1; min-width: 0; font: 700 18px/26px var(--font); letter-spacing: -.02em; }
.od-pane { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: var(--sp-1) var(--sp-6) var(--sp-6); }
.od-pane:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.od-pane .dc-dh { align-items: flex-start; }
.od-pane .dc-dr-k { flex: none; }
.od-pane .dc-dr-v { min-width: 0; overflow-wrap: anywhere; }
.od-body { margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--line-2); min-width: 0; }
.od-body .mb-txt { max-width: none; padding: 0; border: 0; background: transparent; }
.od-files { display: flex; flex-direction: column; gap: var(--sp-15); margin-top: var(--sp-3); }
.od-post { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; margin-bottom: var(--sp-3); }
.od-post .kk-av.kk-thumb { flex: none; width: 56px; height: 40px; border-radius: 8px; object-fit: cover; }
.od-pt { display: flex; flex-direction: column; min-width: 0; }
.od-ptt { font: 600 14px/20px var(--font); overflow-wrap: anywhere; }
.od-parent { display: flex; flex-direction: column; gap: var(--sp-05); margin-top: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-left: 3px solid var(--line-2); color: var(--fg-3); font-size: 14px; line-height: 20px; }
.od-pc { overflow-wrap: anywhere; white-space: pre-wrap; }
.od-ct { white-space: pre-wrap; overflow-wrap: anywhere; font: 400 15px/23px var(--font); }
.od-pane .od-open { display: inline-flex; align-items: center; gap: var(--sp-15); min-height: 44px; margin-top: var(--sp-1); color: var(--accent); font: 500 14px/20px var(--font); text-decoration: none; }
.od-pane .od-open svg { width: 16px; height: 16px; }
.od-note { color: var(--fg-3); font-size: 14px; line-height: 22px; }

/* comment view: the draft card is the .kk-draft inside .od-cwrap; the original is a card of the same family */
.od-cwrap { flex: none; display: flex; flex-direction: column; }
.od-cwrap > .od-bar { margin: 0 0 var(--sp-15); }
.od-cwrap .od-stage { flex: none; }
.od-cwrap .od-orig { background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow-panel); max-height: min(46dvh, 360px); }
.od-cwrap .od-oh { padding: var(--sp-2) var(--sp-1) 0 var(--sp-4); }
.od-cwrap .od-ot { font: 600 14px/20px var(--font); }
.od-cwrap .od-x { width: 36px; height: 36px; }
.od-cwrap .od-pane { padding: var(--sp-1) var(--sp-4) var(--sp-3); }
.kk-drafts:has(.od-on) { max-height: min(62dvh, 520px); }

@media (min-width: 900px) {
  .fs-card.tall.od-host { --od-p: clamp(300px, calc(100vw - 784px), 480px); position: relative; overflow: visible; transition: transform var(--m-slow) var(--m-ease), width var(--m-slow) var(--m-ease); }
  .fs-card.tall.od-host.od-on { width: min(720px, calc(100vw - 64px - var(--od-p))); transform: translateX(calc((var(--od-p) + 16px) / 2)); }
  .fs-card .od-orig { position: absolute; top: 0; bottom: 0; right: calc(100% + 16px); width: var(--od-p); background: var(--card); border-radius: 20px; box-shadow: var(--float); overflow: hidden; opacity: 0; transform: translateX(24px); }
  .od-on > .od-stage > .od-orig { opacity: 1; transform: none; }
  .od-cwrap .od-stage { flex-direction: row; align-items: stretch; }
  .od-cwrap .od-orig { flex: 0 0 0; opacity: 0; transform: translateX(-16px); overflow: hidden; transition: flex-basis var(--m-slow) var(--m-ease), margin var(--m-slow) var(--m-ease), opacity var(--m-slow) var(--m-ease), transform var(--m-slow) var(--m-ease), visibility 0s; }
  .od-cwrap.od-on .od-orig { flex-basis: 45%; margin-right: var(--sp-3); opacity: 1; transform: none; }
  .od-cwrap .od-orig[inert] { transition-delay: 0s, 0s, 0s, 0s, .25s; }
  .od-cwrap .kk-draft { flex: 1 1 0; min-width: 0; }
}
@media (max-width: 899px) {
  .od-bar { margin: 0 max(var(--sp-2), env(safe-area-inset-left)) var(--sp-2) max(var(--sp-2), env(safe-area-inset-left)); }
  .od-cwrap > .od-bar { margin: 0 0 var(--sp-15); }
  .od-tg { display: none; }
  .od-seg { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-05); padding: 3px; /* nudge: 3px tray keeps the 11px corner concentric with the 8px cells */ border-radius: 11px; background: var(--layer); }
  .od-stage { position: relative; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); overflow: hidden; }
  .od-draftcol, .od-orig, .od-cwrap .kk-draft { grid-area: 1 / 1; min-width: 0; min-height: 0; }
  .od-draftcol, .od-cwrap .kk-draft { transition: transform var(--m-slow) var(--m-ease), visibility 0s; }
  .od-draftcol[inert], .od-cwrap .kk-draft[inert] { visibility: hidden; transition-delay: 0s, .25s; }
  .od-on > .od-stage > .od-draftcol, .od-on > .od-stage > .kk-draft { transform: translateX(-100%); }
  .od-orig { align-self: stretch; transform: translateX(100%); }
  .od-on > .od-stage > .od-orig { transform: none; }
  .od-oh { display: none; }
  .fs-card .od-pane { margin: 0 max(var(--sp-2), env(safe-area-inset-left)); padding: var(--sp-4); border-radius: 12px; background: var(--fs-fill); }
  .od-cwrap .od-stage { display: grid; }
  .od-cwrap .od-pane { margin: 0; padding: var(--sp-3) var(--sp-4); }
  .od-cwrap .od-orig { background: var(--card); }
  .od-pane .dc-dh { flex-direction: column; gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .od-orig, .od-draftcol, .od-cwrap .kk-draft, .fs-card.tall.od-host, .od-cwrap .od-orig { transition: none; }
}
/* the comment a combined card (reply + mail) answers, inline at the top of the card (10-draft-original.js orgInline) */
.od-inline { display: flex; flex-direction: column; gap: var(--sp-15); min-width: 0; margin-bottom: var(--sp-3); padding-bottom: var(--sp-3); border-bottom: 1px dashed var(--line-2); }
.od-inline .od-pane, .fs-card .od-inline .od-pane { flex: none; overflow: visible; margin: 0; padding: 0; border-radius: 0; background: none; }
.od-inline .od-open { min-height: 36px; }
.dr-fh.ok { color: var(--ok); }
/* The original of a mail row of 모니터링 > 메일 (10-draft-original.js orgMailRow, opened from the ⋯ menu), folded open on its own full line of the row */
.mr .od-pane.mr-op { flex: 1 0 100%; min-width: 0; max-width: 100%; overflow: visible; margin: var(--sp-1) 0 var(--sp-2); padding: var(--sp-3) var(--sp-4); border: 1px solid var(--line-2); border-radius: var(--r-ctl); background: var(--bg); color: var(--fg); cursor: auto; user-select: text; }
/* 날짜 and 제목 at the size of the sender box above them; these panes inherit a larger row or card size */
.mr-op .dc-dr-v, .rq-op .dc-dr-v { font: 400 14px/20px var(--font); }
@media (min-width: 1100px) {
  /* the one-line row: an open row wraps so the original takes the full width under that line */
  #mon-tl > .mr > .mr-op { order: 10; }
  #mon-tl > .bm.rc.mr:has(> .mr-op) { flex-wrap: wrap; height: auto; padding-top: var(--sp-2); padding-bottom: var(--sp-1); }
}

/* 답장 초안 카드 (web/js/10-reply-card.js) and the 답장 대기 screen (web/js/30-replies.js) */
/* 머리: 한 줄 (받는 사람 + 출처), 상태는 오른쪽 (owner 2026-11-03: 머리줄은 한 줄, 초안이 주인공) */
.rq-hd { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; min-height: 20px; color: var(--fg-3); font-size: var(--fs-meta); line-height: var(--lh-meta); }
/* who the card answers is the line; where it came from and the computer follow only when they fit whole (a part that does not fit wraps under and is clipped, never cut to "· 노…") */
.rq-meta { display: flex; flex: 1; flex-wrap: wrap; align-items: baseline; min-width: 0; max-height: 18px; overflow: hidden; white-space: nowrap; color: var(--fg-2); font-weight: 400; line-height: 18px; }
.rq-meta .rq-wt { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; color: var(--fg); font-size: 13px; line-height: 18px; font-weight: 600; }
.rq-meta .rq-src { flex: none; color: var(--fg-3); font-weight: 400; white-space: pre; }
.rq-meta .mon-pc { flex: none; white-space: pre; }
.rq-hd .rc-time { flex: none; }
.rq-lb { margin-top: var(--sp-2); color: var(--fg-3); font: 500 var(--fs-meta)/var(--lh-meta) var(--font); }
.rq-rcpt { display: flex; flex-wrap: wrap; gap: var(--sp-05) var(--sp-3); min-width: 0; margin-top: var(--sp-2); }
.rq-rc { display: inline-flex; gap: var(--sp-1); min-width: 0; max-width: 100%; }
.rq-rv { min-width: 0; color: var(--fg-2); font-size: var(--fs-meta); line-height: var(--lh-meta); overflow-wrap: anywhere; }
.rq-sub { margin-top: var(--sp-15); }
/* 원문: 회색·왼쪽 괘선·두 줄, 길면 원문 보기 (원칙 5: 남의 글은 조용한 인용, 초안과 눈에 띄게 나뉨) */
.rq-og-wrap { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; max-width: 100%; margin-top: var(--sp-2); }
.rq-orig { min-width: 0; max-width: 100%; padding: 0 0 0 var(--sp-3); border-left: 2px solid var(--line-2); color: var(--fg-2); font: 400 13px/19px var(--font); overflow-wrap: anywhere; }
.rq-orig .rq-oh { margin-bottom: var(--sp-05); color: var(--fg-3); font: 500 var(--fs-meta)/var(--lh-meta) var(--font); }
.rq-orig .rq-ot { display: block; }
.rq-orig.clamp .rq-ot { --fade: 19px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--fade)), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - var(--fade)), transparent); }
.rq-og { height: 28px; min-height: 0; margin-top: var(--sp-05); padding: 0 var(--sp-1); color: var(--fg-3); font-size: var(--fs-meta); }
@media (hover: hover) { .rq-og:hover { color: var(--fg); } }
.rq-og-wrap .rq-op { align-self: stretch; margin-top: var(--sp-2); }   /* the full original (10-reply-card.js rqOrigNode) takes the card's width */
/* 초안: 카드의 본문, 상자 없이 (원칙 1·5) */
.rq-body { margin-top: var(--sp-2); font: 400 15px/24px var(--font); white-space: pre-wrap; overflow-wrap: anywhere; }
.rq-body.clamp { --fade: 48px; max-height: calc(24px * 6); overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--fade)), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - var(--fade)), transparent); }
.rq-body .kk-dt { max-height: none; margin: 0; overflow: visible; }
.rq-parts { display: flex; flex-direction: column; align-items: flex-end; gap: var(--sp-1); white-space: normal; }
.rq-part { max-width: 85%; padding: var(--sp-15) var(--sp-3); border-radius: var(--r-ctl); background: color-mix(in srgb, var(--accent) 14%, var(--card)); white-space: pre-wrap; }
.rq-part.sent { opacity: .55; }
.rq-more { height: 28px; margin-top: var(--sp-05); padding: 0 var(--sp-1); font-size: 13px; }
.rq-edit { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-2); }
.rq-edit .kk-rv { min-height: 40px; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-ctl); border: 0; background: var(--ff-fill); color: inherit; font: 400 16px/22px var(--font); }
.rq-edit .sel { height: var(--field-h-touch); font: 400 16px/22px var(--font); }
.rq-edit .btns { display: flex; flex-wrap: wrap; gap: var(--sp-15); }

/* 메시지 답글 카드 (소개 페이지 댓글 답글 데모): 남의 글은 조용한 인용, 초안 글이 주인공(원칙 1·5). 게시물 제목과 첨부 안내는 회색으로 물러나요 */
.rq[data-kind="comment"] .rq-sub { margin-top: var(--sp-15); color: var(--fg-2); font: 500 13px/19px var(--font); }
.rq-orig .rq-ow { color: var(--fg-2); font-weight: 500; }
.rq-att[data-k="none"] .dr-none { margin-top: var(--sp-2); }
/* the 첨부 줄 of a card that only reads its files (10-reply-card.js rqAttachNode): the count, then one quiet line per file with its size */
.rq-att[data-k="files"] { display: grid; gap: var(--sp-05); min-width: 0; margin-top: var(--sp-2); }
.rq-af { display: flex; align-items: center; gap: var(--sp-15); min-width: 0; color: var(--fg-2); font: 400 var(--fs-meta)/var(--lh-meta) var(--font); }
.rq-af .ic { flex: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rq-af .rq-afn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); }
/* 보냈어요: 버튼 행과 같은 높이, 그 자리에서 바뀝니다(원칙 6) */
.rq-sent { display: flex; align-items: center; gap: var(--sp-15); height: var(--btn-h-sm); margin-top: var(--sp-3); color: var(--fg); font: 500 14px/20px var(--font); }
.rq-sent .ic { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--ok); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kk-st > .rq-sent { height: auto; margin-top: 0; }
.rq-sent-at { color: var(--fg-3); font: 400 12px/16px var(--font); }

/* 메일 초안 (10-reply-card.js rqMailParts): the 답장 확인 sheet, the 답장 대기 sheet and the mail's own card draw the same parts. 받는이 is one text button under the body (aria-expanded) that opens its rows in place. */
.rq.cm .rq-recvfold { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; margin-top: var(--sp-1); }
.rq-recvfold[hidden], .rq-recvbox[hidden] { display: none; }
.rq-recvfold .rq-recv { height: 28px; min-height: 0; padding: 0; gap: var(--sp-1); color: var(--fg-3); font-size: var(--fs-meta); font-weight: 400; max-width: 100%; }
.rq-recvfold .rq-recv .rq-rs { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-recvfold .rq-recv .ic { flex: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--m-fast) var(--m-ease); }
.rq-recvfold .rq-recv[aria-expanded="true"] .ic { transform: rotate(180deg); }
.rq-recvbox { align-self: stretch; min-width: 0; margin-top: var(--sp-3); }   /* clear of the fold button's tap area */
.rq.cm.rq-ml .rq-brief { margin-top: var(--sp-2); display: grid; gap: var(--sp-1); }
.bm.dr.rq-ml { gap: 0; }   /* the parts carry their own margins, as in the sheet */
.rq.cm.rq-ml .rq-og { padding-left: 0; }
.rq.cm.rq-ml .dr-files { margin-top: var(--sp-2); }

/* the queue: one list, newest first, an app filter on top */
.rq-chips .sel { width: 160px; }
@media (max-width: 639px) { .rq-chips .sel { width: 100%; } .rq-chips:not(:empty) { padding-top: var(--sp-1); } }
.rq-open { margin-left: auto; height: 28px; padding: 0 var(--sp-2); font-size: 12px; }
.rq-sheet .rq-hd .rc-time { display: none; }   /* the sheet's head line has room for who and where only; the time stands in the list row */
.rq-fail { margin-top: var(--sp-2); color: var(--err); font-size: var(--fs-meta); line-height: var(--lh-meta); }   /* a failed press: above the buttons, in the card's flow */

/* 댓글 답글 카드: 작은 아바타 + 이름과 출처가 한 줄, 댓글은 조용한 인용, 초안이 본문, 버튼은 작은 단계 하나 줄 (원칙 1·5·9) */
.rq-who { gap: var(--sp-2); }
.rq-av { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--layer); color: var(--fg-2); font: 600 var(--fs-tag)/var(--lh-tag) var(--font); text-transform: uppercase; }
.rq.cm .rq-sub { margin-top: var(--sp-1); color: var(--fg-3); font: 400 var(--fs-meta)/var(--lh-meta) var(--font); }
.rq.cm.dr .rq-sub, .rq.cm.rq-ml .rq-sub { margin-top: var(--sp-2); color: var(--fg); font: 600 14px/20px var(--font); }   /* a mail draft: its reply subject heads the body */
.rq.cm .rq-body, .rq.cm .rq-bodywrap { margin-top: var(--sp-2); }
.rq.cm .rq-body, .rq.cm .rq-bodywrap > .rq-body { padding: 0; background: none; }
.rq.cm .rq-acts { margin-top: var(--sp-2); }
.rq-acts { flex-wrap: wrap; gap: var(--sp-2); }
/* one row, one height: primary (accent) / secondary (tonal) / text, the same 32px box and --r-ctl corner on every card, never a pill (the prototype's .cf row) */
.rq-acts .btn.sm { height: var(--btn-h-sm); min-height: 0; padding: 0 var(--sp-3); border-radius: var(--r-ctl); font: 600 13px/20px var(--font); }
/* the reply draft's small buttons keep the 32px box on a phone too: the box is what the owner reads, the 44px reach is an invisible ::after (ui-spec 버튼).
   The keyboard hint of the quick triage has no keys to name on a touch screen. */
@media (pointer: coarse), (max-width: 639px) { .rq-acts .btn.sm { position: relative; height: var(--btn-h-sm); min-height: 0; } .rq-acts .btn.sm::after { content: ""; position: absolute; inset: calc(var(--sp-2) * -1) -2px; } }
.rq-acts .btn.text.sm { padding: 0 var(--sp-2); }
.rq-acts.dr-row .dr-send { flex: none; }

/* 답장 대기 (web/js/30-replies.js): the prototype's #queue. Rows and tabs are the notice screen's own classes (09-notices-screen.css); the head sticks to the top of the scroll area. */
.rq-hd2 { position: sticky; top: 0; z-index: 2; background: var(--bg); padding-bottom: var(--sp-1); }
.rq-hd2 .nsc-f { margin-top: 0; }
/* a wide screen: 빠른 처리 sits at the tabs' right end, not on a row of its own; a phone keeps the rows stacked so the button never moves with the tab counts */
@media (min-width: 640px) { .rq-hd2 { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); } .rq-hd2 > .nsc-f { flex: none; max-width: 100%; margin-bottom: 0; } .rq-hd2 > .rq-qm { flex: 1; min-width: 0; margin-block: 0; } .rq-hd2 > .rq-chips { flex: none; } }
#v-monitoring.rq-on > .cv-head { display: none; }
/* a queue row's card: in the right column in place of the queue on a wide screen (30-replies.js rqPaneOpen), the row it came from marked as chat marks its open row */
.rq-r.on { background: var(--row-sel); }
/* the card fits the column the way the sheet fits the window: its head stays and a long draft scrolls in its body */
#mon-tl:has(> .rq-pane) { display: flex; flex-direction: column; height: 100%; }
.rq-pane { --ff-fill: var(--layer); display: flex; flex: 0 1 auto; flex-direction: column; min-height: 0; border-radius: var(--r-card); background: var(--card); }
#v-monitoring.rq-on .tl-in { max-width: none; }
.bm.q-fold .md > :not(:first-child), .bm.q-fold .ra-inl { display: none; }
.rq-qm .sp { flex: 1; }
.rq-qm[hidden], .rq-fast[hidden], .rq-chips:empty { display: none; }
.nsc-fb .n.err { color: var(--err); } .nsc-fb.on .n.err { color: inherit; }
.rq-ls .sec { margin: var(--sp-6) var(--sp-1) var(--sp-2); } .rq-ls .sec:first-child { margin-top: 0; }
.rq-r .hd { font-weight: 500; color: var(--fg); } .rq-r.sent .hd { font-weight: 400; color: var(--fg-2); }
.rq-r .ln .tag { flex: 0 1 auto; min-width: 0; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the sheet's body under its fixed head: .fs-card caps the height and clips, so a long draft scrolls here down to its 첨부 줄 */
.rq-sheet .rq-sb { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--sp-4) var(--sp-4); }
.rq-sheet .rq-why { margin: 0 var(--sp-05) var(--sp-3); font: 400 var(--fs-meta)/var(--lh-meta) var(--font); color: var(--fg-2); }
/* a wide screen: the large draft dialog keeps its height but the draft box is as tall as its text (the dialog's empty rest is not a grey band); a long draft still scrolls inside it */
@media (min-width: 640px) { .fs-card.tall .fs-body.panel { flex: 0 1 auto; } }
/* the chat's one line above the composer when 2 or more send approvals wait (10-decision-card.js dcLine) */
.qline { display: flex; align-items: center; gap: var(--sp-2); width: 100%; min-height: 44px; margin: 0 0 var(--sp-2); padding: 0 var(--sp-4); border: 0; border-radius: var(--r-ctl); background: var(--layer); color: var(--fg-2); font: 400 14px/20px var(--font); text-align: left; cursor: pointer; }
.qline[hidden] { display: none; }
@media (hover: hover) { .qline:hover { background: var(--hover); } }
.qline .tx { flex: none; } .qline .tx b { font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; }
.qline .sep { color: var(--fg-3); } .qline .go { font-weight: 600; color: var(--fg); }
.qline:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* the foot of a card whose send the queue holds (10-reply-actions.js rqSendNode): status colour only under its state class */
.rq-send { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-top: var(--sp-2); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-ctl); background: var(--layer); color: var(--fg-2); font-size: var(--fs-meta); }
.rq-send.undo { justify-content: space-between; }
.rq-send.failed .rq-why { color: var(--err); }
.rq-send.unsure .rq-why.warn { color: var(--warn); }
.rq-send .rq-sub2 { width: 100%; color: var(--fg-2); }
.rq-send .dr-act { width: 100%; }
/* 고치기 panel (10-reply-actions.js rqFixNodes): every part of the draft is a field in its own place, filled like every field of the card (--ff-fill). The text takes the
   body's place with 답글 | 메일 above it when a mail rides along, a mail's 제목 its subject line, its 받는이 and 첨부 rows open where they stand; the line to the AI and 반영 · 닫기 are the foot. */
.ra-editbox { display: flex; flex-direction: column; gap: var(--sp-2); }
.ra-edit, .ra-sub { display: block; width: 100%; box-sizing: border-box; padding: var(--sp-2) var(--sp-3); border: 0; border-radius: var(--r-ctl); background: var(--ff-fill); color: var(--fg); }
.ra-edit { min-height: calc(var(--sp-6) * 5); font: inherit; resize: vertical; }
.ra-sub { min-height: var(--field-h-touch); font: 600 var(--fs-card)/var(--lh-card) var(--font); }
.ra-edit:focus, .ra-sub:focus { outline: 0; box-shadow: var(--ff-ring); }
.rq > .ra-sub, .rq > .dr-recv { margin-top: var(--sp-2); }
.rq-edit .kk-rq { margin: 0; }
.rq-edit .kk-rv { margin: 0; }
.ra-lint.err { color: var(--err); font-size: var(--fs-meta); }
.ra-other { display: flex; flex-direction: column; gap: var(--sp-1); }
.ra-other .kk-rq { margin: 0; }
.ra-other-tx { padding: var(--sp-2) var(--sp-3); border-radius: var(--r-ctl); background: var(--ff-fill); color: var(--fg-2); font-size: var(--fs-meta); white-space: pre-wrap; overflow-wrap: anywhere; max-height: calc(var(--sp-6) * 5); overflow: auto; }
/* AI가 고친 초안 (10-reply-card.js rqDiffBody): the words that came in carry a wash of the text's own ink, the ones that went are struck and quiet. Neutral on purpose:
   a change is not a state, so no status colour, and the wash reads on the card, on a Messenger bubble and in the dark theme alike. */
.rq-diff .rq-dl { min-height: 1lh; }
.rq-diff ins { padding: 0 var(--sp-05); border-radius: 4px; background: color-mix(in srgb, var(--fg) 10%, transparent); font-weight: 500; text-decoration: none; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.rq-diff del { color: var(--fg-3); text-decoration: none; background: linear-gradient(transparent calc(55% - 0.06em), var(--fg-2) 0 calc(55% + 0.06em), transparent 0); -webkit-box-decoration-break: clone; box-decoration-break: clone; }   /* the strike is drawn, not a text-decoration: WebKit leaves line-through off Hangul fallback glyphs, so only the gaps between words showed it */
.rq-diff .rq-dgap { color: var(--fg-3); }

/* 답장 대기 as a queue of cards (design 4.4). One column: at 1280px the queue's column is about 640px wide, too narrow for two cards. */
.rq-list:has(> .rq-c) { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); background: none; overflow: visible; }
.rq-c { min-width: 0; overflow-wrap: anywhere; }
.rq-list > .rq-c + .rq-c { border-top: 0; }
.rq-c { background: var(--card); border-radius: var(--r-card); padding: var(--sp-3); }

/* ---------- reply: quoted message above the composer, the swipe pull and the desktop hover button (web/js/39-reply.js) ---------- */
[data-rid] { position: relative; touch-action: pan-y; }
[data-rid].rp-pull, [data-rid].rp-snap { transform: translateX(calc(var(--rp-x, 0px) * -1)); }
[data-rid].rp-snap { transition: transform var(--m-base) var(--m-ease); }
[data-rid].rp-pull { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.rp-ind { position: absolute; top: 50%; right: calc(var(--rp-x, 0px) * -1 + 6px); --rp-d: 28px; width: var(--rp-d); height: var(--rp-d); margin-top: calc(var(--rp-d) / -2); display: grid; place-items: center; border-radius: 50%; background: var(--hover); color: var(--fg-3); opacity: var(--rp-p, 0); transform: scale(calc(.6 + .4 * var(--rp-p, 0))); pointer-events: none; }
.rp-hit > .rp-ind { background: var(--accent); color: var(--on-accent); transform: scale(1.12); }
/* 인용 버튼 (시제품 .mm .rq): 이름 · 시각 줄 바로 옆의 작은 회색 면. 행에 올리면 나타나고, 자리를 차지하지 않아 줄이 밀리지 않아요 (키보드 포커스에도 나타나요). */
.mt:has(> .rp-btn) { position: relative; width: fit-content; max-width: 100%; }
.rp-btn { position: absolute; top: 50%; left: 100%; display: grid; place-items: center; width: 24px; height: 24px; margin: calc(var(--sp-3) * -1) 0 0 var(--sp-2); padding: 0; border: 0; border-radius: var(--r-ctl); background: var(--hover); color: var(--fg-2); opacity: 0; pointer-events: none; transition: opacity var(--m-fast) var(--m-ease); }
.rp-btn .ic { width: 14px; height: 14px; }
@media (hover: hover) { .rp-btn:hover { background: var(--active); color: var(--fg); } }
/* the 8px between the meta text and its button belongs to the button's hit area, so the pointer never leaves the row on its way there */
.rp-btn::after { content: ""; position: absolute; top: 0; bottom: 0; right: 100%; width: 8px; }
/* an own message is right-aligned: its button sits to the left of the time */
.um > .mt:has(> .rp-btn) .rp-btn { left: auto; right: 100%; margin: calc(var(--sp-3) * -1) var(--sp-2) 0 0; }
.um > .mt:has(> .rp-btn) .rp-btn::after { right: auto; left: 100%; }
/* a row without a meta line, and a follow-up row (its meta line is hidden): the button stays at the row's corner */
.rp-btn.out { top: 0; margin: 0; }
.bm > .rp-btn.out { left: auto; right: 0; }
.um > .rp-btn.out { left: auto; right: 100%; top: auto; bottom: 0; margin: 0 var(--sp-15) 0 0; }
.cont > .mt:has(> .rp-btn):not(.dv) { display: block; position: absolute; top: 0; right: 0; width: 0; height: 0; margin: 0; font-size: 0; line-height: 0; overflow: visible; }
.cont > .mt:has(> .rp-btn):not(.dv) .rp-btn { top: 0; left: auto; right: 0; margin: 0; }
.um.cont > .mt:has(> .rp-btn):not(.dv) { top: auto; bottom: 0; right: 100%; }
.um.cont > .mt:has(> .rp-btn):not(.dv) .rp-btn { right: 6px; top: auto; bottom: 0; }
/* The hidden button keeps catching the pointer (it is a child of the row, so the row stays hovered while the pointer is on it) and shows with the row's hover or its own keyboard focus. */
@media (hover: hover) and (pointer: fine) { .rp-btn { pointer-events: auto; } [data-rid]:hover .rp-btn, .rp-btn:focus-visible { opacity: 1; } }
@media (hover: none), (pointer: coarse) { .rp-btn { display: none; } }
/* 인용 막대 (시제품 .rqt .chip): 입력 상자 위의 회색 칩 한 개 — ❞ · 상태 태그 · 한 줄 글 · 닫기. 누르면 그 메시지로 가요. */
.rpbar { display: flex; align-items: center; gap: var(--sp-15); width: fit-content; min-width: 0; max-width: 100%; height: 32px; margin: 0 0 var(--sp-2); padding: 0 var(--sp-1) 0 var(--sp-3); border-radius: 16px; background: var(--layer); color: var(--fg); font-size: 14px; line-height: 20px; }
.rpbar[hidden] { display: none; }
.rpbar .rp-ic { color: var(--fg-3); }
.rp-tx { flex: 0 1 auto; min-width: 0; display: flex; align-items: center; gap: var(--sp-2); padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.rp-tg { display: inline-flex; flex: none; }
.rp-tg:empty { display: none; }
.rp-x { flex: none; width: 24px; height: 24px; border-radius: 50%; }
.rp-ct, .rpq-ct { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rpq { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; max-width: 100%; padding: var(--sp-1) var(--sp-3); border: 0; border-radius: 8px; background: color-mix(in srgb, var(--accent) 8%, var(--bg)); color: var(--fg-2); font: inherit; font-size: 13px; line-height: 18px; text-align: left; cursor: pointer; }
.rpq-au { font-weight: 700; color: var(--fg); }
/* The pressed quote while its original loads; a fast jump never shows it. */
@keyframes rp-wait { from { opacity: 0; } to { opacity: 1; } }
.rpq.busy, .rp-tx.busy { position: relative; }
.rpq.busy::after, .rp-tx.busy::after { content: attr(data-wait); position: absolute; top: var(--sp-1); right: var(--sp-3); color: var(--fg-3); font-size: var(--fs-tag); line-height: var(--lh-tag); animation: rp-wait var(--m-fast) var(--m-fast) backwards; }
.rp-tx.busy::after { top: 0; right: 0; background: var(--bg); padding-left: var(--sp-2); }
.msg-gap .btn { color: var(--fg-3); }

/* 설정 목록과 하위 화면들: one row look. A row's icon sits on its own tile (prototype .ico), a status dot stays a dot. */
:is(#settings, #notifications, #display, #update, #runtime) > .list + .sec, #settings > .set-col > .list + .sec { margin-top: var(--sp-6); }
:is(#settings, #notifications, #display, #update, #runtime) > .sec, #settings > .set-col > .sec { margin-bottom: var(--sp-2); }
:is(#settings, #notifications, #display, #update, #runtime) > .sec:first-child, #settings > .set-col:first-child > .sec:first-child { margin-top: var(--sp-2); }
:is(#settings, #notifications, #display, #update, #runtime) > .list + .list { margin-top: var(--sp-3); }
:is(#settings, #notifications, #display, #update, #runtime) > .list:first-child { margin-top: var(--sp-2); }
:is(#settings, #notifications, #display, #update, #runtime, #models, #accounts, #usage, #context, #messengers, #discord, #jandi, #slack, #telegram, #devices, #webaccess) .li > .lead:has(> .ic) {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--layer); color: var(--fg-2);
}
:is(#settings, #notifications, #display, #update, #runtime, #messengers, #devices, #webaccess) .li > .lead:has(> .ic) .ic { width: 16px; height: 16px; }
:is(#notifications, #update, #runtime) .hs-sw::before { content: ""; position: absolute; inset: -12px -4px; }

/* a state said once at a row's right: the dot and its word */
#models .fb-sw, #context .cx-state { display: inline-flex; align-items: center; gap: var(--sp-15); }
#context .cx-state { color: var(--fg-2); }

/* 모델 · 폴백: each target is a title and one list: its model and effort as rows with the picker on the right, then the numbered chain */
#models .mt { gap: 0; }
#models .mt-top { margin-bottom: var(--sp-1); }
#models .mt-card { display: block; padding: 0; background: none; box-shadow: none; }
#models .mt-head { margin: var(--sp-6) var(--sp-1) var(--sp-2); gap: var(--sp-2); align-items: baseline; }
#models .mt-head .t { font: 600 var(--fs-sec)/var(--lh-sec) var(--font); color: var(--fg-2); }
#models .mt-pick { flex: 1; min-width: 0; display: flex; gap: var(--sp-2); }
#models .mt-list > .mt-pick { padding: var(--row-py) var(--row-px); }
#models .mt-model { flex: 3 1 0; min-width: 0; max-width: none; }
#models .mt-eff { flex: 2 1 0; min-width: 0; max-width: 160px; }
#models .fb-sub, #models .mt-list > :is(.mt-note, .mt-apply) { border-top: 1px solid var(--line); }
#models .mt-pick .tf { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--sp-3); }
#models .mt-pick .tf > .lb { font: 500 var(--fs-row)/var(--lh-row) var(--font); color: var(--fg); }
#models :is(.mt-pick, .mt-filter) .sel { height: var(--ctl-h); min-height: 0; font-size: var(--fs-row); line-height: var(--lh-row); }
#models .mt-pick .sel { --ff-fill: var(--layer); flex: 1 1 auto; width: auto; min-width: 0; }
#models .mt-pick:not(:has(.mt-eff)) .sel { flex: none; width: min(60%, 220px); }
/* the pickers' values say what they are: their names stay on the button's aria-label */
#models .mt-pick:has(.mt-eff) .tf > .lb, #models .mt-filter .lb { display: none; }
#models :is(.mt-list, .fb-sub) > .mt-note { margin: 0; padding: var(--sp-2) var(--row-px); }
#models .mt-apply { margin: 0; padding: var(--sp-2) var(--row-px); }
#models .sec .sup { margin-left: var(--sp-2); font-weight: 400; }
#models [data-target^="lane:"] .mt-head { margin-block: var(--sp-3) var(--sp-1); }
#models .fb-list { --fb-n-w: 20px; gap: 0; }
#models .fb-item { flex-wrap: wrap; border-radius: 0; background: transparent; padding: var(--sp-2) var(--row-px); border-top: 1px solid var(--line); }
#models .fb-item.base { border-top: 0; }
@media (hover: hover) { #models .fb-item[data-i]:hover { background: var(--card-hover); } }
#models .fb-item.open { background: var(--layer); } @media (hover: hover) { #models .fb-item.open:hover { background: var(--layer); } }
#models .fb-item > .fb-usage { padding-left: calc(var(--fb-n-w) + var(--sp-2)); margin-top: var(--sp-1); }
#models .fb-item.in-use { background: color-mix(in srgb, var(--accent) 8%, var(--card)); }
#models .fb-n { width: var(--fb-n-w); height: auto; border-radius: 0; background: none; color: var(--fg-3); font-size: 13px; line-height: 18px; }
#models .fb-item.in-use .fb-n { background: none; color: var(--accent); }
#models .mt-fb-foot { padding: var(--sp-1) var(--sp-2); border-top: 1px solid var(--line); }
#models .fbe { --ff-fill: var(--card); margin: 0; border-radius: 0; padding: var(--sp-3) var(--row-px); }
#models .fbe .tf { gap: var(--sp-1); }
@media (min-width: 640px) {
  #models .fbe > .tf, #models .fbe-cap > .tf:first-child { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: var(--sp-3); }
}
#models .mt-use-row { padding: var(--sp-15) var(--row-px); }
@media (max-width: 639px) { #models .mt-pick:not(:has(.mt-eff)) .sel { width: min(58%, 200px); } }
@media (pointer: coarse), (max-width: 639px) { #models :is(.mt-pick, .mt-filter) .sel { height: var(--field-h-touch); } }

/* 공급자: the usage windows ride under the row, thin */
#accounts .prow-lim { display: flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-1); color: var(--fg-2); font-size: 12px; line-height: 16px; }
#accounts .prow-lim .k { flex: none; min-width: 64px; }
#accounts .prow-lim .bar { flex: 1; max-width: 160px; margin-top: 0; }
/* a card that holds accounts: the usage windows lead, small section names split it, 계정 추가 closes the accounts */
#accounts .li.prow .prow-lim:first-child { margin-top: 0; }
@media (pointer: coarse), (max-width: 639px) { #accounts .li.prow .ib { width: var(--btn-hit); height: var(--btn-hit); } }
#accounts .li.acc-lbl { min-height: 0; }
#accounts .li.acc-lbl .lbl { margin: 0; }
#accounts .li.acc-add { min-height: 0; gap: var(--sp-2); color: var(--fg-2); }
#accounts .sec.sec-act > .tag.acc-use { margin-left: auto; }
/* 사용량과 월 한도 */
#usage .lim .kv b { font-weight: 500; }
#usage .lim .bar { margin-top: var(--sp-15); }
#usage .lim > .sup { margin-top: var(--sp-1); }
/* 리셋권 row: the count and its 사용 button share the right edge where the other rows keep "N% 남음" */
#usage .lim.rc .kv { align-items: center; }
#usage .rc-end { display: flex; align-items: center; gap: var(--sp-2); }
#usage > .list + :is(.grid, .sec, .empty) { margin-top: var(--sp-3); }
:is(#accounts, #messengers, #devices, #webaccess, #usage) > .note { margin: var(--sp-2) var(--sp-1) 0; }

/* 계정 창: the delete actions stand together on the left of the button row */
dialog.dlg .dact .ac-gap { margin-right: auto; }
/* a dialog's failure note (usErr) takes no room until it has a reason */
dialog.dlg .dbody .err-t:empty { display: none; }
/* 전환 규칙 (rulesDialog): a condition is one line (which account, its state, the amount, remove); on a phone the account and remove
   share the first line, the state and the amount the second. The action and its account sit side by side and wrap. */
dialog.dlg .rl-cond { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto; grid-template-areas: "who st num x"; gap: var(--sp-2); align-items: center; }
dialog.dlg .rl-cond > .sel { width: auto; min-width: 0; }
.rl-cond .rl-who { grid-area: who; } .rl-cond .rl-st { grid-area: st; } .rl-cond .rl-num { grid-area: num; display: inline-flex; align-items: center; gap: var(--sp-2); } .rl-cond .rl-x { grid-area: x; }
.rl-num .fi { width: 96px; flex: none; }
@media (max-width: 639px) { dialog.dlg .rl-cond { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "who who x" "st num num"; } .rl-num .fi { width: 72px; } }
dialog.dlg .rl-do > .sel { flex: 1 1 160px; width: auto; min-width: 0; }

/* Settings sub-screens (설정, 모델·폴백, 공급자, 사용량, 컨텍스트) and the small settings dialogs (dialog.dlg.cl) on a phone.
   Scoped to those surfaces so the rest of the app keeps its compact controls. Loaded last: same-specificity rules here win. */
@media (max-width: 639px) {
  /* editor options that do not fit side by side wrap to the next line instead of being cut with an ellipsis */
  #models .fbe .seg button { flex: 1 0 auto; padding: 0 var(--sp-3); }
  /* update: commit subjects and paths wrap */
  #settings .upd-log span { white-space: normal; overflow-wrap: anywhere; }
}
@media (max-width: 639px), (pointer: coarse) {
  #harness .hm-row { height: 40px; }
  #harness .hm-chip { min-height: 36px; }
  :is(#settings, #models, #accounts, #usage, #context) .ib { width: 40px; height: 40px; }
  :is(#models, dialog.dlg) :is(.fi, .sel) { min-height: 44px; }
  :is(#models, dialog.dlg) .seg button { height: 40px; }
  dialog.dlg summary { padding: var(--sp-3) 0; }
  dialog.dlg.cl .btn { min-height: 40px; }
  #settings .hs-sw::before { content: ""; position: absolute; inset: -12px -4px; }
  /* a row's two controls keep a 40px target without making the row taller */
  #models :is(.fb-sw, .fb-grip) { height: 40px; margin-block: calc(var(--sp-1) * -1); }
  #models .fb-sw { min-width: 40px; }
  #models .fb-grip { width: 40px; }
  #models .fb-add { height: 40px; }
  dialog.dlg.cl .dhd .dx { --dx-grow: var(--sp-2); width: 44px; height: 44px; margin: calc((var(--dx-grow) + var(--sp-05)) * -1) calc((var(--dx-grow) + var(--sp-15)) * -1) 0 auto; }
  dialog.dlg.cl .dact .btn { min-height: 44px; }
  dialog.dlg.cl .chip { height: 40px; min-width: 40px; justify-content: center; }
  dialog.dlg.cl .rl-days .chip { flex: 1 1 0; min-width: 0; padding: 0; }
}

/* 빠른 처리 (web/js/30-triage.js): every waiting reply answered fast, one queue card at a time or as a list of picks.
   Desktop: a compact centered dialog, or the right column of a wide 모니터링. Phone: the whole screen. Colors are the theme tokens, so dark mode follows. */

/* the prototype's #triage: a compact card that is as tall as its draft, not a screen-high dialog */
.fs-card.tr { width: min(680px, calc(100% - 48px)); height: auto; max-height: min(92dvh, 820px); }
/* a wide 모니터링: the screen stands in the right column like the reply card (.rq-pane, 15-reply-card.css), with the same insets */
.tr-pane { --fs-fill: var(--layer); color: var(--fg); }
.tr-pane:focus { outline: 0; }
.tr-pane .fs-body { padding: 0 var(--sp-4) var(--sp-4); }
.tr-pane .fs-ft { padding: var(--sp-3) var(--sp-4) var(--sp-4); }
.tr .tr-pos, .tr-pane .tr-pos { display: flex; align-items: baseline; gap: var(--sp-05); font-variant-numeric: tabular-nums; }
.tr-bar { height: 4px; margin-top: var(--sp-15); border-radius: 2px; background: var(--track); overflow: hidden; }
.tr-bar > span { display: block; height: 100%; background: var(--accent); transition: width var(--m-slow) var(--m-ease); }
.tr-tog { gap: var(--sp-1); }
.tr-tog .ic { width: 16px; height: 16px; }
.tr-k { color: var(--fg-3); font: 600 12px/18px var(--font); }
@media (max-width: 639px) {
  .fs-card.tr { width: 100%; height: 100%; max-height: none; }   /* the whole screen: the desktop's max-height would stop the card short and lift its buttons off the bottom */
}
.tr-none { color: var(--fg-3); font: 400 13px/20px var(--font); }

/* 빠른 처리 over the one reply queue (30-triage.js tqOpen): the card, then 진행; the list's compact rows. */
.tq-body { display: grid; align-content: start; gap: var(--sp-3); flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: var(--sp-3); }   /* the sheet clips (.fs-card, .rq-pane): a long list scrolls here */
.tq-rail { display: grid; gap: var(--sp-05); }
@media (max-width: 639px) { .tq-rail { display: none; } }   /* 진행 would list every waiting item under the card; on a phone the head's "i / n" and its bar already say where he is */
.tq-r { display: flex; justify-content: space-between; gap: var(--sp-2); padding: var(--sp-1) var(--sp-2); border: 0; border-radius: var(--r-ctl); background: none; color: var(--fg-2); font: inherit; font-size: var(--fs-meta); text-align: left; cursor: pointer; }
.tq-r.on { background: var(--row-sel); color: var(--fg); }
.tq-st.err { color: var(--err); }
.tq-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tq-st { flex: none; }
.tq-row { display: grid; gap: var(--sp-1); padding: var(--sp-3); border-radius: var(--r-card); background: var(--card); }
.tq-line { display: flex; gap: var(--sp-2); align-items: baseline; font-size: var(--fs-meta); color: var(--fg-2); }
.tq-line .tq-who { color: var(--fg); font-weight: 500; }
.tq-tx { white-space: pre-wrap; overflow-wrap: anywhere; }
/* a row shows what its 보내기 sends, compactly (30-triage.js tqRowNode): the original as one quoted line, the 첨부 줄, the mail that rides along as one line with its own 첨부 줄 */
.tq-og { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tq-ml { display: flex; align-items: center; gap: var(--sp-15); min-width: 0; margin-top: var(--sp-1); color: var(--fg-2); font: 500 var(--fs-meta)/var(--lh-meta) var(--font); }
.tq-ml .ic { flex: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tq-ml > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tq-row .rq-att, .tq-row .rq-att .dr-none { margin-top: 0; }
.tq-row .rq-acts { margin-top: var(--sp-1); }
.tq-foot { display: flex; justify-content: flex-end; }
/* the keys of the one-card view (30-triage.js tqKeysNode): one quiet line under the card, each key in the app's own <kbd>. A touch screen has no keys to name. */
.tq-keys { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); padding: 0 var(--sp-1); color: var(--fg-3); font: 400 var(--fs-meta)/var(--lh-meta) var(--font); }
.tq-key { display: inline-flex; align-items: center; gap: var(--sp-1); white-space: nowrap; }
@media (pointer: coarse) { .tq-keys { display: none; } }

/* Assistant answers drawn by their shape (02-answer-shapes.js, prototype answers.css). Rows are the result card's .rc-row; this file only adds the card
   around them, a wider key and the phone stack. Every word is plain selectable text: a selection copies what it covers. */
.ans-card { position: relative; min-width: 0; margin: var(--sp-3) 0; padding: var(--sp-4); border-radius: var(--r-card); background: var(--layer); }
.ans-card:first-child { margin-top: 0; }
.ans-card:last-child { margin-bottom: 0; }
.ans-lead { font-weight: 600; }
.ans-card .rc-rows { gap: var(--sp-3); }
.ans-card .rc-row { padding: 0; }
/* The name column is as wide as the longest name of this card, up to --ans-k-max or 40% of the card (the grid's own width), so the short everyday names sit on one
   line and every row shares one edge; a longer name breaks between words into balanced lines, a path or an id breaks inside the token. */
.rc-rows.ans-keys { --ans-k-max: 176px; display: grid; grid-template-columns: fit-content(min(40%, var(--ans-k-max))) minmax(0, 1fr); }
.ans-keys .rc-row { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; }
.ans-keys .rc-k { width: auto; text-wrap: balance; overflow-wrap: anywhere; }
.ans-keys .rc-w { text-wrap: pretty; }
.ans-keys .rc-w b { font-weight: 400; }
.ans-steps { --ans-step: 24px; --rc-k-w: var(--ans-step); }
.ans-steps .rc-row { align-items: flex-start; }
.ans-steps .rc-k { display: grid; place-items: center; height: var(--ans-step); border-radius: 50%; background: var(--card); color: var(--fg-2); font-size: var(--fs-meta); line-height: var(--lh-meta); font-weight: 500; }
.ans-steps .rc-w { line-height: var(--lh-chat); }
.ans-tb { padding: var(--sp-2) var(--sp-4); }
/* auto layout: a column is as wide as its words need (a name never leaves one short word on a second line), the cells still break a long token so nothing leaves the card */
.ans-tb table { width: 100%; border-collapse: collapse; }
.ans-tb th, .ans-tb td { padding: var(--sp-2) var(--sp-3) var(--sp-2) 0; background: none; text-align: left; vertical-align: baseline; font-size: var(--fs-body); line-height: var(--lh-body); overflow-wrap: anywhere; white-space: normal; }
.ans-tb th { color: var(--fg-3); font-weight: 400; text-wrap: balance; }
.ans-tb thead th { color: var(--fg-2); font-weight: 500; }
.ans-tb tbody tr > * { border-top: 1px solid var(--line); }
.ans-card .ans-secs { gap: 0; }
.ans-card .ans-li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 var(--sp-2); align-items: baseline; padding: var(--sp-2) 0; }
.ans-li + .ans-li { border-top: 1px solid var(--line); }
.ans-card .ans-li:last-child { padding-bottom: 0; }
.ans-li + .rc-sh { margin-top: var(--sp-5); }
.ans-li .rc-k { width: auto; color: var(--fg); font-size: var(--fs-row); font-weight: 500; }
.ans-li .rc-w { grid-column: 1 / -1; color: var(--fg-2); font-size: var(--fs-body); }
.ans-n { color: var(--fg-3); font-size: var(--fs-meta); line-height: var(--lh-meta); }
.bm .ans-files { flex-direction: column; flex-wrap: nowrap; gap: 0; margin-top: var(--sp-3); padding: var(--sp-1) var(--sp-4); }
.ans-files .fitem { align-self: stretch; }
.ans-files .fpath { display: none; }
.ans-files .fatt { cursor: pointer; }
.ans-files .fitem + .fitem { border-top: 1px solid var(--line); }
.ans-files .fbox { width: 100%; }
.ans-files .fbox > .fatt { flex: 1; min-width: 0; height: auto; min-height: var(--row-h); max-width: none; gap: var(--sp-3); padding: var(--sp-1) var(--sp-10) var(--sp-1) 0; border-radius: 0; background: none; }
@media (hover: hover) { .ans-files .fbox > .fatt:hover { background: none; } }
.ans-files .fi-ic { border-radius: var(--r-ctl); background: var(--card); }
.ans-files .fi-t { flex: 1; flex-direction: row; align-items: center; gap: var(--sp-2); }
.ans-files .fi-n { flex: 1; min-width: 0; font-size: var(--fs-body); line-height: var(--lh-body); font-weight: 400; }
.ans-files .fi-m { flex: none; }
.ans-files .fbox > .fatt + .fdl { top: 50%; right: 0; transform: translateY(-50%); }
.ans-ev { display: flex; flex-wrap: wrap; column-gap: var(--sp-3); margin-top: var(--sp-3); padding: 0 var(--sp-1); color: var(--fg-3); font-size: var(--fs-meta); line-height: var(--lh-meta); }
.ans-ev code { padding: 0; background: none; font-size: var(--fs-meta); }
@container tlcol (max-width: 559.98px) {
  .ans-wordy.ans-keys { display: flex; }
  .ans-wordy .rc-row { display: block; }
  .ans-wordy .rc-k { display: block; width: auto; line-height: var(--lh-sec); }
}

/* result card (11-resultcard.js): a mail or a monitoring result - header, title, labelled sections, the original folded */
.tl-in > .bm.rc, #mon-tl > .bm.rc { display: flex; flex-direction: column; gap: var(--sp-3); }
.rc-hd { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; color: var(--fg-3); font-size: 12px; line-height: 16px; }
.rc-src { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); font-size: 13px; line-height: 18px; font-weight: 600; }
.rc-time { flex: none; margin-left: auto; white-space: nowrap; }
.rc-title { color: var(--fg); font-size: 18px; line-height: 26px; font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; }
.rc-sec { display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; }
/* key-column rows (11-resultcard.js rcRowsNode): time / 답장 / 가격, what it is, the detail muted */
.rc-rows { display: flex; flex-direction: column; min-width: 0; }
.rc-rows > .rc-sh { margin-top: var(--sp-3); }
.rc-rows > .rc-sh:first-child { margin-top: 0; }
.rc-row { display: flex; align-items: baseline; gap: var(--sp-3); min-width: 0; padding: var(--sp-05) 0; }
.rc-k { flex: none; width: var(--rc-k-w, 48px); color: var(--fg-3); font: 400 13px/22px var(--font); font-variant-numeric: tabular-nums; }
.rc-w { min-width: 0; font: 400 15px/22px var(--font); overflow-wrap: anywhere; }
.rc-w b { font-weight: 500; }
.rc-d { margin-left: var(--sp-1); color: var(--fg-3); font-size: 13px; }
.rc-w > .rc-d.nw-chg { margin-left: 0; font-size: inherit; }
.rc-row > .rc-w.rc-d { margin-left: 0; }
.rc-d.nw-chg s { color: var(--fg-3); }
.rc-d.nw-chg em { color: var(--fg-2); font-style: normal; font-weight: 500; }
.rc-sh { color: var(--fg-2); font-size: 14px; line-height: 20px; font-weight: 600; }
.bm.rc .rc-sec .md { font-size: 15px; line-height: 24px; }
.rc-raw > summary { display: flex; align-items: center; gap: var(--sp-15); width: fit-content; min-height: 32px; padding: 0 var(--sp-3); border-radius: var(--r-ctl); background: var(--layer); color: var(--fg-2); font-size: 13px; line-height: 20px; font-weight: 500; cursor: pointer; list-style: none; }
.rc-raw > summary::-webkit-details-marker { display: none; }
.rc-raw > summary::before { content: ""; flex: none; width: 5px; height: 5px; border-right: 1.5px solid var(--fg-2); border-bottom: 1.5px solid var(--fg-2); transform: rotate(-45deg); transition: transform var(--m-fast) var(--m-ease); }
.rc-raw[open] > summary::before { transform: rotate(45deg); }
@media (hover: hover) { .rc-raw > summary:hover { background: var(--hover); color: var(--fg); } }
.rc-rawbody { margin-top: var(--sp-2); padding: var(--sp-3) var(--sp-4); max-height: 60vh; overflow: auto; border-radius: var(--r-ctl); background: var(--layer); color: var(--fg-2); }
.bm.rc .rc-rawbody .md { font-size: 14px; line-height: 22px; }
.rc-rawbody .md .tbl { background: var(--card); }
/* the original of a mail (11-mailbody.js): the HTML frame (white page, auto height, no inner scroll) or the laid-out text */
.rc-rawbody.own { padding: 0; max-height: none; overflow: visible; background: none; }
.mb { display: flex; flex-direction: column; gap: var(--sp-15); min-width: 0; }
.mb-bar { display: flex; align-items: center; gap: var(--sp-2); min-height: 28px; color: var(--fg-3); font-size: 12px; line-height: 16px; }
.mopen .mb-bar .btn { min-height: 32px; height: 32px; padding: 0 var(--sp-3); font-size: 13px; }
.mb-bar .mb-note { min-width: 0; flex: 1; }
.mb-frame { display: block; width: 100%; height: 120px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: #fff; }
.mb-fail { padding: var(--sp-3) var(--sp-4); border-radius: var(--r-ctl); background: var(--layer); color: var(--fg-3); }
.mb-txt { max-width: 46em; padding: var(--sp-3) var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--card); color: var(--fg); font-size: 15px; line-height: 24px; overflow-wrap: anywhere; word-break: keep-all; text-wrap: pretty; }
.mb-txt > :first-child { margin-top: 0; }
.mb-txt > :last-child { margin-bottom: 0; }
.mb-txt p { margin: 0 0 var(--sp-3); line-height: 26px; }
.mb-txt li { line-height: 26px; }
.mb-txt .mt-lb { color: var(--fg); font-weight: 600; }
.mb-txt a { color: var(--accent); }
.mb-txt hr { margin: var(--sp-3) 0; border: 0; border-top: 1px solid var(--line-2); }
.mb-txt .mt-h { display: flex; align-items: center; gap: var(--sp-2); margin: var(--sp-4) 0 var(--sp-2); color: var(--fg-2); font-size: 13px; line-height: 20px; font-weight: 600; }
.mb-txt .mt-h::before { content: ""; flex: none; width: 3px; height: 14px; border-radius: 2px; background: var(--accent); }
.mb-txt ul, .mb-txt ol { margin: 0 0 var(--sp-3); padding-left: var(--sp-5); }
.mb-txt li { margin: var(--sp-05) 0; padding-left: var(--sp-05); }
.mb-txt li::marker { color: var(--fg-3); }
.mb-txt .mt-kv { display: flex; flex-direction: column; margin: 0 0 var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--layer); overflow: hidden; }
.mb-txt .mt-kv > div { display: grid; grid-template-columns: minmax(84px, 30%) minmax(0, 1fr); gap: var(--sp-1) var(--sp-3); padding: var(--sp-2) var(--sp-3); }
.mb-txt .mt-kv > div + div { border-top: 1px solid var(--line); }
.mb-txt .mt-kv dt { margin: 0; color: var(--fg-3); font-size: 13px; line-height: 22px; }
.mb-txt .mt-kv dd { margin: 0; min-width: 0; font-size: 14px; line-height: 22px; }
/* the mail text is also drawn in the draft sheet (no timeline there), which keeps the window query; inside a timeline the column decides */
@media (max-width: 520px) { .mb-txt:not(.timeline *) .mt-kv > div { grid-template-columns: 1fr; gap: 0; } }
@container tlcol (max-width: 520px) { .mb-txt .mt-kv > div { grid-template-columns: 1fr; gap: 0; } }
.mb-txt .mt-tbl { max-width: 100%; margin: 0 0 var(--sp-3); overflow-x: auto; border: 1px solid var(--line-2); border-radius: 12px; }
.mb-txt .mt-tbl table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.mb-txt .mt-tbl th, .mb-txt .mt-tbl td { padding: var(--sp-2) var(--sp-3); text-align: left; vertical-align: top; overflow-wrap: normal; word-break: keep-all; white-space: nowrap; }
.mb-txt .mt-tbl th { background: var(--layer); color: var(--fg-2); font-weight: 600; }
.mb-txt .mt-tbl td + td, .mb-txt .mt-tbl th + th { border-left: 1px solid var(--line); }
.mb-txt .mt-tbl tr + tr td { border-top: 1px solid var(--line); }
.mb-txt .mt-tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
/* a run of market quotes (label, value, change, low, high): compact, numbers right-aligned, Korean-market colors (up red, down blue) */
.mb-txt .mt-nt caption { padding: var(--sp-2) var(--sp-3); text-align: left; background: var(--layer); color: var(--fg-2); font-size: 13px; line-height: 20px; font-weight: 600; border-bottom: 1px solid var(--line); }
.mb-txt .mt-nt th, .mb-txt .mt-nt td { padding: var(--sp-15) var(--sp-3); }
.mb-txt .mt-nt td + td, .mb-txt .mt-nt th + th { border-left: 0; }
.mb-txt .mt-nt th { padding-top: var(--sp-1); padding-bottom: var(--sp-1); color: var(--fg-3); font-size: 12px; font-weight: 500; }
.mb-txt .mt-nt .lb { font-weight: 600; color: var(--fg); }
.mb-txt .mt-nt .up { color: var(--err); }
.mb-txt .mt-nt .dn { color: var(--accent); }
.mb-txt .mt-nt td:nth-child(n+4) { color: var(--fg-2); }
@media (max-width: 520px) { .mb-txt:not(.timeline *) .mt-nt th, .mb-txt:not(.timeline *) .mt-nt td { padding: var(--sp-15); } .mb-txt:not(.timeline *) .mt-nt { font-size: 13px; } }
@container tlcol (max-width: 520px) { .mb-txt .mt-nt th, .mb-txt .mt-nt td { padding: var(--sp-15); } .mb-txt .mt-nt { font-size: 13px; } }
.mb-txt blockquote.mt-quote { margin: 0 0 var(--sp-3); padding-left: var(--sp-3); border-left: 3px solid var(--line-2); }
.mb-txt .mt-quote-body, .mb-txt .mt-fold-body { color: var(--fg-2); }
.mb-txt .mt-quote-body > :last-child, .mb-txt .mt-fold-body > :last-child { margin-bottom: 0; }
.mb-txt details.mt-quote, .mb-txt details.mt-fold { margin: 0 0 var(--sp-3); }
.mb-txt details > summary { display: flex; align-items: center; gap: var(--sp-15); width: fit-content; min-height: 32px; padding: 0 var(--sp-3); border-radius: var(--r-ctl); background: var(--layer); color: var(--fg-2); font-size: 13px; line-height: 20px; font-weight: 500; cursor: pointer; list-style: none; }
.mb-txt details > summary::-webkit-details-marker { display: none; }
.mb-txt details > summary::before { content: ""; flex: none; width: 5px; height: 5px; border-right: 1.5px solid var(--fg-2); border-bottom: 1.5px solid var(--fg-2); transform: rotate(-45deg); transition: transform var(--m-fast) var(--m-ease); }
.mb-txt details[open] > summary::before { transform: rotate(45deg); }
@media (hover: hover) { .mb-txt details > summary:hover { background: var(--hover); color: var(--fg); } }
.mb-txt details > div { margin-top: var(--sp-2); padding-left: var(--sp-3); border-left: 3px solid var(--line-2); font-size: 14px; line-height: 22px; }
.rc-rawbody .md th { background: var(--layer); }
@media (max-width: 1099px) { .appbar.cvconv h1 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; font-size: var(--fs-card); line-height: var(--lh-card); overflow-wrap: anywhere; } }
/* mail row (30-monitoring.js monConvNode): a compact result card that is one tap target (role=button); in the original view (11-todo-strip.js) its files */
#mon-tl > .bm.rc.mr { gap: var(--sp-05); padding: var(--sp-2) var(--sp-4); cursor: pointer; }
/* Rows off screen are not styled or painted until they scroll near, so adding a page of mail costs what the visible rows do. */
#mon-tl > .bm.rc.mr { content-visibility: auto; contain-intrinsic-block-size: auto var(--row-h); }
@media (hover: hover) { #mon-tl > .bm.rc.mr:hover { background: var(--hover); } }
#mon-tl > .bm.rc.mr:focus-visible { outline-offset: -2px; }
/* A mail row is one compact line each: who and when, the subject, two summary points, the first thing to do (owner 2026-10-27). */
.mr .rc-title { overflow: hidden; font-size: 14.5px; line-height: 20px; text-overflow: ellipsis; white-space: nowrap; }
.mr-sum { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: var(--fg-2); font-size: 13px; line-height: 18px; overflow-wrap: anywhere; }
ul.mr-sum.mr-pts { display: block; margin: 0; padding: 0; list-style: none; }
.mr-pts li { position: relative; overflow: hidden; padding-left: var(--sp-3); text-overflow: ellipsis; white-space: nowrap; }
.mr-pts li::before { content: ""; position: absolute; left: 3px; top: 8px; width: 3px; height: 3px; border-radius: 50%; background: var(--fg-3); }
.mr-todo { display: flex; gap: var(--sp-15); min-width: 0; color: var(--fg-2); font-size: 12.5px; line-height: 18px; }
.mr-todo b { flex: none; color: var(--warn); font-weight: 600; }
.mr-todo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the 초안 작성 dialog (30-monitoring.js mailDraftDialog): the mail it answers as a tonal block (sender, subject, summary), then the box.
   The block is a --bg well in the floating dialog (its --pop equals --layer in dark), and --card on the phone's full-screen --bg (14-overlay.css) */
.md-dlg { gap: var(--sp-4); }
.md-ctx { display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-ctl); background: var(--bg); }
@media (max-width: 639px) { .md-ctx { background: var(--card); } }
.md-from { display: flex; align-items: center; gap: var(--sp-15); min-width: 0; color: var(--fg-3); font-size: 12px; line-height: 16px; }
.md-from span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-from .ic { width: 14px; height: 14px; }
.md-subj { color: var(--fg); font-size: 16px; line-height: 22px; font-weight: 600; overflow-wrap: anywhere; }
.md-ctx .mr-sum { margin-top: var(--sp-05); font-size: 14px; line-height: 22px; -webkit-line-clamp: 3; }
.md-ctx ul.mr-pts li { position: relative; padding-left: var(--sp-3); }
.md-ctx ul.mr-pts li::before { content: ""; position: absolute; left: 2px; top: 10px; width: 3px; height: 3px; border-radius: 50%; background: var(--fg-3); }
.md-ctx .mr-todo { margin-top: var(--sp-05); font-size: 13px; line-height: 20px; }
.md-ask { display: flex; flex-direction: column; gap: var(--sp-2); }
.md-lbl { color: var(--fg-2); font-size: 14px; line-height: 20px; font-weight: 500; }
/* the one filled button stays at the footer's right end at its own width, like 새 메일's 초안 만들기 (ui-spec .fs-ft), not the phone's full-width lone button */
.fs-card.md-d .fs-ft.row .btn:only-child { flex: none; }
.md-ask textarea.fi { min-height: 88px; font-size: 15px; line-height: 22px; padding: var(--sp-2) var(--sp-3); resize: none; }
/* the ⋯ of a mail card (30-monitoring.js mailMenuBtn): the last item of the header, at the top right; the negative margin keeps the 16px header line */
/* --fg-2 and a larger icon (owner 2026-10-29): the --fg-3 dots were easy to miss on the card */
.rc-hd .mr-more { margin: calc(var(--sp-15) * -1) calc(var(--sp-2) * -1) calc(var(--sp-15) * -1) 0; color: var(--fg-2); }
.rc-hd .mr-more .ic { width: 20px; height: 20px; }
.rc-hd .mr-more[aria-expanded="true"] { background: var(--active); color: var(--fg); } @media (hover: hover) { .rc-hd .mr-more:hover { background: var(--active); color: var(--fg); } }
/* 초안 작성 on the open mail's card (11-todo-strip.js): below 1100px, where the conversation head and its 초안 작성 are hidden */
.rc-hd .rc-src + .mr-more, .rc-hd .tag + .mr-more { margin-left: auto; }
@media (pointer: coarse), (max-width: 639px) { .rc-hd .mr-more { margin: calc((var(--sp-15) + var(--sp-1)) * -1) calc((var(--sp-2) + var(--sp-05)) * -1) calc((var(--sp-15) + var(--sp-1)) * -1) 0; } }
.mr-clip { flex: none; display: inline-flex; align-items: center; gap: var(--sp-05); color: var(--fg-3); font-size: 12px; line-height: 16px; }
.mr-clip .ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.mr-files { display: flex; flex-direction: column; gap: var(--sp-05); margin-top: var(--sp-1); padding-top: var(--sp-2); border-top: 1px solid var(--line); }
.mr-fh { color: var(--fg-3); font-size: 12px; line-height: 16px; font-weight: 600; }
.mr-file { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; min-height: 44px; padding: 0 var(--sp-2); border-radius: var(--r-ctl); color: var(--fg); font-size: 14px; line-height: 20px; text-decoration: none; }
@media (hover: hover) { .mr-file:hover { background: var(--hover); } }
.mr-file .ic { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; color: var(--fg-2); }
.mr-fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr-fsize { flex: none; color: var(--fg-3); font-size: 12px; }
/* send-approval draft card (30-monitoring.js draftCardNode): the mail it would send, its state as a badge with the time, the choices below */
#mon-tl > .bm.rc.dr { gap: var(--sp-3); }
.dr-ic { flex: none; display: inline-flex; color: var(--fg-3); }
.dr-ic .ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.dr-st { margin-left: auto; height: 24px; font-size: 13px; line-height: 20px; font-weight: 600; white-space: nowrap; }
.dr-q { font-size: 15px; line-height: 22px; }
.dr-orig { display: flex; flex-direction: column; gap: var(--sp-05); padding: var(--sp-05) 0 var(--sp-05) var(--sp-3); border-left: 3px solid var(--line-2); min-width: 0; }
.dr-ok { color: var(--fg-3); font-size: 12px; line-height: 16px; font-weight: 600; }
.dr-os { color: var(--fg-2); font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.dr-os b { color: var(--fg); font-weight: 600; }
.dr-ob { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: var(--fg-3); font-size: 13px; line-height: 18px; overflow-wrap: anywhere; }
.dr-mail { display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; padding: var(--sp-3) var(--sp-4); border: 1px solid var(--line-2); border-radius: var(--r-ctl); }
.dr-to { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.dr-k { flex: none; color: var(--fg-3); font-size: 13px; line-height: 20px; }
.dr-chip { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: var(--sp-05) var(--sp-3); border-radius: 12px; background: var(--layer); color: var(--fg); font-size: 13px; line-height: 20px; }
.dr-sub { color: var(--fg); font-size: 16px; line-height: 24px; font-weight: 700; overflow-wrap: anywhere; }
/* 받는이·참조 of a mail reply draft (10-decision-card.js draftToNode): 답장 | 전체 답장, chips with x, one add field per row */
.dr-recv { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.dr-recv[hidden] { display: none; }
.dr-seg { align-self: flex-start; flex-wrap: nowrap; }
.dr-seg button { flex: none; padding: 0 var(--sp-3); }
.dr-rcrow { align-items: flex-start; }
.dr-rc-list { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-15); min-width: 0; }
.dr-rc { display: inline-flex; align-items: center; gap: var(--sp-05); max-width: 100%; padding-right: var(--sp-05); }
.dr-rc-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0; border: 0; background: transparent; color: var(--fg); font: inherit; font-size: 13px; line-height: 20px; cursor: pointer; }
.dr-rc-t:disabled { cursor: default; }
.dr-rc-x { flex: none; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 14px; background: transparent; color: var(--fg-3); cursor: pointer; }
@media (hover: hover) { .dr-rc-x:hover { background: var(--hover); color: var(--fg); } }
.dr-rc-x .ic { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.dr-rc-add { display: inline-flex; align-items: center; gap: var(--sp-1); min-height: 28px; padding: 0 var(--sp-3); border: 1px dashed var(--line-2); border-radius: var(--r-ctl); background: transparent; color: var(--fg-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
@media (hover: hover) { .dr-rc-add:hover { background: var(--hover); } }
.dr-rc-add .ic { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.dr-rc-edit { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); min-width: 0; }
.dr-rc-in { min-width: 0; width: 15em; max-width: 100%; height: 32px; padding: 0 var(--sp-3); border: 0; border-radius: var(--r-ctl); background: var(--ff-fill); color: var(--fg); font: inherit; font-size: 13px; }
.dr-rc-in:focus { outline: 0; box-shadow: var(--ff-ring); }
.dr-rc-edit .btn { height: 32px; min-height: 32px; padding: 0 var(--sp-3); }
@media (pointer: coarse) { .dr-rc-x { width: 36px; height: 36px; } .dr-rc-add, .dr-rc-in, .dr-rc-edit .btn { min-height: 38px; } }
/* the mail that goes out right after a comment reply, in the same card (10-decision-card.js draftMailNode) */
.dr-mailpart { display: flex; flex-direction: column; gap: var(--sp-15); min-width: 0; margin-top: var(--sp-3); }
.dr-mh { display: flex; align-items: center; gap: var(--sp-15); color: var(--fg-3); font-size: 12px; line-height: 16px; font-weight: 600; }
.dr-mh svg { flex: none; width: 14px; height: 14px; }
.dr-rulebar { display: flex; margin: var(--sp-05) 0 var(--sp-1); }
.dr-origin { display: flex; align-items: center; gap: var(--sp-15); min-width: 0; color: var(--fg-3); font-size: 13px; line-height: 20px; overflow-wrap: anywhere; }
.dr-origin a { color: inherit; text-decoration: underline; }
.dr-origin svg { flex: none; width: 14px; height: 14px; }
.dr-body { display: flex; flex-direction: column; gap: var(--sp-2); color: var(--fg); font-size: 15px; line-height: 24px; overflow-wrap: anywhere; }
.dr-body p, .bm .md.dr-body p { margin: 0; white-space: pre-wrap; }
.bm .md.dr-body { font-size: 15px; line-height: 24px; }
/* the files a draft sends along, and what is missing (10-decision-card.js draftFilesNode); the send sheet and the card share it */
.dr-files { display: flex; flex-direction: column; gap: var(--sp-15); min-width: 0; margin-top: var(--sp-3); }
.dr-fh { color: var(--fg-3); font-size: 12px; line-height: 16px; font-weight: 600; }
.dr-att { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; min-height: var(--row-h); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-ctl); background: var(--layer); color: var(--fg); text-decoration: none; }
@media (hover: hover) { a.dr-att:hover { background: var(--hover); } }
a.dr-att:active { background: var(--active); }
.dr-fi { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--card); color: var(--fg-2); }
.dr-fi .ic, .dr-att > .ic, .dr-none .ic { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.dr-att > .ic { width: 16px; height: 16px; color: var(--fg-3); }
.dr-fn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; line-height: 20px; font-weight: 500; }
.dr-fm { flex: none; color: var(--fg-3); font-size: 12px; line-height: 16px; }
.dr-none, .dr-warn { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-ctl); background: color-mix(in srgb, var(--warn) 12%, var(--card)); color: var(--fg); font-size: 13px; line-height: 20px; overflow-wrap: anywhere; }
.dr-none .ic { color: var(--warn); }
/* the 첨부 line saying there is none is a fact, not a warning (only .dr-warn and the cannot-attach note are bands): a quiet line */
.dr-none:not(:has(.dr-wn)) { padding: 0; background: none; color: var(--fg-3); font-size: 12px; line-height: 16px; }
.dr-none:not(:has(.dr-wn)) .ic { width: 14px; height: 14px; color: inherit; stroke-width: 2; }
.dr-note, .dc-gone { color: var(--fg-3); font-size: 12.5px; line-height: 18px; }
.dr-note { margin-top: var(--sp-1); }
.dc-gone { padding: var(--sp-1) var(--sp-3) var(--sp-2); text-align: center; }
.dr-warn { font-weight: 600; background: color-mix(in srgb, var(--warn) 18%, var(--card)); }
.dr-warn > .ic { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--warn); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.dr-wt { display: flex; flex-direction: column; gap: var(--sp-05); min-width: 0; }
.dr-wn { font-weight: 500; color: var(--fg-2); font-size: 12px; line-height: 18px; }
.dr-warnbox[hidden] { display: none; }
.dr-warnbox { display: flex; flex-direction: column; gap: var(--sp-15); margin-bottom: var(--sp-2); }
.dr-ar { display: flex; align-items: center; gap: var(--sp-15); min-width: 0; }
.dr-ar > .dr-att { flex: 1; }
.dr-x { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--fg-3); cursor: pointer; }
@media (hover: hover) { .dr-x:hover { background: var(--hover); color: var(--fg); } }
.dr-x .ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; }
.dr-add { display: flex; align-items: center; justify-content: center; gap: var(--sp-2); height: var(--btn-h); padding: 0 var(--sp-4); border: 1px dashed var(--line-2); border-radius: var(--r-ctl); background: transparent; color: var(--fg-2); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
@media (hover: hover) { .dr-add:hover { background: var(--hover); } }
.dr-add:disabled { opacity: 0.6; cursor: default; }
.dr-add .ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.dr-menu { display: flex; flex-direction: column; gap: var(--sp-15); }
.dr-menu .btn { width: 100%; min-height: 44px; }
.dr-lib { display: flex; flex-direction: column; gap: var(--sp-1); max-height: 220px; overflow-y: auto; }
.dr-li { display: flex; align-items: center; gap: var(--sp-2); min-height: 44px; padding: var(--sp-15) var(--sp-3); border: 0; border-radius: var(--r-ctl); background: var(--layer); color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
@media (hover: hover) { .dr-li:hover { background: var(--hover); } }
.dr-hit { --tone: var(--accent); display: inline-flex; align-items: center; gap: var(--sp-15); flex: none; color: var(--fg-2); font-size: 11px; font-weight: 600; line-height: 18px; }
.dr-q2 { margin: var(--sp-3) 0 var(--sp-2); color: var(--fg-2); font: 500 13px/18px var(--font); }
.dr-edit.ask { min-height: 64px; }
.dr-act .dr-manual { margin-left: auto; display: inline-flex; align-items: center; gap: var(--sp-1); color: var(--fg-2); }
.dr-act .dr-manual .ic { width: 14px; height: 14px; }
.dr-act { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-3); }
.dr-act.dr-row, .dr-row { flex-direction: row; align-items: center; flex-wrap: wrap; gap: var(--sp-2); }
.dr-act .btn { height: var(--btn-h); padding: 0 var(--sp-4); font-size: 15px; }
.dr-act .btn.text { padding: 0 var(--sp-3); }
.dr-edit { width: 100%; box-sizing: border-box; min-height: 160px; padding: var(--sp-3); border: 0; border-radius: var(--r-ctl); background: var(--ff-fill); color: var(--fg); font: inherit; font-size: 15px; line-height: 24px; resize: vertical; }
.dr-edit:focus { outline: 0; box-shadow: var(--ff-ring); }
@media (pointer: coarse), (max-width: 639px) { .dr-mail { padding: var(--sp-3); } .dr-row .dr-send { flex: 1; } .dr-add, .dr-act .btn { height: var(--btn-hit); } }
.dr-rm { color: var(--fg-3); cursor: pointer; }
@media (hover: hover) { .dr-rm:hover { background: var(--hover); color: var(--fg); } }
.dr-rm .ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; }
/* a handled reply draft folded under its mail in the conversation (30-mail-sent.js): one line, a tap unfolds the mail as it went out */
.ms-slot { display: flex; flex-direction: column; gap: var(--sp-15); min-width: 0; margin: var(--sp-1) 0 var(--sp-2); }
.ms-card { display: flex; flex-direction: column; min-width: 0; border-radius: var(--r-card); background: var(--card); }
.ms-line { display: flex; align-items: center; gap: var(--sp-2); width: 100%; min-width: 0; min-height: var(--row-h); padding: 0 var(--sp-4); border: 0; border-radius: var(--r-card); background: transparent; color: var(--fg-2); font: 500 14px/20px var(--font); text-align: left; cursor: pointer; }
@media (hover: hover) { .ms-line:hover { background: var(--card-hover); } }
.ms-line .ic { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ms-k { flex: none; color: var(--fg); font-weight: 600; white-space: nowrap; }
.ms-m { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-3); font-size: 13px; }
.ms-ch { color: var(--fg-3); transition: transform var(--m-fast) var(--m-ease); }
.ms-card.open .ms-ch { transform: rotate(180deg); }
.ms-body { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; padding: 0 var(--sp-4) var(--sp-3); }
.ms-ft { display: flex; justify-content: flex-end; }
.ms-hd { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); min-width: 0; padding: 0 var(--sp-1); }
.ms-hd .ms-n { color: var(--fg-3); font-size: 12px; }
.ms-rm .ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.mr-filter { position: sticky; top: 0; z-index: 2; display: flex; gap: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: var(--sp-1) 0 var(--sp-2); background: var(--bg); }
.mr-filter::-webkit-scrollbar { display: none; }
/* every filter row of an app, a mail list, 프로젝트, 답장 대기 and 알림 (web/DESIGN.md 필터): one segmented track (--r-seg) drawn by the segments
   themselves, so the row keeps the chip height and each segment stays the button; the chosen one is a --seg-on cell (--r-seg-in) inside it.
   A long row scrolls sideways (segKeep keeps the chosen one in view). */
:is(.mr-filter, .pl-chips) .mr-f, .nsc-fb { position: relative; isolation: isolate; flex: none; height: var(--chip-h); padding: 0 var(--sp-3); border: 0; border-radius: 0; background: var(--seg-track); color: var(--fg-2); font: 500 13px/20px var(--font); }
:is(.mr-filter, .pl-chips) .mr-f:first-child, .nsc-fb:first-child { border-top-left-radius: var(--r-seg); border-bottom-left-radius: var(--r-seg); }
:is(.mr-filter, .pl-chips) .mr-f:last-child, .nsc-fb:last-child { border-top-right-radius: var(--r-seg); border-bottom-right-radius: var(--r-seg); }
:is(.mr-filter, .pl-chips) .mr-f::before, .nsc-fb::before { content: ""; position: absolute; inset: var(--sp-05); z-index: -1; border-radius: var(--r-seg-in); }
@media (hover: hover) { :is(.mr-filter, .pl-chips) .mr-f:hover, .nsc-fb:hover { background: var(--seg-track); color: var(--fg); } }
@media (hover: hover) { :is(.mr-filter, .pl-chips) .mr-f:not(.on):hover::before, .nsc-fb:not(.on):hover::before { background: color-mix(in srgb, var(--seg-on) 50%, transparent); } }
:is(.mr-filter, .pl-chips) .mr-f.on, .nsc-fb.on { color: var(--fg); font-weight: 600; }
:is(.mr-filter, .pl-chips) .mr-f.on::before, .nsc-fb.on::before { background: var(--seg-on); }
:is(.mr-filter, .pl-chips) .mr-fn { margin-left: var(--sp-05); font-size: 11px; font-variant-numeric: tabular-nums; opacity: .8; }

/* a briefing-shaped answer in chat (11-resultcard.js hcBriefNode): schedule rows with a muted time column, the mail line as a chip, counts as numbers */
.hcb { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-3); min-width: 0; font-size: 15.5px; line-height: 28px; }
.hcb > .md { align-self: stretch; }
.hcb-card { align-self: stretch; max-width: 400px; padding: 0 var(--sp-3); border-radius: var(--r-card); background: var(--layer); }
.hcb-hd { display: flex; align-items: center; gap: var(--sp-2); min-height: 24px; padding-top: var(--sp-2); }
.hcb-hd .tag { height: 22px; font-size: 11.5px; font-weight: 600; }
.hcb-h { min-width: 0; color: var(--fg-2); font: 500 13px/20px var(--font); }
/* time rows of a briefing, sized from the landing page's phone scene */
.hcb-card .rc-row { padding: var(--sp-15) 0; }
.hcb-card .rc-row + .rc-row { border-top: 1px solid var(--line); }
.hcb-card .rc-k { width: 40px; }
.hcb-card .rc-w b { font-weight: 400; }
.hcb-chip { display: inline-flex; align-items: center; gap: var(--sp-2); max-width: 100%; min-height: 32px; padding: var(--sp-1) var(--sp-3); border-radius: var(--r-ctl); background: var(--card); color: var(--fg-2); font-size: 14px; line-height: 22px; }
.hcb-chip .ic { color: var(--accent); }
.hcb-ln { color: var(--fg-2); font-size: 14px; line-height: 22px; }
.hcb-n { color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.hcb-h .hcb-n { color: var(--fg-2); }

/* 모니터링 > 앱 > 메신저 (web/js/30-kakao.js): the room column (rooms to watch + the watched ones) and a Messenger-style chat.
   Until something is picked only the column shows; once picked (.kk.chat-open) it sits beside the chat from 1100px, below that the chat replaces it. Colors are the --kk-* tokens (01-tokens.css). */
.kk { display: flex; flex: 1; min-height: 0; gap: var(--sp-4); }
#v-monitoring.kk-on > .chatbox { display: none; }
/* the room column is one white card; the chat column is the prototype's stack of cards: head, 자동 초안, the chat window (the only kk-bg surface), the request bar, then the reply card(s) */
.kk-rooms, .kk-chat { min-height: 0; }
.kk-rooms { flex: 1; min-width: 0; align-self: flex-start; max-height: 100%; overflow: hidden auto; border-radius: var(--r-card); background: var(--card); margin-bottom: var(--sp-3); }
.kk-chat { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-2); overflow: hidden auto; overscroll-behavior: contain; margin-bottom: var(--sp-3); }
.kk-chat > * { flex: none; }
.kk:not(.chat-open) .kk-chat { display: none; }
@media (max-width: 1099px) {
  .kk.chat-open .kk-rooms { display: none; }
  .kk-chat { margin-bottom: 0; }
}
/* a wide screen puts them in the app frame (20-monitoring.css .app-two): the rooms are the left panel at the list column, the chat the main slot. Without the frame (a split pane) the chat replaces the rooms, as on a phone. */
#v-monitoring:not(.app-two) .kk.chat-open .kk-rooms { display: none; }
@media (min-width: 1100px) {
  #v-monitoring:not(.app-two) > .kk { grid-row: 4; margin-bottom: var(--sp-1); }
  .kk-rooms, .kk-chat { margin-bottom: 0; }
}

/* the watched rooms: a head with the count and 추가, one row per room */
.kk-lh { display: flex; align-items: center; gap: var(--sp-2); min-height: var(--row-h); padding: var(--sp-2) var(--sp-3) var(--sp-2) var(--sp-4); }
.kk-pt { font: 600 15px/22px var(--font); }
.kk-cnt { flex: 1; color: var(--fg-3); font: 400 12px/16px var(--font); }
.kk-add-btn { gap: var(--sp-1); padding: 0 var(--sp-3); }
.kk-add-btn .ic { width: 14px; height: 14px; }
.kk-watch .kk-note { padding: var(--sp-6) var(--sp-4); }
.kk-l1 { display: flex; align-items: baseline; gap: var(--sp-15); min-width: 0; }
.kk-l1 > .cv-n { flex: 0 1 auto; min-width: 0; }
.kk-grp { flex: none; color: var(--fg-3); font: 400 12px/16px var(--font); }
/* 지켜볼 대화방: dialog() worn as the .kk-pd panel (side panel on a desktop, full screen on a phone). Its canvas is the page's, so the search and the
   rooms are the project list's own .pl-search, .pl-list and .pl-row, the same white on grey as that list. */
#kk-add { background: var(--bg); }
.kk-search + .kk-pl { margin-top: var(--sp-3); }
/* in the sheet the check says "watched"; the grey fill is the selected row of a list, so the sheet's rows keep none */
#kk-add .kk-pr.on { background: none; }
@media (hover: hover) { #kk-add .kk-pr.on:hover { background: none; } }
.kk-pr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.kk-ck { flex: none; width: 18px; height: 18px; color: var(--accent); }
@media (pointer: coarse), (max-width: 639px) { #kk-add .kk-search { height: 40px; font-size: 16px; } }
.kk-add .dbody { display: block; }   /* a picker's body is one list: its parts stack by their own margins, and a long list scrolls the body */
.kk-hint { padding: 0 var(--sp-4) var(--sp-2); color: var(--fg-3); font: 400 12px/16px var(--font); }
.kk-note + .btn { display: block; margin: calc(var(--sp-3) * -1) auto var(--sp-6); }   /* a failed or empty place: the line, then its one action, centred */
.kk-note { padding: var(--sp-8) var(--sp-4); color: var(--fg-3); font: 400 12px/16px var(--font); text-align: center; text-wrap: balance; }
.kk-pr { display: flex; align-items: center; gap: var(--sp-3); min-height: var(--row-h); padding: var(--row-py) var(--sp-4); }
.kk-pr + .kk-pr { border-top: 1px solid var(--line); }
/* 자동 초안: the room's one two-value switch, a thin card above the chat window */
.kk-auto { display: flex; align-items: center; gap: var(--sp-3); margin-left: auto; }
.kk-auto[hidden] { display: none; }
.kk-auto .cv-n { font: 400 15px/22px var(--font); }
.kk-av { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: hsl(var(--h) 45% 82%); color: hsl(var(--h) 45% 26%); font: 600 15px/var(--lh-row) var(--font); }
.kk-av.sp { background: transparent; }
:root[data-theme="dark"] .kk-av { background: hsl(var(--h) 22% 30%); color: hsl(var(--h) 45% 86%); }
.kk-row .cv-m { flex-direction: column; align-items: flex-end; gap: var(--sp-1); }
.kk-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--fg-3); font: 400 12px/16px var(--font); white-space: nowrap; }
@media (min-width: 1100px) { :is(.kk-rooms) .kk-av { width: 32px; height: 32px; font-size: 14px; } }

/* The Messenger room list reads as the prototype's: the head and the note sit on the page, the rooms in one card, a grey initial, the last message under
   the name, 미답장 and the count solid on the row's one line. Scoped by id: .kk-rooms is also the comment pane's column. */
#kk-rooms { border-radius: 0; background: transparent; }
#kk-rooms .kk-lh { min-height: 32px; padding: 0 0 var(--sp-2); }
#kk-rooms .kk-pt { color: var(--fg-2); font: 600 14px/20px var(--font); }
/* the view pills share the head line with 추가: no sticky bar here, the pane scrolls as a whole */
#kk-rooms .kk-views { position: static; flex: 1; flex-wrap: nowrap; min-width: 0; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; background: none; }
#kk-rooms .kk-views::-webkit-scrollbar { display: none; }
#kk-rooms .kk-own { border-radius: var(--r-card); background: var(--card); overflow: hidden; }
#kk-rooms .kk-own { margin-bottom: var(--sp-3); }
#kk-add-btn { height: 32px; min-height: 32px; }
#kk-rooms .kk-av, #kk-head .kk-av, .kk-pd.kk-add .kk-pr .kk-av { background: var(--layer); color: var(--fg-2); }
/* a row like the project list's: flat inside the card with the card's one selection color, the time on top at the row's end. These undo the wide-screen .cv-row (a rounded chip for the side columns). */
#kk-rooms .kk-row { align-items: center; min-height: 56px; padding: var(--sp-2) var(--sp-4); border-radius: 0; }
#kk-rooms .kk-row + .kk-row { margin-top: 0; border-top: 1px solid var(--line); }
#kk-rooms .kk-row.on { background: var(--row-sel); }
#kk-rooms .kk-row .cv-m { align-self: flex-start; gap: var(--sp-05); padding-top: var(--sp-05); }
#kk-rooms .kk-av { width: 36px; height: 36px; font-size: 15px; }
#kk-chat { gap: var(--sp-3); }
/* the room's bar sits on the page, not on a card like the main chat's: it is the card itself, or it vanishes into the light page */
#kk-chat .kk-composer .sendrow:not(.ulw) { background: var(--card) !important; }

/* switch */
.kk-sw { position: relative; flex: none; width: 36px; height: 20px; padding: 0; border: 0; border-radius: 10px; background: var(--track); }
.kk-sw::before { content: ""; position: absolute; inset: -9px -4px; }
.kk-knob { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform var(--m-base) var(--m-ease); }
.kk-sw.on { background: var(--accent); }
.kk-sw:disabled { opacity: .5; cursor: default; }
.kk-sw.on .kk-knob { transform: translateX(16px); }
@media (prefers-reduced-motion: reduce) { .kk-sw, .kk-knob { transition: none; } }

/* chat */
.kk-head { display: none; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-card); background: var(--card); }   /* the general chat's head insets */
.kk-head:not(:empty) { display: flex; }
@media (max-width: 1099px) { .kk-head, .kk-head:not(:empty) { display: none; } }
.kk-owed { display: none; }
.kk-owed:not([hidden]) { display: flex; align-items: center; gap: var(--sp-2); min-height: 44px; padding: 0 var(--sp-1); }
.kk-owed-l { display: flex; align-items: center; gap: var(--sp-2); }
.kk-box { position: relative; flex: 1 0 auto; min-height: 260px; display: flex; border-radius: var(--r-card); background: var(--kk-bg); overflow: hidden; }
.kk-chat > .kk-box { flex: 1 0 min(400px, 52dvh); }
#kk-chat > .kk-box { flex: 1 1 0; min-height: 0; }
/* Messages leaving the list fade out at both edges instead of being cut; the padding keeps the first and last one clear of the fade at rest. */
.kk-tl { flex: 1; min-width: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: var(--sp-1) var(--sp-6) var(--sp-3); -webkit-mask-image: linear-gradient(transparent, #000 12px, #000 calc(100% - 12px), transparent); mask-image: linear-gradient(transparent, #000 12px, #000 calc(100% - 12px), transparent); }
/* the chat window's column fills the main slot, with the insets of the general chat's timeline (.kk-tl) */
.kk-in { display: flex; flex-direction: column; gap: var(--sp-1); width: 100%; min-width: 0; }
.kk-in > .kk-note { margin: auto; color: var(--kk-time); }
.kk-pill { position: absolute; left: 50%; bottom: 12px; z-index: 2; height: 32px; padding: 0 var(--sp-3); transform: translateX(-50%); border-radius: var(--r-ctl); box-shadow: var(--float); }
.kk-top { display: flex; justify-content: center; padding: var(--sp-05) 0 var(--sp-15); }
.kk-more { align-self: center; color: var(--kk-time); }
.kk-date { align-self: center; margin: var(--sp-3) 0 var(--sp-2); padding: var(--sp-05) var(--sp-3); border-radius: 12px; background: var(--kk-chip); color: var(--kk-chip-fg); font: 400 12px/20px var(--font); }
.kk-in > .kk-date:first-child { margin-top: 0; }
.kk-new { display: flex; align-items: center; gap: var(--sp-3); margin: var(--sp-3) 0 var(--sp-15); color: var(--kk-time); font: 600 12px/16px var(--font); }
.kk-new::before, .kk-new::after { content: ""; flex: 1; height: 1px; background: color-mix(in srgb, var(--kk-time) 45%, transparent); }
.kk-gap { display: flex; align-items: center; gap: var(--sp-2); margin: var(--sp-2) 0; color: var(--kk-time); }
.kk-gap::before, .kk-gap::after { content: ""; flex: 1; border-top: 1px dashed color-mix(in srgb, var(--kk-time) 55%, transparent); }
.kk-gap .btn { color: var(--kk-time); }
.kk-m { display: flex; min-width: 0; }
.kk-m:empty { display: none; }
.kk-m.first { margin-top: var(--sp-2); }
.kk-m.in { gap: var(--sp-2); align-items: flex-start; }
.kk-m.me { flex-direction: column; align-items: flex-end; }
.kk-mb { min-width: 0; max-width: calc(100% - 44px); display: flex; flex-direction: column; align-items: flex-start; }
.kk-m.in:not(:has(> .kk-av)) .kk-mb { max-width: 86%; }
.kk-name { margin: 0 0 var(--sp-05) var(--sp-1); color: var(--kk-time); font: 400 12px/16px var(--font); }
.kk-line { display: flex; align-items: flex-end; gap: var(--sp-15); max-width: 100%; min-width: 0; }
.kk-m.me .kk-line { max-width: 86%; }
.kk-bub { min-width: 0; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-menu); background: var(--kk-in); color: var(--kk-in-fg); font: 400 15px/22px var(--font); white-space: pre-wrap; overflow-wrap: anywhere; }
.kk-m.me .kk-bub { background: var(--kk-own); color: var(--kk-own-fg); }
.kk-bub.ph { opacity: .75; }
.kk-emo { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-1); min-width: 0; max-width: 100%; }
.kk-m.me .kk-emo { align-items: flex-end; }
/* a sticker image: no bubble, at most 120px like Messenger's in-chat size */
.kk-sticker { width: 120px; height: 120px; }
@media (max-width: 639px) { .kk-sticker { width: 100px; height: 100px; } }
.kk-sticker img { display: block; width: 100%; height: 100%; object-fit: contain; -webkit-user-drag: none; }
.kk-emo-chip { font-size: 13px; }
.kk-chat { --kk-rd: #d99700; }
:root[data-theme="dark"] .kk-chat { --kk-rd: #ffd21f; }
/* time side of a bubble: the read counter (yellow, bold) above the time; own bubbles right-align it, incoming ones left-align it */
.kk-meta { flex: none; display: flex; flex-direction: column; align-items: flex-start; padding-bottom: 1px; /* nudge: time stamp sits on the bubble's last text line */ }
.kk-m.me .kk-meta { align-items: flex-end; }
.kk-rd { color: var(--kk-rd); font: 700 11px/14px var(--font); white-space: nowrap; }
.kk-time { flex: none; color: var(--kk-time); font: 400 11px/14px var(--font); white-space: nowrap; }
.kk-m.pend.sending .kk-bub { opacity: .7; }
.kk-st { display: flex; align-items: center; gap: var(--sp-1); margin-top: var(--sp-05); color: var(--kk-time); font: 400 11px/16px var(--font); }
.kk-st .btn { height: var(--btn-h-row); padding: 0 var(--sp-2); }
.kk-m.pend.failed .kk-st { color: var(--err); }
.kk-m.pend.failed .kk-bub { box-shadow: 0 0 0 1.5px var(--err); }

/* media (30-kakao.js kkMediaNode): photos and videos sit in the timeline without a colored bubble; files, voice and locations are white cards */
.kk-chat { --kk-maxw: 240px; }
@media (max-width: 639px) { .kk-chat { --kk-maxw: 200px; } }
.kk-media { min-width: 0; max-width: 100%; }
.kk-photo { position: relative; display: block; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--kk-chip); cursor: pointer; }
.kk-media > .kk-photo { width: min(var(--pw, var(--kk-maxw)), var(--kk-maxw)); aspect-ratio: var(--ar, 4 / 3); max-height: 320px; }
.kk-photo img { display: block; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; }
.kk-media > .kk-photo.gone:not(.kk-video) { display: grid; place-items: center; width: auto; min-width: 160px; aspect-ratio: auto; background: var(--kk-in); cursor: default; }
.kk-gonet, .kk-bub.gone { color: var(--kk-time); font: 400 12px/18px var(--font); text-align: center; }
.kk-gonet { padding: var(--sp-15); }
.kk-bub.card.gone { background: var(--kk-in) !important; color: var(--kk-time) !important; }
.kk-album { display: grid; gap: var(--sp-05); width: var(--kk-maxw); max-width: 100%; border-radius: 12px; overflow: hidden; }
.kk-album.c2 { grid-template-columns: repeat(2, 1fr); }
.kk-album.c3 { grid-template-columns: repeat(3, 1fr); }
.kk-album > .kk-photo { width: auto; max-height: none; aspect-ratio: 1; border-radius: 0; }
.kk-album > .kk-photo.gone { display: grid; place-items: center; background: var(--kk-in); }
.kk-more-n { position: absolute; inset: 0; display: grid; place-items: center; background: rgb(0 0 0 / .5); color: #fff; font: 600 18px/1 var(--font); }
.kk-video { background: #1b1f26; }
.kk-play { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); border-radius: 50%; background: rgb(0 0 0 / .55); }
.kk-play::after { content: ""; position: absolute; left: 17px; top: 12px; border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent #fff; }
.kk-dur { position: absolute; right: 6px; bottom: 6px; padding: 0 var(--sp-15); border-radius: 8px; background: rgb(0 0 0 / .55); color: #fff; font: 500 11px/16px var(--font); }
.kk-bub.card { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; max-width: 100%; white-space: normal; }
.kk-m.me .kk-bub.card { background: var(--kk-in); color: var(--kk-in-fg); }
.kk-bub.card.voice { flex-direction: column; align-items: flex-start; gap: var(--sp-05); padding: var(--sp-15) var(--sp-2); }
.kk-bub.card audio { width: min(240px, 100%); height: 36px; }
.kk-bub.card.file { width: 260px; max-width: 100%; }
.kk-fi { flex: none; width: 28px; height: 28px; color: var(--fg-2); }
.kk-fb { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.kk-fn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 14px/20px var(--font); }
.kk-sub { color: var(--kk-time); font: 400 12px/16px var(--font); }
.kk-open { flex: none; height: var(--btn-h-row); padding: 0 var(--sp-3); font-size: 13px; }
.kk-bub.card.file.off .kk-fn { opacity: .7; }
.kk-nopc { flex: none; }
.kk-bub.card.loc { flex-direction: column; align-items: flex-start; gap: 0; max-width: 260px; text-decoration: none; color: var(--kk-in-fg); }
.kk-bub.card.loc .kk-fn { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.kk-bub.reply { display: flex; flex-direction: column; gap: var(--sp-1); min-width: 150px; max-width: 100%; }
/* The quote reads as a link to the original: a bar on its left and "원문 보기" on the right of its name line. */
.kk-quote { display: flex; flex-direction: column; gap: var(--sp-05); align-self: stretch; margin: calc(var(--sp-05) * -1) calc(var(--sp-1) * -1) 0; padding: var(--sp-1) var(--sp-2) var(--sp-1) var(--sp-2); border: 0; border-left: 3px solid color-mix(in srgb, currentColor 35%, transparent); border-radius: 8px; background: color-mix(in srgb, currentColor 8%, transparent); color: inherit; text-align: left; font: 400 12px/17px var(--font); }
/* not ".jump": that global class (05-log.css) is the absolutely placed scroll-to-latest button, and it pulled every quote out of its bubble */
.kk-quote.kk-qjump { cursor: pointer; border-left-color: var(--accent); }
@media (hover: hover) { .kk-quote.kk-qjump:hover { background: color-mix(in srgb, currentColor 14%, transparent); } }
.kk-quote .kk-qn { display: flex; align-items: baseline; gap: var(--sp-2); }
.kk-qgo { margin-left: auto; flex: none; color: var(--accent); font-size: 11px; font-weight: 600; }
.kk-quote.busy .kk-qgo { visibility: hidden; }
.kk-quote.busy::after { content: attr(data-wait); color: var(--fg-3); font-size: 11px; }
/* after a jump: back to the reply the owner came from */
.kk-backpill { position: absolute; left: 50%; bottom: 84px; z-index: 5; display: inline-flex; align-items: center; gap: var(--sp-15); height: 34px; padding: 0 var(--sp-3); border: 0; border-radius: var(--r-ctl); background: var(--accent); color: #fff; font: 600 13px/1 var(--font); box-shadow: 0 4px 14px rgb(0 0 0 / .25); transform: translateX(-50%); cursor: pointer; }
.kk-backpill .ic { width: 14px; height: 14px; transform: rotate(-90deg); fill: none; stroke: currentColor; stroke-width: 2; }
.kk-m.kk-hl { position: relative; }
.kk-m.kk-hl::before { content: attr(data-hl); position: absolute; top: -18px; left: 0; padding: 0 var(--sp-2); border-radius: 9px; background: var(--accent); color: #fff; font: 600 11px/16px var(--font); pointer-events: none; }
.kk-m.me.kk-hl::before { left: auto; right: 0; }
.kk-quote:disabled { cursor: default; }
/* a quote tap flashes the original message (30-kakao.js kkFlash) */
/* the overlay is the shared highlight (09-notices.css); a photo or sticker has no radius of its own to copy */
.kk-m.kk-hl :is(.kk-bub, .kk-media, .kk-sticker) { position: relative; --hl: 22%; --hl-ring: 22%; --hl-glow: 0%; --hl-spread: var(--sp-1); }
.kk-m.kk-hl :is(.kk-bub, .kk-media, .kk-sticker)::after { animation: kk-hl var(--nt-hl-t) var(--m-ease); }
.kk-m.kk-hl :is(.kk-media, .kk-sticker)::after { border-radius: var(--r-ctl); }
@keyframes kk-hl { 0%, 75% { opacity: 1; } 100% { opacity: 0; } }
.kk-qn { font-weight: 600; opacity: .85; }
.kk-qt { opacity: .75; }
.kk-qt { overflow-wrap: anywhere; }
.kk-rt { white-space: pre-wrap; overflow-wrap: anywhere; }
/* an address in a bubble is a link; its preview card sits under the bubble (30-kakao.js kkLpCard) */
.kk-link { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.kk-lps { display: flex; flex-direction: column; gap: var(--sp-15); width: 260px; max-width: 100%; margin-top: var(--sp-15); }
.kk-m.me .kk-lps { align-self: flex-end; }
.kk-lp { display: flex; flex-direction: column; overflow: hidden; border-radius: 12px; background: var(--card); color: var(--fg); text-decoration: none; }
.kk-lp img { display: block; width: 100%; max-height: 150px; object-fit: cover; background: var(--layer); }
.kk-lp-b { display: flex; flex-direction: column; gap: var(--sp-05); padding: var(--sp-2) var(--sp-3); }
.kk-lp-s { color: var(--fg-3); font: 500 11px/15px var(--font); }
.kk-lp-t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font: 600 13px/18px var(--font); }
.kk-lp-d { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--fg-2); font: 400 12px/17px var(--font); }
.kk-lp-ph { padding: var(--sp-3); color: var(--fg-3); font: 400 12px/16px var(--font); }
.kk-sys { align-self: center; max-width: 86%; margin: var(--sp-2) 0 var(--sp-1); padding: var(--sp-05) var(--sp-3); border-radius: 12px; background: var(--kk-chip); color: var(--kk-chip-fg); font: 400 12px/17px var(--font); text-align: center; overflow-wrap: anywhere; white-space: pre-wrap; }
.kk-vw video, .kk-vw img { max-width: 100%; max-height: 100%; }
/* a room that is not watched: read-only, this bar instead of the composer */
.kk-ro { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-2) var(--sp-4); border-radius: var(--r-card); background: var(--card); color: var(--fg-2); font: 400 13px/18px var(--font); }
.kk-ro[hidden] { display: none; }
.kk-ro .btn { flex: none; }
.kk-vw video { background: #000; }

/* composer: the chat composer's look (.composer, .sendrow), a draft card above it */
.kk-chat > .kk-composer { max-width: none; margin: 0; padding: 0; }
/* the general chat's composer insets; the room's cards stand on the page, so the margin takes the padding back and they keep the window's edges */
#kk-chat > .kk-composer { width: auto; padding: var(--sp-3) var(--sp-3) var(--sp-2); margin: calc(var(--sp-3) * -1) calc(var(--sp-3) * -1) calc(var(--sp-2) * -1); }
.kk-drafts { display: flex; flex-direction: column; gap: var(--sp-2); margin: var(--sp-2) 0 0; }
.kk-drafts[hidden] { display: none; }
.kk-draft { flex: none; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-card); background: var(--card); }
.kk-draft .kk-dh { margin-top: var(--sp-2); }
.kk-mk { padding: var(--sp-2) var(--sp-4); border-radius: var(--r-card); background: var(--card); color: var(--fg-3); font: 500 13px/18px var(--font); }
.kk-dh { color: var(--fg-2); font: 600 12px/16px var(--font); }
.kk-dn { margin: 0 0 var(--sp-2); color: var(--fg-3); font: 400 13px/18px var(--font); }
.kk-draft .btns { gap: var(--sp-15); }
.kk-choices { flex-wrap: wrap; }
.kk-draft .btn { height: var(--btn-h-sm); padding: 0 var(--sp-3); font-size: 13px; }
@media (pointer: coarse), (max-width: 639px) { .kk-draft .btn { height: var(--btn-hit); } }   /* a thumb: not smaller than the buttons around the card */
/* the room's reply card sits under the chat: at most 40% of the screen, only the bubbles scroll, the buttons stay */
#kk-chat .kk-drafts { margin: 0 0 var(--sp-2); min-height: 0; max-height: 40dvh; overflow-y: auto; }
#kk-chat .kk-draft { display: flex; flex-direction: column; min-height: 0; max-height: 40dvh; }
#kk-chat .kk-draft > * { flex: none; }
#kk-chat .kk-draft > .rq-body { flex: 0 1 auto; min-height: 0; overflow-y: auto; }
.kk-dt { max-height: min(16dvh, 120px); margin: var(--sp-05) 0 var(--sp-2); overflow-y: auto; font: 400 14px/21px var(--font); white-space: pre-wrap; overflow-wrap: anywhere; }
.kk-rq { margin: var(--sp-05) 0 var(--sp-15); color: var(--fg-2); font: 600 13px/18px var(--font); }
.kk-rv { width: 100%; box-sizing: border-box; min-height: 40px; margin: 0 0 var(--sp-2); padding: var(--sp-2) var(--sp-3); border: 0; border-radius: var(--r-ctl); background: var(--ff-fill); color: inherit; font: 400 16px/22px var(--font); }
.kk-rv:focus { outline: 0; box-shadow: var(--ff-ring); }
.kk-st { color: var(--fg-3); font: 500 12.5px/18px var(--font); }
.kk-dbtn { gap: var(--sp-1); }
.kk-dbtn .ic { width: 14px; height: 14px; }
.kk-dbtn:disabled { opacity: .6; }

/* The .kk-pd windows (사용자별 분석 of 30-kakao.js kkPerson, 지켜볼 대화방, a comment app's 지켜볼 글): dialog() docked as a side panel on a desktop; a phone
   keeps dialog()'s full-screen sheet */
@media (min-width: 640px) { dialog.dlg.kk-pd { width: 400px; height: 100dvh; max-height: none; margin: 0 0 0 auto; border-radius: 0; background: var(--card); box-shadow: var(--shadow-panel); } }
.kk-pd .dbody { color: var(--fg); }
.kk-pwho { display: flex; align-items: center; gap: var(--sp-2); }
.kk-psec { padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); }
.kk-psec:last-child { border-bottom: 0; }
.kk-prow { display: flex; gap: var(--sp-3); padding: var(--sp-05) 0; font: 400 13px/19px var(--font); }
.kk-pk { flex: none; width: 108px; color: var(--fg-3); }
.kk-pv { min-width: 0; overflow-wrap: anywhere; }
.kk-hist { display: flex; align-items: flex-end; gap: var(--sp-05); height: 64px; margin: var(--sp-2) 0 var(--sp-1); }
.kk-hb { flex: 1; min-height: 2px; border-radius: 2px 2px 0 0; background: var(--accent); }
.kk-hax { display: flex; justify-content: space-between; color: var(--fg-3); font: 400 11px/16px var(--font); }
.kk-hax7 { justify-content: space-around; }
.kk-pun { display: flex; flex-direction: column; gap: var(--sp-05); padding: var(--sp-15) 0; }
.kk-put { font: 400 13px/19px var(--font); overflow-wrap: anywhere; }
.kk-sum { padding-top: var(--sp-3); }
.kk-sum .btn { margin-top: var(--sp-2); height: var(--btn-h-sm); }

/* a room row's second line on the right: 미답장 then the unread count, side by side (30-kakao.js kkRow) */
.kk-row .kk-rmeta { display: inline-flex; align-items: center; justify-content: flex-end; gap: var(--sp-15); }

/* a room row: one bold thing (the name, only while unread), the unread count the same .nb badge as every other row, 미답장 of one room a status word with its dot (docs/ui-spec.md 목록 행·배지) */

/* 설정 screens (docs/ui-spec.md 설정 행): one row = lead icon, title + one-line description, then the single right slot (.li-end) with a value or
   status tag and the chevron. Sections are plain .sec labels above one .list card, the same as the prototype's 설정. */
.li-end > .chev { width: 14px; height: 14px; color: var(--fg-3); }
@media (hover: hover) { .li.tap:hover .li-end > .chev { color: var(--fg); } }
.li-end > .tag { flex: none; }
.sec.sec-act > .tag { margin-left: 0; }
.sec.sec-act > .tag + .btn { margin-left: auto; }
/* a section label sits 8px above its card and 24px below the card before it (proto.css .sec) */
#settings > .list + .sec, #settings > .set-col > .list + .sec { margin-top: var(--sp-6); }
#settings > .sec, #settings > .set-col > .sec { margin-bottom: var(--sp-2); }
#settings > .sec:first-child, #settings > .set-col:first-child > .sec:first-child { margin-top: var(--sp-2); }
/* the first screen is two columns from 1100px (22-settings-pages.js settingsCols); one column below, where the second box's first title keeps the gap a title after a card has */
#settings > .set-col + .set-col > .sec:first-child { margin-top: var(--sp-6); }
@media (min-width: 1100px) {
  #settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--sp-6); align-items: start; }
  #settings > .set-col + .set-col > .sec:first-child { margin-top: var(--sp-2); }
}
#settings .list + .list { margin-top: var(--sp-3); }
#settings .sec .tag { height: var(--tag-h); }

/* 모니터링 > 앱 > 설정 대화 (web/js/32-app-settings.js): the switches above the conversation, the 설정 button of a detail's title bar and the change card.
   The switch itself is the kakao one (.kk-sw, 17-kakao.css). */
.app-sw { display: flex; flex-direction: column; width: 100%; max-width: var(--col); min-width: 0; margin: 0 auto var(--sp-2); }
.app-sw[hidden] { display: none; }
.as-row { display: flex; align-items: center; gap: var(--sp-3); min-height: var(--row-h); padding: var(--row-py) var(--row-px); }
.as-row + .as-row { border-top: 1px solid var(--line); }
.as-b { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.as-n { font: 500 15px/22px var(--font); }
.as-h { margin-top: var(--sp-1); color: var(--fg-2); font: 400 12px/16px var(--font); }
.as-h + .as-h { margin-top: 0; }
.as-v { flex: none; color: var(--fg-2); font: 400 13px/20px var(--font); }
.as-rm { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--line); }
.as-rml { margin: 0; padding-left: var(--sp-5); color: var(--fg-2); font: 400 13px/20px var(--font); }
.as-del { display: flex; align-items: flex-start; gap: var(--sp-2); font: 400 13px/20px var(--font); }
.as-del input { flex: none; margin-top: 3px; /* nudge: checkbox centred on the first 20px text line */ }
.as-rm .as-act { margin-top: var(--sp-1); }
/* the 대화 and ⋯ buttons of a detail's title bar: at the right end of the head */
:is(.cv-head, .kk-head) .as-hd { flex: none; margin-left: auto; }
:is(.cv-head, .kk-head) .as-hd + .as-hd { margin-left: 0; }
.as-hd[hidden] { display: none; }

.as-card { margin: var(--sp-1) 0; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-card); background: var(--layer); }
.as-ct { margin-bottom: var(--sp-2); color: var(--fg-2); font: 500 13px/20px var(--font); }
/* the prototype's change list (#apps/settings): the setting at the left, "old -> new" at the right, a hairline between the rows */
.as-cr { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-2) 0; }
.as-cr + .as-cr { box-shadow: inset 0 1px 0 var(--line); }
.as-cn { flex: 1; min-width: 0; color: var(--fg); font: 500 14px/22px var(--font); }
.as-cv { flex: none; max-width: 70%; text-align: right; overflow-wrap: anywhere; color: var(--fg-2); font: 400 14px/22px var(--font); }
/* the value that changes is the one bold thing; the value it replaces stays beside it, grey and struck through */
.as-old { color: var(--fg-3); text-decoration: line-through; }
.as-now, .as-card.applied .as-cv { font-weight: 600; }
.as-act { display: flex; gap: var(--sp-2); margin-top: var(--sp-3); }
.as-done { margin-top: var(--sp-3); color: var(--fg-2); font: 500 13px/20px var(--font); }
.as-done.applied { color: var(--ok); }
.as-done.cancelled, .as-card.cancelled .as-cr { color: var(--fg-3); }
.as-in { flex: none; width: 150px; height: var(--ctl-h); }
@media (pointer: coarse) { .as-in { height: var(--field-h-touch); } }
.as-in[type="number"] { width: 96px; text-align: right; }
.as-seg { flex: none; flex-wrap: nowrap; height: 32px; }
.as-seg button { flex: none; height: 28px; padding: 0 var(--sp-3); white-space: nowrap; }
.as-step { flex: none; display: inline-flex; align-items: center; gap: var(--sp-05); }
.as-step .ib { width: 32px; height: 32px; color: var(--fg-2); font: 400 18px/1 var(--font); }
.as-step .as-in[type="number"] { width: 40px; padding: 0; border: 0; background: transparent; text-align: center; appearance: textfield; }
.as-step .as-in[type="number"]::-webkit-inner-spin-button, .as-step .as-in[type="number"]::-webkit-outer-spin-button { appearance: none; margin: 0; }
/* the settings screen (asScreen): a pushed view with a back button, the options card as its body */
.as-screen .fs-hd:has(> .as-back) { gap: var(--sp-1); padding-left: max(var(--sp-1), env(safe-area-inset-left)); }
.as-screen .fs-tt { flex: 1; min-width: 0; }
.as-screen .fs-body { padding-top: var(--sp-2); padding-bottom: max(var(--sp-4), env(safe-area-inset-bottom)); }
.as-screen .app-sw { margin: 0 auto; }
.as-screen .fs-body .as-row { padding: var(--sp-2) var(--sp-4); }
.as-screen .fs-body .as-rm { padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--line); }

/* 앱 추가 (web/js/32-app-settings.js): the sheet and the template chips above the chat box. */
.fs-body .as-sec { margin: var(--sp-4) 0 var(--sp-1); color: var(--fg-2); font: 600 13px/20px var(--font); }
.fs-body .as-sec:first-child { margin-top: 0; }
.fs-body .as-row { padding: var(--sp-2) 0; }
.as-ic { flex: none; display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 50%; background: var(--layer); color: var(--fg-2); }
.as-ic svg { width: 16px; height: 16px; }
.tplrow { display: flex; flex-wrap: wrap; gap: var(--sp-15); }
.tplrow { position: relative; flex-wrap: nowrap; align-items: center; padding: var(--sp-15) var(--sp-3) var(--sp-05); }
.tplrow .tplnote { flex: 1; min-width: 0; padding: 0 var(--sp-1); font-size: 13px; color: var(--fg-2); }
.tplrow[hidden] { display: none; }
.tplnote { padding: var(--sp-05) var(--sp-4) 0; color: var(--fg-3); font-size: 12px; line-height: 18px; }
.tplnote[hidden] { display: none; }
.as-tpl { flex: none; display: inline-flex; align-items: center; justify-content: center; height: 28px; padding: 0 var(--sp-3); border: 0; border-radius: var(--r-ctl); background: var(--card); color: var(--fg); font: 500 13px/20px var(--font); cursor: pointer; }
@media (hover: hover) { .as-tpl:hover { background: var(--hover); color: var(--fg); } }
.as-tpl[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
#mon-chips { flex-wrap: wrap; overflow-x: visible; }
.as-tpl-x { width: 28px; padding: 0; }
.as-tpl-x svg { width: 14px; height: 14px; }
.as-btns { flex: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sp-2); }
.as-name .as-in { flex: 1 1 120px; min-width: 0; }
.fs-body .as-rm { padding: var(--sp-2) 0 var(--sp-3); border-top: 0; }
.fs-body .as-row ~ .btn { margin-top: var(--sp-4); }
.as-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--fg-3); }
.as-dot.ok { background: var(--ok); }
.as-dot.fail { background: var(--err); }
.as-why { color: var(--err); overflow-wrap: anywhere; }
/* 연결 상태 is the first card, above every section's own card (the 설정 pages' .sec + .list shape). */
.app-sw .as-conn { min-height: 56px; }
/* the sub-heading of a group inside 자동 초안과 승인 (자동 초안 규칙): no hairline around it, it belongs to the rows it names. */
.app-sw .as-sub { margin: var(--sp-2) 0 0; padding: var(--sp-1) var(--sp-4) 0; border-top: 0; color: var(--fg-3); font: 600 12px/18px var(--font); }
.app-sw .as-sub + * { border-top: 0; }
.as-unit { color: var(--fg-3); font: 400 12px/18px var(--font); }
/* 자동 초안 규칙 (32-app-settings.js arNodes): the 기본 규칙 box and a rule's form take the row's full width; the boxes grow with their text. */
.as-col { flex-direction: column; align-items: stretch; gap: var(--sp-2); }
.as-in.as-ta { width: 100%; height: auto; min-height: 32px; resize: vertical; font: inherit; line-height: 20px; }
textarea.as-in.as-ta { padding-top: var(--sp-15); padding-bottom: var(--sp-15); }
.as-rule .as-n { display: flex; }
.as-rform .as-act { margin-top: 0; }
.as-rl { display: flex; flex-direction: column; gap: var(--sp-1); }
.as-new-in { display: block; width: 100%; min-height: 88px; margin: 0 0 var(--sp-2); padding: var(--sp-3); border: 0; border-radius: 12px; background: var(--ff-fill); color: var(--fg); font: 400 15px/22px var(--font); resize: none; }
.as-new-in:focus { outline: 0; box-shadow: var(--ff-ring); }
.as-new-in::placeholder { color: var(--fg-3); }

/* 모니터링 > 앱 > 유튜브 / 인스타그램 / 웹사이트 댓글 and 인스타그램 DM (web/js/30-monitoring-comments.js, 30-monitoring-comments-dm.js).
   The pane keeps the Messenger pane's frame (17-kakao.css: .kk, .kk-rooms, .kk-chat) but reads as the prototype's screens: the conversation sits on the same card
   surface as the post list (no chat backdrop, no bubbles, no dark date pills), a comment is a row, the follow-up of each comment is a short track of steps. */

/* choose what to follow */
.kk-pick-src { padding: var(--sp-1) 0 var(--sp-2); border-top: 1px solid var(--line); }
.kk-pick-src > .kk-pr + .li { border-top: 1px solid var(--line); }
#cm-pick .sec { margin-inline: var(--sp-4); }   /* section names start on the rows' left line */
#cm-pick .sec + .kk-pick-src { border-top: 0; }
#cm-pick .fs-hd { padding-left: max(var(--sp-4), env(safe-area-inset-left)); }   /* the head starts on the rows' left line (this sheet's rows sit at --sp-4 at every width) */
#cm-pick .fs-body { padding-inline: 0; }   /* the rows run edge to edge and bring their own side padding */
/* 댓글 / DM swap the whole list under them, so they are screen tabs like the mailbox tabs (web/DESIGN.md 화면 탭), not a filter track */
#cm-rooms .cm-tabs { position: static; flex-wrap: nowrap; margin: 0 var(--sp-4) var(--sp-1); padding: 0; background: none; box-shadow: inset 0 -1px 0 var(--line); }
#cm-rooms .cm-tabs .mr-f { height: var(--btn-hit); border-radius: 0; background: none; color: var(--fg-2); }
#cm-rooms .cm-tabs .mr-f::before { content: none; }
@media (hover: hover) { #cm-rooms .cm-tabs .mr-f:hover { color: var(--fg); } }
#cm-rooms .cm-tabs .mr-f.on { color: var(--fg); box-shadow: inset 0 -2px 0 var(--fg); }
.dm-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); padding: var(--sp-1) var(--sp-4) var(--sp-2); }
/* the note under the tabs says it once for the whole list; an open DM on a phone has no list beside it, so its own line stays there */
#v-monitoring.app-two #dm-ro { display: none; }
.dm-note { color: var(--fg-3); font: 400 12px/16px var(--font); }

/* post list rows: avatar or thumbnail, title, one-line preview, time over the two counts */
.kk-av.kk-thumb { width: 48px; height: 36px; border-radius: 6px; object-fit: cover; background: var(--layer); }
.cm .kk-row .nb.unreplied { color: var(--unreplied); }

/* the conversation: the card surface, a hairline under the head */
.cm .kk-chat { background: var(--card); }
.cm .kk-head { border-bottom: 1px solid var(--line); }
.cm .kk-tl { padding: var(--sp-1) var(--sp-6) var(--sp-3); }
.cm .kk-in { gap: 0; }
.cm .kk-in > .kk-note { color: var(--fg-3); }
/* a day is a quiet label with a hairline, not a dark pill */
.cm .kk-date { align-self: stretch; display: flex; align-items: center; gap: var(--sp-2); margin: var(--sp-3) 0 var(--sp-05); padding: 0; border-radius: 0; background: none; color: var(--fg-3); font: 500 12px/16px var(--font); }
.cm .kk-date::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* the post at the top of its conversation: the pane head shows it on a wide screen, so only the phone (head hidden) draws it */
.cm-post { display: flex; align-items: center; gap: var(--sp-3); margin: 0; padding: var(--sp-2) 0 var(--sp-2); border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; }
.cm-post .kk-av.kk-thumb { width: 64px; height: 48px; }
.cm-pt { display: block; color: var(--fg); font: 600 14px/20px var(--font); overflow-wrap: anywhere; }
.cm-pl { display: inline-block; margin-top: var(--sp-05); color: var(--accent); font: 500 12px/16px var(--font); }
@media (min-width: 1100px) { .cm-post { display: none; } }

/* a comment thread: the comment, replies under it behind a rule, a draft or a reply on its way right under the comment it answers */
.cm-th { display: flex; flex-direction: column; min-width: 0; padding: var(--sp-2) 0; }
.cm-th + .cm-th { border-top: 1px solid var(--line); }
.cm-replies { --cm-rail: calc(var(--sp-8) / 2 - var(--sp-05) / 2); /* the rule runs down the middle of the 32px avatar and the replies start where the avatar ends */ display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; margin: var(--sp-2) 0 0 var(--cm-rail); padding-left: var(--cm-rail); border-left: 2px solid var(--line-2); }
.cm-replies .od-cwrap { margin: 0; }
.cm-c { display: flex; align-items: flex-start; gap: var(--sp-2); min-width: 0; }
.cm-c > .kk-av { width: 32px; height: 32px; font-size: 14px; }
.cm-c > .kk-av.cm-me { background: color-mix(in srgb, var(--accent) 14%, var(--card)); color: var(--accent); font-size: 12px; }
.cm-c > .kk-mb { flex: 1; max-width: none; min-width: 0; align-items: stretch; gap: var(--sp-05); }
.cm-hd { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.cm-hd .kk-name { min-width: 0; margin: 0; overflow: hidden; color: var(--fg); font: 500 13px/20px var(--font); text-overflow: ellipsis; white-space: nowrap; }
.cm-hd .kk-time { color: var(--fg-3); font: 400 12px/16px var(--font); }
.cm-hd .tag.unreplied { margin-left: auto; }
.cm-mine { color: var(--accent); font: 500 13px/20px var(--font); }
.cm-c .kk-reply { margin: 0; color: var(--fg-3); font: 400 12px/16px var(--font); }
.cm-c .kk-bub { padding: 0; border-radius: 0; background: none; color: var(--fg); font: 400 14px/21px var(--font); }
.cm-c.mine .kk-bub { color: var(--fg-2); }
.cm-c [hidden] { display: none; }
.cm-acts { display: flex; align-items: center; gap: var(--sp-15); margin-top: var(--sp-15); }
.cm-acts > .btn.text:first-child { margin-left: calc(var(--sp-2) * -1); }
.cm .kk-draft .kk-dh { font-weight: 500; }   /* one bold per card: the card's lead is the head (rq-wt), its sub-head stays regular */
.cm .od-bar { margin: 0 0 var(--sp-15); }
.cm .od-tg { min-height: 28px; padding: 0 var(--sp-3); font-size: 13px; }

/* what the comment set going: a track per follow-up (답글: 초안 · 확인 · 보냄, 메일: 초안 · 보냄); the step it is at carries the color, the later ones stay hollow.
   done = green, busy (on its way) = blue, ask (waits for him) = orange, err = red (the shared state colors) */
.cm-pg { display: flex; flex-wrap: wrap; gap: var(--sp-05) var(--sp-4); margin-top: var(--sp-1); min-width: 0; }
.cm-tr { display: flex; align-items: center; flex-wrap: wrap; min-width: 0; color: var(--fg-3); font: 400 12px/18px var(--font); }
.cm-tn { margin-right: var(--sp-2); color: var(--fg-2); font-weight: 500; }
.cm-st { position: relative; display: inline-flex; align-items: center; --cm-link: 10px; gap: var(--sp-1); min-width: 0; overflow-wrap: anywhere; }
.cm-st::before { content: ""; flex: none; width: 8px; height: 8px; box-sizing: border-box; border: 1.5px solid var(--line-2); border-radius: 50%; }
.cm-st + .cm-st { margin-left: var(--sp-15); padding-left: calc(var(--cm-link) + var(--sp-1)); }
.cm-st + .cm-st::after { content: ""; position: absolute; left: 0; top: 9px; width: var(--cm-link); height: 1px; background: var(--line-2); }
.cm-st[data-s="done"] { color: var(--fg-2); }
.cm-st[data-s="done"]::before { border-color: var(--ok); background: var(--ok); }
.cm-st[data-s="busy"] { color: var(--accent); }
.cm-st[data-s="busy"]::before { border-color: var(--accent); background: var(--accent); }
.cm-st[data-s="ask"] { color: var(--warn); font-weight: 600; }
.cm-st[data-s="ask"]::before { border-color: var(--warn); background: var(--warn); }
.cm-st[data-s="err"] { color: var(--err); font-weight: 600; }
.cm-st[data-s="err"]::before { border-color: var(--err); background: var(--err); }

/* a reply of his on its way / sent / failed (cmSendNode): a quiet block, not a yellow bubble */
.cm .kk-m.me { align-items: stretch; }
.cm .kk-m.me .kk-line { max-width: 100%; }
.cm .kk-m.me .kk-bub { background: var(--layer); color: var(--fg); border-radius: var(--r-ctl); }
.cm .kk-m.pend { margin-top: 0; }
.cm .kk-st { color: var(--fg-3); }
.cm .kk-m.pend.failed .kk-st { color: var(--err); }


/* A lot piled up (web/js/30-monitoring.js monBar / monFeedNodes / monGroupNode): the view chips with their
   counts and 읽음 처리 on one sticky bar, section and day lines, one compact row per report or per source, and the 더 보기 button of a page. */
.mon-bar { align-items: center; justify-content: space-between; flex-wrap: nowrap; gap: var(--sp-2); }
.mon-tabs { display: flex; gap: 0; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.mon-tabs::-webkit-scrollbar { display: none; }
.mon-read { flex: none; height: 32px; padding: 0 var(--sp-3); font-size: 13px; }
.mon-read:disabled { color: var(--fg-3); }
.mon-sh { padding: var(--sp-3) var(--sp-1) 0; color: var(--fg-2); font: 600 13px/18px var(--font); }
.mon-sh:first-of-type { padding-top: 0; }
.mon-day { padding: var(--sp-1) var(--sp-1) 0; color: var(--fg-3); font: 500 12px/16px var(--font); }

/* a report or a folded source as one compact row: source, state, time on the first line, the summary under it (two lines at most) */
:is(#mon-tl, .fr-list) > .bm.rc.fr { gap: var(--sp-1); padding: var(--sp-2) var(--sp-4); cursor: pointer; }
.fr-list > .bm.alert { padding: var(--sp-2) var(--sp-4); border-radius: var(--r-card); background: var(--card); }
.fr-list > .bm.rc { display: flex; flex-direction: column; gap: var(--sp-3); }
@media (hover: hover) { :is(#mon-tl, .fr-list) > .bm.rc.fr:not(.fr-all):hover { background: var(--hover); } }
/* a report said whole on its row: nothing to unfold, so it is not a button and its line is not clipped */
:is(#mon-tl, .fr-list) > .bm.rc.fr.fr-all { cursor: auto; }
.fr-all .fr-sum { display: block; }
:is(#mon-tl, .fr-list) > .bm.rc.fr:focus-visible { outline-offset: -2px; }
.fr-sum { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: var(--fg-2); font-size: 14px; line-height: 20px; overflow-wrap: break-word; }
/* unread: the source in full weight and a dot before it (never a coloured edge) */
.fr.un .rc-src { color: var(--fg); font-weight: 700; }
.fr.un .rc-src::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 var(--sp-15) 1px 0; /* nudge: dot centred on the text's x-height */ border-radius: 50%; background: var(--accent); vertical-align: middle; }
.fr .fr-n { font-variant-numeric: tabular-nums; }
.fr-chev { flex: none; display: inline-flex; color: var(--fg-3); transition: transform var(--m-fast) var(--m-ease); }
.fr-chev .ic { width: 16px; height: 16px; }
.fr.grp.open .fr-chev { transform: rotate(180deg); }
.fr.grp.open { background: var(--layer); }
.fr-list { display: flex; flex-direction: column; gap: var(--sp-2); padding-left: var(--sp-3); }
.fr-list > .fr-open, #mon-tl > .fr-open { gap: var(--sp-3); }
/* 작업내역 (web/js/11-worklog.js): a day's posts as the feed's rows inside ONE list card, hairlines between them; the title is one line */
.fr-list.wl-list { gap: 0; padding: 0; overflow: hidden; border-radius: var(--r-card); background: var(--card); }
.wl-list > .wl-row { border-radius: 0; background: transparent; justify-content: center; }
.wl-list > .wl-row + .wl-row { border-top: 1px solid var(--line); }
.wl-list > .wl-row[role="button"] { min-height: 44px; }
@media (hover: hover) { .wl-list > .wl-row[role="button"]:hover { background: var(--hover); } }
.wl-row:not(.fr-all, .fr-open) .fr-sum { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-row .rc-hd .tag, .wl-row .rc-src { flex: none; }
.wl-row .rc-src { min-width: 0; flex: 0 1 auto; }
.wl-plain .rc-hd { align-items: flex-start; }
.wl-plain .rc-hd > .fr-sum { flex: 1; min-width: 0; }
.wl-sess { text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.wl-quiet .rc-src { flex: none; }
.wl-q { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-3); font-size: var(--fs-meta); line-height: var(--lh-meta); }
.wl-full { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.mon-more { align-self: center; min-height: 44px; padding: 0 var(--sp-4); font-size: 14px; }
.mon-rep { color: var(--fg-3); font-size: 12px; line-height: 16px; }

/* 더 보기 (moreRow): a list card's own last line. Centered muted text across the whole card, so it reads as the card's foot, not one more row. */
.cv-more { display: block; width: 100%; min-height: 44px; padding: var(--sp-2) var(--sp-4); border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--fg-3); font: 500 var(--fs-sec)/var(--lh-sec) var(--font); text-align: center; cursor: pointer; }
@media (hover: hover) { .cv-more:hover { background: var(--card-hover); color: var(--fg-2); } }
.cv-more:active { background: var(--row-sel); }
@media (prefers-reduced-motion: reduce) { .fr-chev { transition: none; } }

/* 앱 (web/js/30-apps.js): the 모니터링 list's rows on the left and the open app on the right. Below 1100px the list and the app
   are two screens (#v-apps.cv-listing = the list); the app's own page fills the pane under the dotz header. */
#v-apps { min-height: 0; }
#v-apps > .apps-pane { display: none; flex: 1; min-height: 0; }
#v-apps.cv-listing > .cv-side { display: block; }
#v-apps.cv-listing > .apps-pane { display: none; }
#v-apps:not(.cv-listing) > .apps-pane { display: flex; }
#v-apps > .cv-side { display: none; }


.apps-pane { flex-direction: column; min-width: 0; min-height: 0; }
.apps-hd { display: flex; flex: none; align-items: center; gap: var(--sp-2); min-height: 56px; padding: var(--sp-2) var(--sp-1) var(--sp-3); }
.apps-hd .cv-av { width: 36px; height: 36px; }
.apps-hb { flex: 1; min-width: 0; }
.apps-n { margin: 0; font: 700 20px/28px var(--font); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apps-p { display: flex; align-items: center; gap: var(--sp-15); margin: var(--sp-05) 0 0; color: var(--fg-3); font: 400 13px/18px var(--font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apps-hd .ib { color: var(--fg-2); }

.apps-frame { flex: 1; width: 100%; min-height: 0; border: 0; border-radius: var(--r-card); background: var(--card); }
.apps-card { padding: var(--sp-5); border-radius: var(--r-card); background: var(--card); }
.apps-note { margin: 0 0 var(--sp-3); color: var(--fg-2); font-size: 14px; line-height: 21px; }
.apps-card .btn { margin-top: 0; }
.apps-set .apps-block { margin-top: var(--sp-4); }
.apps-kk { margin: 0 0 var(--sp-1); color: var(--fg-3); font: 500 12px/16px var(--font); }
.apps-kv { display: flex; flex-direction: column; gap: var(--sp-05); }
.apps-kr { display: flex; gap: var(--sp-3); padding: var(--sp-15) 0; border-bottom: 1px solid var(--line); }
.apps-kr:last-child { border-bottom: 0; }
.apps-kv2 { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.apps-pre { margin: 0; padding: var(--sp-3); overflow-x: auto; border-radius: var(--r-ctl); background: var(--layer); font-size: 12px; line-height: 18px; white-space: pre-wrap; overflow-wrap: anywhere; }
.apps-err .sup { color: var(--fg-3); font-size: 12px; overflow-wrap: anywhere; }

@media (min-width: 1100px) {
  /* the app frame (docs/web-app-design.md): chat's two columns, the list at chat's x and width, the app at chat's content box */
  #v-apps { --cv-w: var(--frame-list-w); display: grid; max-width: none; margin: 0; padding-left: var(--edge); padding-right: var(--edge); column-gap: var(--frame-gap); grid-template-columns: var(--cv-w) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  #v-apps > .cv-side { grid-column: 1; grid-row: 1; align-self: start; display: block; min-height: 0; max-height: calc(100% - var(--sp-4)); margin-bottom: var(--sp-4); padding: 0; }
  .apps-hd { padding: var(--sp-3) var(--sp-4); }
  #v-apps.cv-listing > .cv-side, #v-apps > .apps-pane, #v-apps:not(.cv-listing) > .apps-pane { display: flex; }
  #v-apps > .apps-pane { grid-column: 2; grid-row: 1; min-height: 0; margin-bottom: var(--sp-4); }
  #v-apps > .apps-pane:not(:has(.apps-frame)) { display: block; }
}

/* 캔버스 (web/js/30-canvas.js): the 앱 screen's header and frame (20-apps.css) for an HTML page the bot made. From 1100px a third
   column beside the conversation; below that a full-screen sheet on the page canvas, under the pick outline (21-picker.css, z 70). */
#v-chat > #canvas { display: none; }
#v-chat.canvas-open > #canvas:not([hidden]) { display: flex; }
@media (max-width: 1099px) {
  #v-chat.canvas-open > #canvas { position: fixed; inset: 0; z-index: 60; padding: calc(var(--sp-2) + env(safe-area-inset-top, 0px)) var(--sp-3) calc(var(--sp-3) + env(safe-area-inset-bottom, 0px)); background: var(--bg); }
}
/* beside the conversation the canvas is never narrower than --cnv-min, and the conversation keeps the width a split pane keeps (--cnv-conv, 43-panes-view.js paneDrag).
   When the window cannot give both with the list column, the column folds like split panes' (.cnv-fold, 26-panes.css; 43-panes-view.js cnvFoldSync) and the list comes from its 목록 button. */
@media (min-width: 1100px) {
  #v-chat { --cnv-conv: 280px; --cnv-min: 400px; }
  #v-chat.canvas-open { grid-template-columns: var(--cv-w) minmax(var(--cnv-conv), 1fr) minmax(var(--cnv-min), 1.25fr); }
  #v-chat.canvas-open > #canvas { grid-column: 3; grid-row: 1 / -1; min-width: var(--cnv-min); min-height: 0; margin-bottom: var(--sp-4); }
  #v-chat.cnv-fold.canvas-open { grid-template-columns: minmax(var(--cnv-conv), 1fr) minmax(var(--cnv-min), 1.25fr); }
  #v-chat.cnv-fold.canvas-open::before, #v-chat.cnv-fold.canvas-open > * { grid-column: 1; }
  #v-chat.cnv-fold.canvas-open > #canvas { grid-column: 2; }
  #v-chat.cnv-fold > #cv-head { padding-left: calc(var(--sp-12) + var(--sp-4)); }
}

/* the header's file mark sits on a surface of its own: the pane is on the page (--bg), where a --layer circle would vanish */
.cvs-pane .apps-hd .cv-av, .apps-pane .apps-hd .cv-av { background: var(--card); color: var(--fg-2); }

/* The mailbox of the mail app (web/js/30-mail-box.js): row checkbox and star, the bold unread row, the selection bar, the floating 메일 쓰기 and its sheet, the inline reply. */
.mr-lead { flex: none; display: inline-flex; align-items: center; gap: var(--sp-05); margin-left: calc(var(--sp-1) * -1); }
.mr-chk, .mbox-all { flex: none; width: 16px; height: 16px; margin: 0 var(--sp-15) 0 var(--sp-1); accent-color: var(--accent); cursor: pointer; }
.mr-star { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--fg-3); }
button.mr-star { cursor: pointer; }
@media (hover: hover) { button.mr-star:hover { background: var(--active); color: var(--fg); } }
.mr-star .ic { width: 16px; height: 16px; }
.mr-star.on { color: var(--accent); }
.mr-star.on .ic { fill: currentColor; }
span.mr-star:not(.on) { opacity: .45; }
/* one bold per row (principle 1): the subject of an unread mail; its sender is a step lighter, a read mail is grey. The dot is the unread state (principle 2) */
.mr .rc-src { color: var(--fg-2); font-size: 13px; font-weight: 500; }
.mr.mr-new .rc-src { color: var(--fg); }
.mr.mr-new .rc-title { color: var(--fg); font-weight: 600; }
.mr:not(.mr-new) .rc-title { color: var(--fg-2); font-weight: 400; }
.mr .rc-src > .mr-dot { display: inline-block; margin-right: var(--sp-15); vertical-align: middle; }   /* the unread dot stands before the sender, clear of the checkbox */
.mr-filter { padding-right: var(--sp-5); -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - var(--sp-5)), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - var(--sp-5)), transparent); }
.mr .tag.mr-unread { display: none; }
#mon-tl > .bm.rc.mr.mr-sel { background: color-mix(in srgb, var(--accent) 10%, var(--card)); }

/* One line of one height whether or not anything is chosen, so ticking a mail never moves the rows; a bar wider than its pane scrolls sideways like the folder chips. */
.mbox-bar { display: flex; align-items: center; gap: var(--sp-15); height: 40px; margin: 0 0 var(--sp-1); padding: 0 var(--sp-3) 0 var(--sp-15); overflow-x: auto; scrollbar-width: none; color: var(--fg-2); font-size: 12px; }
.mbox-bar::-webkit-scrollbar { display: none; }
.mbox-bar > * { flex: none; }
.mbox-bar.on { position: sticky; top: 40px; z-index: 2; background: var(--bg); }
.mbox-all:disabled { visibility: hidden; }
.mbox-n { margin-right: auto; font-variant-numeric: tabular-nums; }
.mbox-bar.on .mbox-n { margin-right: var(--sp-1); color: var(--fg); font-weight: 600; }
.mbox-b { display: inline-flex; align-items: center; gap: var(--sp-15); height: 32px; padding: 0 var(--sp-3); border: 0; border-radius: var(--r-ctl); background: var(--layer); color: var(--fg); font: inherit; font-size: 13px; line-height: 20px; font-weight: 600; cursor: pointer; white-space: nowrap; }
@media (hover: hover) { .mbox-b:hover:not(:disabled) { background: var(--hover); } }
.mbox-b:disabled { opacity: .45; cursor: not-allowed; }
.mbox-b .ic { width: 16px; height: 16px; }
.mbox-b.danger { color: var(--err); }   /* 삭제 keeps the destructive tone of the menus (.mi.danger) */
.mbox-b.mbox-x { width: 32px; padding: 0; justify-content: center; margin-left: auto; }
/* the open mail's top bar (30-mail-box.js mailOpenBar): one row of icons on its own tinted strip across the card (prototype #mail/1) that separates
   it from the mail header, sticky while the mail scrolls. The card's padding is a variable so the strip can run edge to edge. */
.tl-in > .bm.rc.mopen { --mpx: 18px; gap: var(--sp-1); padding: 0 var(--mpx) var(--sp-4); }
@container tlcol (max-width: 559.98px) { .tl-in > .bm.rc.mopen { --mpx: 16px; padding-bottom: var(--sp-3); } }
.mtop { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 0; height: 40px; margin: 0 calc(var(--mpx) * -1) var(--sp-2); padding: 0 calc(var(--mpx) - var(--sp-2)); border-radius: var(--r-card) var(--r-card) var(--r-ctl) var(--r-ctl); background: var(--layer); }
.mtop .mtop-b { flex: 0 1 36px; min-width: 32px; width: 36px; height: 32px; border-radius: var(--r-ctl); color: var(--fg-2); }
.mtop .mtop-b .ic { width: 16px; height: 16px; }
@media (hover: hover) { .mtop .mtop-b:hover { background: var(--active); color: var(--fg); } }
/* the phone's bar holds all nine at the .ib touch size (36px) */
@media (pointer: coarse), (max-width: 639px) { .mtop .mtop-b { height: 36px; } }
@media (max-width: 639px) { .mtop { padding: 0 var(--sp-05); } }
/* the day / 지난 기록 lines above an open mail only push it down: the mail's own time is in its header */
#tl > .a-div:has(~ .bm.mopen) { display: none; }
/* an open mail stands in the list's column, 채팅's content box (the app frame, 20-monitoring.css); its insets are the chat window's (05-log.css), not its own */
.mopen > .rc-title { margin-top: var(--sp-1); font-size: 15px; line-height: 21px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mopen > .rc-hd { margin-top: 0; font-size: 13px; }
/* the summary (11-mailtext.js mailSumBlock): a grey block, the lightning mark in grey (blue is only for what you press), 요약 ·, two short sentences with the to-do in bold */
.msum { display: flex; align-items: flex-start; gap: var(--sp-2); margin: var(--sp-15) 0 var(--sp-1); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-ctl); background: var(--layer); color: var(--fg-2); font-size: 14px; line-height: 21px; }
.msum > .ic { flex: none; width: 16px; height: 16px; margin-top: var(--sp-05); color: var(--fg-3); }
.msum-t { min-width: 0; overflow-wrap: anywhere; word-break: keep-all; }
.msum-k { color: var(--fg-3); }
.msum b { color: var(--fg); font-weight: 700; }
.mln { display: grid; gap: var(--sp-1); margin: var(--sp-1) 0; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-ctl); font: 400 13px/20px var(--font); overflow-wrap: anywhere; word-break: keep-all; }
.mln-k { color: var(--fg-3); }
.mln-l { margin: 0; padding-left: var(--sp-4); color: var(--fg); }
.mln-l li + li { margin-top: var(--sp-05); }
.mopen > .rc-hd .rc-src { color: var(--fg-2); font-weight: 500; }
.mopen > .rc-hd .rc-time { font-size: 12px; }
/* the original: a quiet grey well, no border (principles 5, 9); the HTML frame stays a white page */
.mopen .mb-txt { padding: 0; border: 0; background: none; }
.mopen .mb-frame { border: 0; }
/* one lead (principle 1): the open mail leads; the answer card under it asks in a regular line and its answers are one line each (the three stay as they are) */
#v-chat:has(#tl > .bm.mopen) .dcard .dc-q { font-size: var(--fs-body); line-height: var(--lh-sec); font-weight: 500; }
#v-chat:has(#tl > .bm.mopen) .dcard .dc-ds { display: none; }
/* the files: chips with the name and the size, one download each (principle 3); the head is a grey word, not a bold line */
.mopen > .mr-files { flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin: var(--sp-15) 0 var(--sp-1); padding-top: 0; border-top: 0; }
.mopen > .mr-files > .mr-fh { flex: 1 0 100%; font-weight: 500; }
.mopen > .mr-files > .mr-file { position: relative; min-height: 36px; max-width: 100%; padding: 0 var(--sp-3); gap: var(--sp-15); background: var(--layer); font-size: 13px; }
.mopen > .mr-files > .mr-file::after { content: ""; position: absolute; inset: -4px 0; }
@media (hover: hover) { .mopen > .mr-files > .mr-file:hover { background: var(--hover); } }
.mopen > .mr-files > .mr-file .ic { width: 16px; height: 16px; }
.mopen > .rc-raw > summary { display: none; }
.mopen > .rc-raw { margin-top: var(--sp-1); }
.mopen > .rc-raw > .rc-rawbody { margin-top: 0; }

.mbox-fab { position: fixed; z-index: 40; right: var(--mbox-r); bottom: 24px; display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); min-width: 56px; height: 56px; padding: 0 var(--sp-5); border: 0; border-radius: 28px; background: var(--accent); color: var(--on-accent); font: inherit; font-size: 15px; font-weight: 700; box-shadow: 0 2px 8px rgba(0, 0, 0, .16); cursor: pointer; }
/* --mbox-r: how far the mail column's right edge is from the window's right edge (the sidebar and the centred page are taken out); the round button, the folded bar and the open sheet all end there, so folding and unfolding never jumps. A phone sets its own edge below. */
:root { --mbox-r: calc(max(0px, (100vw - var(--side-w, 0px) - var(--view-w)) / 2) + var(--sp-6)); }
@media (min-width: 1100px) { :root { --mbox-r: calc(max(0px, (100vw - var(--side-w) - var(--view-w)) / 2) + var(--edge)); } }
.mbox-fab-gap { flex: none; height: calc(var(--sp-12) + var(--sp-8)); }   /* the button's 56px and its 24px from the edge */
.mbox-fab:hover { filter: brightness(1.06); }
.mbox-fab .ic { width: 20px; height: 20px; }
/* A phone keeps the button above the compact tab bar (web/css/01-tokens.css .side: a 46px row), not on top of its tabs. */
@media (max-width: 639px) { .mbox-fab-gap { height: calc(var(--sp-12) + var(--sp-12) + var(--sp-8) + env(safe-area-inset-bottom)); } .mbox-fab { right: 16px; bottom: calc(72px + env(safe-area-inset-bottom)); width: 56px; height: 56px; padding: 0; } .mbox-fab-t { display: none; } }

/* 메일 쓰기 is a centered sheet on a wide screen (ui-spec 시트·대화창: 560px, 20px corners, --pop, --float), a full screen on a phone (editing); minimized it docks as a bar at the bottom right */
.mbox-sheet { position: fixed; z-index: 60; inset: 0; margin: auto; display: flex; flex-direction: column; width: min(560px, calc(100% - 48px)); height: fit-content; max-height: min(86dvh, 820px); border-radius: 20px; background: var(--pop); color: var(--fg); box-shadow: var(--float); overflow: hidden; }
@media (min-width: 640px) { .mbox-sheet:not(.min) { inset: auto var(--mbox-r) 0 auto; margin: 0; border-radius: 20px 20px 0 0; } }   /* open, it docks where its folded bar stands */
.mbox-sheet.min { inset: auto var(--mbox-r) var(--mbox-lift, 0px) auto; margin: 0; width: 360px; max-height: 56px; border-radius: 20px 20px 0 0; }
.mbox-sheet.min > :not(.mbox-sh) { display: none; }
.mbox-sheet.min { cursor: pointer; }
body:has(.mbox-sheet.min) .mbox-fab { display: none; }   /* the folded bar stands where 메일 쓰기 does: tap the bar to open it again */
.mbox-sheet.min .mbox-min svg { transform: rotate(180deg); }   /* the chevron points up: the bar opens upwards */
.mbox-sh { display: flex; align-items: center; gap: var(--sp-05); flex: none; padding: var(--sp-4) var(--sp-2) var(--sp-2) var(--sp-6); }
.mbox-st { flex: 1; font-size: 20px; line-height: 28px; font-weight: 700; }
.mbox-sb, .mbox-rb { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding: var(--sp-1) var(--sp-6) var(--sp-4); }
/* the fields are rows split by one hairline (the label is a grey word, principle 3); the body has none */
.mbox-f { position: relative; display: flex; align-items: center; gap: var(--sp-2); min-height: 48px; border-bottom: 1px solid var(--line); }
.mbox-err { padding: var(--sp-1) 0; color: var(--err); font-size: 12px; line-height: 16px; }
.mbox-fk { flex: none; width: 64px; color: var(--fg-3); font-size: 12px; line-height: 16px; font-weight: 500; }
.mbox-in { flex: 1; min-width: 0; height: 44px; border: 0; outline: 0; background: none; color: var(--fg); font: inherit; font-size: 14px; }
.mbox-cc { flex: none; height: 28px; padding: 0 var(--sp-2); border: 0; border-radius: 6px; background: none; color: var(--fg-3); font: inherit; font-size: 13px; line-height: 20px; cursor: pointer; }
@media (hover: hover) { .mbox-cc:hover { background: var(--hover); color: var(--fg); } }
textarea.mbox-ta { display: block; flex: 1; min-height: 160px; margin: var(--sp-3) 0 var(--sp-2); padding: 0; border: 0; outline: 0; resize: none; background: none; color: var(--fg); font: inherit; font-size: 14px; line-height: 22px; }
.mbox-fw:empty { display: none; }
/* the files are the open mail's chips (name, size, one action): 36px on the grey step */
.mbox-files { display: flex; flex-wrap: wrap; gap: var(--sp-2); padding: var(--sp-2) 0; }
.mbox-chip { display: inline-flex; align-items: center; gap: var(--sp-15); max-width: 100%; height: 36px; padding: 0 var(--sp-1) 0 var(--sp-3); border-radius: var(--r-ctl); background: var(--layer); color: var(--fg); font-size: 13px; line-height: 20px; }
.mbox-chip.wait { opacity: .6; padding-right: var(--sp-3); }
.mbox-chip .ic { flex: none; width: 16px; height: 16px; color: var(--fg-3); }
.mbox-cn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mbox-cs { flex: none; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.mbox-cx { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--fg-3); cursor: pointer; }
@media (hover: hover) { .mbox-cx:hover { background: var(--active); color: var(--fg); } }
.mbox-cx .ic { width: 14px; height: 14px; }
/* the send row (ui-spec .fs-ft): the one filled button on the right, the paperclip at the left, 8px between */
.mbox-sf { display: flex; align-items: center; justify-content: flex-end; gap: var(--sp-2); flex: none; padding: var(--sp-3) var(--sp-4) var(--sp-4); }
.mbox-sf .mbox-attach { order: -1; margin-right: auto; }
.mbox-sf .mbox-save { order: 1; }
@media (max-width: 639px) {
  /* the keyboard: like the composer (12-composer-phone.css), the sheet ends where the keyboard begins (--kb) and is as tall as what is still
     visible (--vvh), so the body's end and the send row stay above it; both come from web/js/34-composer-viewport.js */
  .mbox-sheet { inset: auto 0 var(--kb, 0px) 0; width: auto; height: var(--vvh, 100dvh); max-height: none; border: 0; border-radius: 0; }
  /* the body is the room left between the subject and the send row and shrinks with it, so its whole focus ring shows above the row */
  .mbox-sheet textarea.mbox-ta { min-height: 0; }
  .mbox-sheet.min { inset: auto 0 var(--mbox-lift, 0px) 0; height: fit-content; max-height: 56px; border-radius: 20px 20px 0 0; }
  .mbox-sb { flex: 1; padding: var(--sp-1) var(--sp-5) var(--sp-4); }
  .mbox-sf { padding-bottom: calc(var(--sp-4) + env(safe-area-inset-bottom)); }
}

/* the reply is a card of the thread (ui-spec 카드: 18px corners, 20px inside); the way to answer is a chip row, the chosen one filled with the ink (ui-spec 탭·칩) */
.mbox-reply { margin: var(--sp-3) 0 var(--sp-5); padding: var(--sp-4) var(--sp-5); border-radius: var(--r-card); background: var(--card); }
.mbox-modes { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.mbox-reply:not(.open) { display: none; }
.mbox-modes .mbox-mode { position: relative; height: 28px; gap: var(--sp-15); padding: 0 var(--sp-3); border-radius: 16px; font-size: 13px; line-height: 20px; font-weight: 500; background: var(--layer); color: var(--fg-2); }
.mbox-modes .mbox-mode.on { background: var(--fg); color: var(--bg); }
.mbox-modes .mbox-mode .ic { width: 16px; height: 16px; }
.mbox-modes .mbox-mode::after { content: ""; position: absolute; inset: -8px 0; }
.mbox-reply.open .mbox-rb { padding: var(--sp-1) 0 0; overflow: visible; }
.mbox-reply .mbox-sf { padding: var(--sp-3) 0 0; }
.mbox-quote { margin: var(--sp-2) 0 var(--sp-1); color: var(--fg-3); font-size: 13px; }
.mbox-quote summary { display: flex; align-items: center; width: fit-content; height: 28px; padding: 0 var(--sp-2); border-radius: var(--r-ctl); color: var(--fg-2); font-weight: 500; line-height: 20px; cursor: pointer; }
.mbox-qt { max-height: 220px; margin: var(--sp-15) 0 0; padding-left: var(--sp-3); overflow: auto; border-left: 2px solid var(--line-2); font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }

/* A phone keeps the sender's name whole: the unread tag is the bold row itself (the row's aria-label still says 안 읽음), the paperclip count
   is in the open mail, and the one tag that stays is small. */
@media (max-width: 639px) {
  .mr .mr-clip { display: none; }
  .mr .rc-hd .tag { font-size: 10.5px; }
}

/* Phone: one scrolling row of slim folder chips, an icon-only selection bar on one line, 44px targets in the sheet and the reply. The sheet and the reply keep their buttons clear of the home indicator. */
@media (max-width: 639px) {
  .mr-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--sp-3) * -1); padding: var(--sp-05) var(--sp-5) var(--sp-15) var(--sp-3); overscroll-behavior-x: contain; }
  .mr-filter::-webkit-scrollbar { display: none; }
  .mr-star { width: 28px; height: 28px; }
  .mr-chk, .mbox-all { width: 18px; height: 18px; }
  #back, #as-bar, #as-more-bar { width: 32px; height: 32px; }
  .mbox-bar { gap: var(--sp-05); height: 44px; padding: 0 var(--sp-1) 0 var(--sp-15); }
  .mbox-bar.on .mbox-b { position: relative; width: 36px; height: 44px; padding: 0; justify-content: center; border-radius: 18px; background: none; }
  .mbox-bar.on .mbox-b::after { content: ""; position: absolute; inset: 0 calc(var(--sp-1) * -1); }   /* six or seven icons share a 360px line: each draws 36px wide and is pressed over 44 */
  .mbox-bar.on .mbox-b .ic { width: 20px; height: 20px; }
  .mbox-bar.on .mbox-bt { display: none; }
  .mbox-bar.on:has([data-k="mail-move"]) .mbox-n { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }   /* with 옮기기 too the seven icons need the count's place; the half-ticked box still says a choice is on, and a screen reader still hears the count */
  .mbox-reply { margin: var(--sp-3) 0 var(--sp-4); padding: var(--sp-4); }
  .mbox-in { height: 44px; font-size: 16px; }
  textarea.mbox-ta { font-size: 16px; line-height: 24px; }
  .mbox-sh { padding-top: calc(var(--sp-4) + env(safe-area-inset-top)); }
}

/* The list is Gmail's (owner 2026-11-03): flat rows on one sheet with thin dividers, no gap between them. As in Gmail, a mail you have read
   sits on a faint fill and an unread one on the full card and in bold. A row is three lines on a phone
   (☐ ☆ sender, tags, time, the 초안 작성 pencil and ⋯ / the subject, its reply-draft tag / a one-line summary) and one line from 1100px.
   The 받는 사람 line and 할 일 stay in the open mail. The list ends clear of the floating 메일 쓰기. */
#mon-tl:has(> .bm.rc.mr) { --mon-dock: 104px; gap: 0; padding-bottom: var(--mon-dock); }
#mon-tl:has(> .bm.rc.mr) > :not(.mr, .mr-filter, .mbox-bar) { margin: var(--sp-2) 0; }
#mon-tl > .mr-filter { padding-bottom: var(--sp-3); }
#mon-tl > .bm.rc.mr { position: relative; flex-flow: row wrap; align-items: center; column-gap: var(--sp-15); row-gap: var(--sp-05); padding: var(--sp-2) var(--sp-4); border-radius: 0; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--card) 55%, var(--bg)); }
#mon-tl > :not(.mr) + .bm.rc.mr { border-top-left-radius: 12px; border-top-right-radius: 12px; }
#mon-tl > .bm.rc.mr:not(:has(+ .bm.rc.mr)) { border-bottom: 0; border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; }
#mon-tl > .bm.rc.mr.mr-new { background: var(--card); } @media (hover: hover) { #mon-tl > .bm.rc.mr:hover { background: var(--card); } }
#mon-tl > .bm.rc.mr.mr-sel { background: color-mix(in srgb, var(--accent) 10%, var(--card)); }
/* the reply state of a mail you need not act on is a plain grey word; only what waits for you (답장 필요, 미답장) keeps its colour */
#mon-tl > .mr .rc-hd .tag:not(.warn, .unreplied) { padding: 0; background: none; color: var(--fg-3); font-weight: 400; }
#mon-tl > .mr > .rc-hd { flex: 1 0 100%; height: 22px; gap: var(--sp-15); }
#mon-tl > .mr .rc-hd .ib { width: 28px; height: 28px; margin: -3px calc(var(--sp-1) * -1); /* nudge: 28px button inside a 22px text line */ color: var(--fg-3); }
#mon-tl > .mr .rc-hd .ib .ic { width: 16px; height: 16px; }
@media (hover: hover) { #mon-tl > .mr .rc-hd .ib:hover { background: var(--active); color: var(--fg); } }
#mon-tl > .mr > .rc-title { flex: 1 1 0; min-width: 0; font-size: 15px; line-height: 22px; }
#mon-tl > .mr > .mr-reply { flex: none; }
#mon-tl > .mr > .mr-sum { flex: 1 0 100%; display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; line-height: 16px; }
#mon-tl > .mr > .mr-pts li { display: inline; padding: 0; }
#mon-tl > .mr > .mr-pts li::before { content: none; }
#mon-tl > .mr > .mr-pts li + li::before { content: " · "; position: static; width: auto; height: auto; background: none; color: var(--fg-3); }
#mon-tl > .mr > :is(.mr-to, .mr-todo) { display: none; }
@media (min-width: 1100px) {
  /* the list uses the whole content area right of the app list (owner 2026-11-03, like Messenger or Instagram): the folder chips, the 메일 N개 row and the rows
     start at one left line (the row's 16px, the select-all box on the row checkbox's x) and the extra width goes to the subject and the preview */
  .mbox-bar { padding-left: var(--sp-3); }
  #mon-tl > .bm.rc.mr { flex-wrap: nowrap; column-gap: var(--sp-2); height: 48px; padding: 0 var(--sp-3) 0 var(--sp-4); }
  #mon-tl > .mr > .rc-hd { display: contents; }
  #mon-tl > .mr .rc-hd > * { order: 2; }
  #mon-tl > .mr .rc-hd > .mr-lead { order: 0; }
  #mon-tl > .mr .rc-hd > .rc-src { order: 1; flex: 0 0 168px; }
  #mon-tl > .mr > .rc-title { order: 3; flex: 0 1 auto; max-width: 50%; }
  #mon-tl > .mr > .mr-reply { order: 4; }
  #mon-tl > .mr > .mr-sum { order: 5; flex: 1 1 0; min-width: 0; color: var(--fg-3); }
  #mon-tl > .mr > .mr-sum::before { content: "- "; }
  #mon-tl > .mr .rc-hd > .mr-clip { order: 6; }
  #mon-tl > .mr .rc-hd > .rc-time { order: 7; margin-left: 0; }
  #mon-tl > .mr .rc-hd > .mr-draft { order: 8; }
  #mon-tl > .mr .rc-hd > .mr-more { order: 9; }
}

/* ---------- a mail's people and its thread (web/js/30-mail-thread.js): 보낸 사람 / 받는 사람 / 참조, and the same-sender panel ---------- */
.mhd { display: flex; flex-direction: column; gap: var(--sp-05); margin-top: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-ctl); background: var(--layer); color: var(--fg-2); font-size: 13px; line-height: 20px; }
.mhd-r { display: flex; gap: var(--sp-2); min-width: 0; }
.mhd-k { flex: none; width: 56px; color: var(--fg-3); }
.mhd-v { min-width: 0; overflow-wrap: anywhere; }
.mhd-n { color: var(--fg); font-weight: 600; }
.mhd-a { color: var(--fg-3); }
.mhd-more { min-height: 24px; padding: 0 var(--sp-15); border: 0; border-radius: 6px; background: var(--card); color: var(--accent); font: 500 12px/20px var(--font); cursor: pointer; }
@media (hover: hover) { .mhd-more:hover { background: var(--hover); } }
.mhd-wrap .mhd { margin-top: var(--sp-1); }
/* the open mail's one muted line of recipients; its chevron opens the full header (.mhd) */
.mhd-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-15); min-width: 0; margin-top: var(--sp-05); }
.mhd-tog { display: flex; align-items: center; gap: var(--sp-05); flex: 1 1 0; min-width: 0; min-height: 28px; padding: 0; border: 0; background: none; color: var(--fg-3); font: 400 12.5px/18px var(--font); text-align: left; cursor: pointer; }
.mhd-tl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mhd-ch { flex: none; width: 16px; height: 16px; transition: transform var(--m-fast) var(--m-ease); }
.mhd-tog.open .mhd-ch { transform: rotate(180deg); }
@media (hover: hover) { .mhd-tog:hover { color: var(--fg-2); } }
.mr-to { overflow: hidden; color: var(--fg-3); font-size: 12px; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
.od-pane .mhd-wrap .mhd { margin-top: 0; }

.mth { display: none; }
.mth-m { display: none; margin-top: var(--sp-2); }
.mth-mb { display: flex; align-items: center; gap: var(--sp-2); width: 100%; min-height: 44px; padding: 0 var(--sp-3); border: 0; border-radius: var(--r-ctl); background: var(--layer); color: var(--fg-2); font: 500 14px/20px var(--font); text-align: left; }
.mth-mb .ic { flex: none; width: 16px; height: 16px; }
.mth-mt { flex: 1; min-width: 0; color: var(--fg); text-align: left; }
.mth-ch { transition: transform var(--m-fast) var(--m-ease); }
.mth-mb.open .mth-ch { transform: rotate(180deg); }
.mth-list { display: flex; flex-direction: column; gap: var(--sp-05); margin: 0; padding: 0; list-style: none; }
.mth-m > .mth-list { margin-top: var(--sp-1); padding: var(--sp-1); border-radius: var(--r-ctl); background: var(--layer); }
.mth-row { display: flex; flex-direction: column; gap: var(--sp-05); width: 100%; padding: var(--sp-2) var(--sp-3); border: 0; border-radius: 10px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
@media (hover: hover) { .mth-row:hover { background: var(--card-hover); } }
.mth-row.on { background: var(--row-sel); cursor: default; }   /* the selected fill of every list (.cv-row.on) */
.mth-top { display: flex; align-items: center; gap: var(--sp-15); min-width: 0; }
.mth-when { flex: 1; min-width: 0; color: var(--fg-3); font-size: 12px; line-height: 16px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mth-subj { font-size: 14px; line-height: 20px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mth-sum { color: var(--fg-3); font-size: 12px; line-height: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mth-h { display: flex; align-items: center; gap: var(--sp-15); padding: var(--sp-1) var(--sp-15) var(--sp-2); }
.mth-ht { flex: 1; min-width: 0; color: var(--fg); font-size: 14px; line-height: 20px; font-weight: 600; }
.mth-n { flex: none; min-width: 22px; padding: 0 var(--sp-15); border-radius: 10px; background: var(--layer); color: var(--fg-3); font-size: 12px; line-height: 20px; text-align: center; }

/* in the recipients line: the chip at its end (a two-value toggle on its own surface); on a phone the list it opens sits on a row of its own under it,
   on a wide screen it opens the panel beside the mail instead */
.mhd-line > .mth-m { display: contents; margin: 0; }
.mhd-line .mth-mb { flex: none; width: auto; min-height: 28px; gap: var(--sp-1); padding: 0 var(--sp-2); border-radius: 14px; font: 500 12px/16px var(--font); }
.mhd-line .mth-mb .ic { width: 14px; height: 14px; }
.mhd-line .mth-mt { flex: none; color: var(--fg-2); }
.mth-x { margin-left: var(--sp-05); width: 28px; height: 28px; color: var(--fg-3); }
.mth-x .ic { width: 16px; height: 16px; }
@media (max-width: 1023px) {
  .mth-m { display: block; }
  .mhd-line > .mth-m { display: contents; }
  .mhd-line .mth-list { flex: 1 0 100%; min-width: 0; order: 2; margin-top: var(--sp-05); padding: var(--sp-1); border-radius: var(--r-ctl); background: var(--layer); }
}

@media (min-width: 1024px) {
  .mhd-line .mth-list { display: none; }
  .mhd-line .mth-mb.open .mth-ch { transform: rotate(-90deg); }
  #v-chat.mail-thr .chatbox { display: flex; gap: var(--sp-4); align-items: stretch; }
  #v-chat.mail-thr .chatbox > .timeline { flex: 1 1 auto; min-width: 0; }
  #v-chat.mail-thr #mail-thread { display: flex; flex-direction: column; flex: 0 0 280px; min-height: 0; margin: 0 0 var(--sp-4); padding: var(--sp-2) var(--sp-15) var(--sp-2) var(--sp-2); border-radius: var(--r-card); background: var(--card); overflow: hidden; }
  #mail-thread[hidden] { display: none; }
  #mail-thread > .mth-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
}

/* The two screens that replace the mail list in the same view (web/js/30-mailboxes-set.js): 메일함 설정 and 메일함 추가, ported from site/prototype/mailbox.css onto the web tokens. */
.mxs { display: flex; flex-direction: column; width: 100%; max-width: calc(var(--view-w) - var(--sp-8)); margin: 0 auto; padding-bottom: var(--sp-8); --ff-fill: var(--layer); }
.mxs > .sec:first-child, .mxs > .mxs-note + .sec { margin-top: var(--sp-6); }
#v-monitoring.mx-scr > .cv-head { display: none; }
.mxs-hd { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-card); background: var(--card); }
.mxs-hd .av { flex: none; display: grid; place-items: center; width: calc(var(--sp-8) + var(--sp-1)); height: calc(var(--sp-8) + var(--sp-1)); border-radius: 50%; background: var(--layer); color: var(--fg-2); }
.mxs-hd .btn { flex: none; }
.mxs-hd .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mxs-hd .hd { display: flex; align-items: center; gap: var(--sp-2); font: 600 var(--fs-row)/var(--lh-row) var(--font); }
.mxs-hd .sup { color: var(--fg-3); font-size: var(--fs-meta); line-height: var(--lh-meta); }
.mxs-note, .mxs-h { color: var(--fg-3); font-size: var(--fs-meta); line-height: var(--lh-meta); }
.mxs-note { margin-top: var(--sp-2); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-ctl); background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--fg-2); font-size: var(--fs-sec); line-height: var(--lh-sec); }
.mxs-h { margin: var(--sp-2) var(--sp-1) 0; }
.mxs-ab .mxs-h, .mxs-pad .mxs-h { margin: 0; }
.mxs-inh { align-self: flex-start; margin-top: var(--sp-2); }
.mxs-h.mxs-inh { margin-left: var(--sp-1); }

/* 처리 방식 */
.mxs-modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-2); }
.mxs-mode { display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; padding: var(--sp-3); border: 0; border-radius: var(--r-card); background: var(--card); color: var(--fg); text-align: left; }
@media (hover: hover) { .mxs-mode:hover { background: var(--card-hover); } }
.mxs-mode.on { background: color-mix(in srgb, var(--accent) 10%, var(--card)); } @media (hover: hover) { .mxs-mode.on:hover { background: color-mix(in srgb, var(--accent) 10%, var(--card)); } }
.mxs-mt { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); font: 600 var(--fs-sec)/var(--lh-sec) var(--font); white-space: nowrap; }
.mxs-mt .ic { flex: none; color: var(--accent); }
/* suggested groups (메일함 추가): the sub line is one line with an ellipsis, the mail count has its own place at the right */
.mxs-sg .sup { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mxs-cnt { flex: none; color: var(--fg-3); font-size: var(--fs-meta); line-height: var(--lh-meta); }
.mxs-md { color: var(--fg-2); font-size: var(--fs-meta); line-height: var(--lh-meta); }

/* one folding item at a time */
.mxs .list > button.li + button.li { border-top: 1px solid var(--line); }
.mxs-ah { display: flex; align-items: center; gap: var(--sp-3); width: 100%; min-height: calc(var(--row-h) + var(--sp-1)); padding: var(--sp-2) var(--sp-4); border: 0; background: none; color: var(--fg); text-align: left; }
@media (hover: hover) { .mxs-ah:hover { background: var(--card-hover); } }
.mxs-al { flex: none; font: 500 var(--fs-row)/var(--lh-row) var(--font); }
.mxs-av { flex: 1; min-width: 0; overflow: hidden; color: var(--fg-3); font-size: var(--fs-body); line-height: var(--lh-sec); text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.mxs-ah .ic { flex: none; color: var(--fg-3); transition: transform var(--m-fast) var(--m-ease); }
.mxs-ac.open .mxs-ah .ic { transform: rotate(180deg); }
.mxs-ab { display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-1) var(--sp-4) var(--sp-4); }
.mxs-pad { display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-4); }
.mxs-kv { display: grid; grid-template-columns: calc(var(--sp-8) * 3 + var(--sp-4)) minmax(0, 1fr); gap: var(--sp-3); align-items: start; }
.mxs-k { color: var(--fg-2); font: 500 var(--fs-meta)/var(--field-h) var(--font); }
.mxs-ac .mxs-k:not(.mxs-kv > .mxs-k) { line-height: var(--lh-sec); }
.mxs-am2 { display: inline-flex; align-items: center; gap: var(--sp-15); color: var(--fg-2); font-size: var(--fs-meta); }

/* chips with an x, and the input that adds one */
.mxs-chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); min-width: 0; }
.mxs-c { max-width: 100%; padding: 0 var(--sp-1) 0 var(--sp-3); background: var(--card); }
.mxs-c .tx { min-width: 0; }
.mxs-cx { display: grid; place-items: center; width: var(--sp-6); height: var(--sp-6); padding: 0; border: 0; border-radius: var(--r-pill); background: none; color: var(--fg-3); }
@media (hover: hover) { .mxs-cx:hover { background: var(--active); color: var(--fg); } }
.mxs-cx .ic { width: 14px; height: 14px; }
.mxs-c2 { background: transparent; color: var(--fg-2); box-shadow: inset 0 0 0 1px var(--line-2); }
@media (hover: hover) { .mxs-c2:hover { background: var(--hover); } }
.mxs-c2 .ic { width: 14px; height: 14px; }
.mxs-ci { width: calc(var(--sp-10) * 4 + var(--sp-5)); max-width: 100%; height: var(--ctl-h); }
.mxs-ic { padding: 0 var(--sp-3); }
.mxs-ic.on { background: color-mix(in srgb, var(--accent) 10%, var(--card)); color: var(--accent); } @media (hover: hover) { .mxs-ic.on:hover { background: color-mix(in srgb, var(--accent) 10%, var(--card)); } }
.mxs-ab > .mxs-c2 { align-self: flex-start; }   /* the add button is the small chip here too, not the width of the column */
.mxs-ig { display: flex; flex-direction: column; gap: var(--sp-2); }
.mxs-ic .ic { width: 16px; height: 16px; }
.mxs-jr { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: var(--ctl-h); }

/* 말투, 답장 지시, 인사말 */
.mxs-sum { padding: var(--sp-2) var(--sp-3); border-radius: var(--r-ctl); background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--fg-2); font-size: var(--fs-body); line-height: var(--lh-body); }
.mxs-rowb { display: flex; align-items: center; gap: var(--sp-3); }
.mxs-rowb .mxs-h { flex: 1; min-width: 0; }
.mxs-vb { flex: none; display: flex; gap: var(--sp-2); }
.mxs-ex { display: flex; flex-direction: column; gap: var(--sp-5); min-height: 0; overflow-y: auto; padding: var(--sp-2) var(--sp-6) var(--sp-5); }
.mxs-exi { display: flex; flex-direction: column; gap: var(--sp-2); }
.mxs-exi .mxs-k { line-height: var(--lh-sec); }
.mxs-exi .mxs-h { margin: 0; }
.mxs-exi .mxs-sum { white-space: pre-wrap; }
@media (max-width: 639px) { .mxs-rowb { flex-direction: column; align-items: flex-start; } .mxs-ex { padding-left: var(--sp-4); padding-right: var(--sp-4); } }
.mxs-fx { margin: 0; padding-left: var(--sp-5); color: var(--fg-2); font-size: var(--fs-body); line-height: var(--lh-body); }
.mxs-ta { height: auto; min-height: calc(var(--field-h) * 2); padding: var(--sp-2) var(--sp-3); font-family: inherit; line-height: var(--lh-body); resize: vertical; }
.mxs-gl { display: flex; flex-direction: column; }
.mxs-g { display: grid; grid-template-columns: calc(var(--sp-10) * 4 + var(--sp-2)) minmax(0, 1fr) var(--sp-8); gap: var(--sp-2); align-items: center; padding: var(--sp-2) 0; }
.mxs-g + .mxs-g { box-shadow: inset 0 1px 0 var(--line); }
.mxs-g .tx { display: flex; flex-direction: column; min-width: 0; }
.mxs-in { width: 100%; padding: 0; border: 0; outline: 0; background: none; color: var(--fg); font: 500 var(--fs-body)/var(--lh-sec) var(--font); }
.mxs-in.s { color: var(--fg-3); font: 400 var(--fs-meta)/var(--lh-meta) var(--font); }
.mxs-in::placeholder { color: var(--fg-3); }

.mxs-del { display: flex; justify-content: flex-end; margin-top: var(--sp-4); }
.mxs-foot { display: flex; justify-content: flex-end; gap: var(--sp-2); margin-top: var(--sp-5); }

@media (max-width: 639px) {
  .mxs-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mxs-kv { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .mxs-g { grid-template-columns: minmax(0, 1fr) var(--sp-8); }
  .mxs-g .fi { grid-column: 1 / -1; }
}

/* The mail app's mailboxes (web/js/30-mailboxes.js), ported from site/prototype/mailbox.css onto the web tokens: the pane beside the list (wide) or the tab row (narrow),
   the box title and note, the account mark and the box name on a row, the account chip of the app bar, the move button and the small box after a move. */
.mx-pane { display: none; }
/* the mailbox tabs switch the whole list, so they are screen tabs (web/DESIGN.md 화면 탭): words over a hairline, the chosen one --fg with a 2px
   underline; each tab is the full 44px tall with side padding, so the whole cell is the tap target */
.mx-tabs { display: flex; flex: none; gap: 0; overflow-x: auto; scrollbar-width: none; box-shadow: inset 0 -1px 0 var(--line); }
.mx-tabs::-webkit-scrollbar { display: none; }
/* a strip wider than its pane fades at the right end: the fade says there are more tabs to scroll to */
.mx-tabs { padding-right: var(--sp-5); -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - var(--sp-5)), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - var(--sp-5)), transparent); }
.mx-tab { flex: none; display: inline-flex; align-items: center; gap: var(--sp-15); height: var(--btn-hit); padding: 0 var(--sp-3); border: 0; border-radius: 0; background: none; color: var(--fg-2); font: 500 var(--fs-sec)/var(--lh-sec) var(--font); white-space: nowrap; }
.mx-tab > span:last-child { color: var(--fg-3); font-size: var(--fs-meta); font-variant-numeric: tabular-nums; }
@media (hover: hover) { .mx-tab:hover { color: var(--fg); } }
.mx-tab.on { color: var(--fg); font-weight: 600; box-shadow: inset 0 -2px 0 var(--fg); }
.mx-tab .ic { width: 16px; height: 16px; }

/* the pane: all, then the boxes in one card, then 메일함 추가 */
.mx-pr { display: flex; align-items: center; gap: var(--sp-3); width: 100%; min-height: calc(var(--row-h) + var(--sp-3)); padding: var(--row-py) var(--row-px); border: 0; background: none; color: var(--fg); text-align: left; }
.mx-pr + .mx-pr { box-shadow: inset 0 1px 0 var(--line); }
@media (hover: hover) { .mx-pr:hover { background: var(--card-hover); } }
.mx-pr.on { background: var(--row-sel); } @media (hover: hover) { .mx-pr.on:hover { background: var(--row-sel); } }
.mx-pr .av { flex: none; display: grid; place-items: center; width: var(--sp-8); height: var(--sp-8); border-radius: var(--r-ctl); background: var(--layer); color: var(--fg-2); }
.mx-pr.on .av { background: var(--card); }
.mx-pr .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mx-pr .hd { display: flex; align-items: center; gap: var(--sp-15); font: 500 var(--fs-sec)/var(--lh-sec) var(--font); white-space: nowrap; }
.mx-pr .sup { overflow: hidden; color: var(--fg-3); font-size: var(--fs-meta); line-height: var(--lh-meta); text-overflow: ellipsis; white-space: nowrap; }
.mx-pn { flex: none; display: inline-flex; align-items: center; gap: var(--sp-15); color: var(--fg-3); font-size: var(--fs-meta); line-height: var(--lh-meta); font-variant-numeric: tabular-nums; }
.mx-base { height: var(--tag-h); padding: 0 var(--tag-px); font-size: var(--fs-tag); }
.mx-add { justify-content: flex-start; padding: 0 var(--sp-3); }

/* an account's mark: one letter in a small circle, in one of four looks */
.mx-am { flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: var(--fs-tag); line-height: 1; font-weight: 700; font-style: normal; }
.mx-am.t-0 { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.mx-am.t-1 { background: var(--hover); color: var(--fg); }
.mx-am.t-2 { background: var(--layer); color: var(--accent); }
.mx-am.t-3 { background: var(--layer); color: var(--fg-2); }
.mx-al { display: inline-flex; align-items: center; gap: var(--sp-15); }
.mx-bt { flex: 0 1 auto; min-width: 0; overflow: hidden; color: var(--fg-3); font-size: var(--fs-meta); line-height: var(--lh-meta); text-overflow: ellipsis; white-space: nowrap; }

/* above the filter tabs: the box title, an account that needs its login, the base box's note */
.mx-bh { display: flex; align-items: center; gap: var(--sp-2); min-height: var(--sp-8); margin-bottom: calc(var(--sp-2) * -1); }
.mx-bh h2 { font: 700 var(--fs-big)/var(--lh-big) var(--font); white-space: nowrap; }
.mx-bh .meta { min-width: 0; color: var(--fg-3); font-size: var(--fs-meta); line-height: var(--lh-meta); }
.mx-setb { margin-left: auto; }
.mx-note, .mx-exp { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-ctl); color: var(--fg-2); font-size: var(--fs-sec); line-height: var(--lh-sec); }
.mx-note { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.mx-exp.down { background: color-mix(in srgb, var(--warn) 10%, transparent); }
.mx-exp .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mx-exp b { color: var(--fg); font-weight: 500; }
.mx-exp .btn { flex: none; height: var(--btn-h-sm); background: var(--card); }

/* the account chip of the app bar: only while the mail screen is open */
.mx-acc { display: none; flex: none; align-items: center; gap: var(--sp-1); height: 28px; margin-right: var(--sp-1); padding: 0 var(--sp-2); border: 0; border-radius: var(--r-ctl); background: var(--card); color: var(--fg-2); font-size: var(--fs-meta); font-weight: 500; white-space: nowrap; }
@media (pointer: coarse), (max-width: 639px) { .mx-acc { position: relative; } .mx-acc::after { content: ""; position: absolute; inset: calc(var(--sp-2) * -1) 0; } }
@media (hover: hover) { .mx-acc:hover { background: var(--card-hover); } }
.mx-acc .ic { width: 14px; height: 14px; }
/* on a phone the bar also holds back, title, the app buttons, search, bell and usage: the chip gives way (its name ends in …) before the title is squeezed */
@media (max-width: 639px) {
  .mx-acc { flex: 0 1 auto; min-width: 0; }
  .mx-acc > :not(.mx-ac-t) { flex: none; }
  .mx-ac-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .main:has(#v-monitoring.mx-on:not(.mx-scr):not([hidden])) #title { min-width: calc(var(--btn-hit) * 2); }
}
.main:has(#v-monitoring.mx-on:not(.mx-scr):not([hidden])) .mx-acc { display: inline-flex; }

.mr-mv { flex: none; }

/* the small box after a move */
.mx-teach { display: none; position: fixed; z-index: 120; left: calc(50% - 84px); bottom: var(--sp-6); width: 400px; max-width: calc(100vw - var(--sp-6)); padding: var(--sp-3) var(--sp-4) var(--sp-2); border-radius: var(--r-card); background: var(--pop); box-shadow: var(--float); }
body:has(#v-monitoring.mx-on:not([hidden])) .mx-teach { display: block; }
.mx-tt { display: flex; align-items: center; gap: var(--sp-2); }
.mx-tt b { font: 600 var(--fs-body)/var(--lh-sec) var(--font); }
.mx-tt .ib { width: 28px; height: 28px; margin-left: auto; }
.mx-tq { margin-top: var(--sp-05); color: var(--fg-2); font-size: var(--fs-sec); line-height: var(--lh-sec); }
.mx-to { display: flex; flex-direction: column; margin-top: var(--sp-1); }
.mx-to button { display: flex; align-items: center; gap: var(--sp-2); min-height: var(--sp-10); padding: var(--sp-1) var(--sp-2); border: 0; border-radius: var(--r-ctl); background: none; color: var(--fg); font-size: var(--fs-body); line-height: var(--lh-sec); text-align: left; }
@media (hover: hover) { .mx-to button:hover { background: var(--hover); } }
.mx-rd { flex: none; width: 16px; height: 16px; border: 1.5px solid var(--line-2); border-radius: 50%; }
.mx-tf { display: flex; justify-content: flex-end; gap: var(--sp-1); margin-top: var(--sp-1); }
.mx-tf .btn { height: var(--btn-h-sm); }

@media (min-width: 1100px) {
  /* the pane stands beside the scrolling list at the left edge: the app frame (.app-two, 20-monitoring.css) that the open mail keeps */
  #mon-tl > .mx-tabs:not(.mr-place) { display: none; }
  #v-monitoring.mx-on #mon-tl { padding-top: 0; }
  /* 메일함 설정 and 메일함 추가 take the whole view */
  #v-monitoring.mx-on.mx-scr:not(.cv-listing):not(:has(> .kk.chat-open:not([hidden]))) { max-width: var(--view-w); grid-template-columns: minmax(0, 1fr); }
  #v-monitoring.mx-on.mx-scr:not(.cv-listing) > * { grid-column: 1; }
  #v-monitoring.mx-on.mx-scr:not(.cv-listing) > #mx-pane { display: none; }
  #mon-tl > .mr .rc-hd > .mr-mv { order: 9; }
  /* the sender gives its column to the account mark and the box name */
  #mon-tl > .mr .rc-hd > .rc-src:has(+ .mx-am, + .mx-bt) { flex-basis: 104px; }
  #mon-tl > .mr .rc-hd > .mx-bt { flex: none; max-width: 96px; }
}
/* beside the 340px app panel the list is 456px at 1100 and under 640px until 1280: the subject keeps its words. The box name (the pane already marks the box) and the preview go,
   the sender is narrower, and where a pointer hovers the row's icons wait for it and take the time's place; touch keeps them. */
@media (min-width: 1100px) and (max-width: 1279px) {
  #mon-tl > .mr .rc-hd > .rc-src, #mon-tl > .mr .rc-hd > .rc-src:has(+ .mx-am, + .mx-bt) { flex-basis: 72px; }
  #mon-tl > .mr .rc-hd > .mx-bt, #mon-tl > .mr > .mr-sum { display: none; }
  #mon-tl > .mr > .rc-title { max-width: none; }
}
@media (min-width: 1100px) and (max-width: 1279px) and (hover: hover) {
  #mon-tl > .mr .rc-hd > .ib { position: absolute; opacity: 0; pointer-events: none; }
  #mon-tl > .mr:is(:hover, :focus-within) .rc-hd > .ib { position: static; opacity: 1; pointer-events: auto; }
  #mon-tl > .mr:is(:hover, :focus-within) .rc-hd > .rc-time { display: none; }
}
/* the list that failed to load: the sentence and its retry stand alone, nothing to filter yet */
#mon-tl > .mx-fail ~ :is(.mx-tabs, .mr-filter, .mbox-bar, .empty) { display: none; }
@media (max-width: 639px) {
  .mx-bh .meta, .mx-setb span { display: none; }
  .mx-setb { width: var(--field-h); padding: 0; }
  .mx-note { align-items: flex-start; }
  .mr .mx-am + .mx-bt { display: none; }
  .mx-teach { left: var(--sp-3); right: var(--sp-3); bottom: calc(72px + env(safe-area-inset-bottom)); width: auto; }
}

/* 모니터링 (web/js/30-monitoring.js): a monitor's wait drawn as a thin bar from its last run to its next, the result as a tag, the connection
   banner of a down app or watch, and the 감시 소식 overview of every plain monitor. One blue accent, grey track; overdue turns warn, a stopped
   one grey, a running check a moving shimmer. */
.mon-prog-wrap { display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; width: 100%; }
.mon-prog-top { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.mon-prog { display: block; flex: 1; min-width: 32px; height: 4px; border-radius: 2px; background: var(--track); overflow: hidden; }
.mon-prog i { display: block; width: 0; height: 100%; border-radius: 2px; background: var(--accent); }
.mon-prog.ok i { background: var(--ok); }
.mon-prog.warn i { background: var(--warn); }
.mon-prog.err i { background: var(--err); }
.mon-prog.off i { background: var(--line-2); }
.mon-prog.none i { background: transparent; }
.mon-prog.none.ok, .mon-prog.none.warn, .mon-prog.none.err { background: currentColor; }
.mon-prog.none.ok { color: var(--ok); } .mon-prog.none.warn { color: var(--warn); } .mon-prog.none.err { color: var(--err); }
/* Running: the extent is unknown, so the bar is a still pale accent track (no sweep: only the composer's dot moves, ui-spec 진행 표시); the 확인 중 tag next to it says it. */
.mon-prog.run i { width: 100% !important; background: color-mix(in srgb, var(--accent) 35%, transparent); }
.mon-prog-tx { display: block; color: var(--fg-3); font: 400 12px/16px var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mon-prog-wrap.compact { margin-top: var(--sp-15); }
.mon-prog-wrap.compact .mon-prog { height: 3px; }
.mon-prog-wrap.compact .mon-prog-tx { font-size: 11px; line-height: 15px; }
/* the result tag (same look as .tag, its own class so the row's other tags keep their place in a query) */
.mon-ptag { --tone: var(--fg-3); display: inline-flex; align-items: center; align-self: center; gap: var(--sp-15); flex: none; height: 20px; padding: 0; background: none; color: var(--fg-3); font-size: var(--fs-tag); line-height: var(--lh-tag); font-weight: 500; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.mon-ptag.pri { --tone: var(--accent); color: var(--fg-2); font-weight: 600; }
.mon-ptag.ok { --tone: var(--ok); color: var(--ok); font-weight: 600; }
.mon-ptag.warn { --tone: var(--warn); color: var(--warn); font-weight: 600; }
.mon-ptag.off { font-weight: 600; }
.mon-ptag.err { --tone: var(--err); color: var(--err); font-weight: 600; }

/* the open item's head: the row of icon, name and state, then the bar / banner under it (wide screens; a phone puts them in the timeline) */
.mon-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: var(--sp-2); }

/* a connection that is down: said at the top of the conversation, with 지금 다시 확인; the row says the same in its status line */
.mon-banner { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; padding: var(--sp-2) var(--sp-3); border-radius: 12px; background: color-mix(in srgb, var(--err) 10%, transparent); font-size: 13px; line-height: 18px; }
.mon-banner .ic { flex: none; color: var(--err); }
.mon-banner-tx { flex: 1; min-width: 0; color: var(--fg-2); overflow-wrap: break-word; }
.mon-banner-tx b { color: var(--err); font-weight: 600; }
.mon-banner .btn { flex: none; }
/* disconnected: only the owner can reconnect it, so orange; a failed check stays red (web/DESIGN.md status color rule) */
.mon-banner.down { background: color-mix(in srgb, var(--warn) 12%, transparent); }
.mon-banner.down .ic, .mon-banner.down .mon-banner-tx b { color: var(--warn); }
/* connected, but the last check failed: a warning, not the outage colour */

/* 감시 소식 opens with this: one compact row per plain monitor, what needs the owner first */
.mon-ov { display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-3); border-radius: var(--r-card); background: var(--card); }
.mon-ov-h { display: flex; align-items: center; gap: var(--sp-2); width: 100%; min-height: var(--btn-hit); padding: 0 var(--sp-1); border: 0; background: transparent; color: var(--fg); font: 700 14px/20px var(--font); text-align: left; cursor: pointer; }
.mon-ov-ht { flex: none; }
.mon-ov-sum { min-width: 0; color: var(--fg-3); font: 400 12px/16px var(--font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mon-ov-h .chev { flex: none; width: 14px; height: 14px; margin-left: auto; color: var(--fg-3); transform: rotate(90deg); transition: transform var(--m-fast) var(--m-ease); }
.mon-ov-h[aria-expanded="false"] .chev { transform: none; }
.mon-ov-row { display: flex; flex-direction: column; gap: var(--sp-1); width: 100%; min-width: 0; padding: var(--sp-2); border: 0; border-radius: 10px; background: transparent; color: inherit; text-align: left; }
@media (hover: hover) { .mon-ov-row:hover { background: var(--hover); } }
.mon-ov-hd { display: flex; align-items: center; gap: var(--sp-15); min-width: 0; }
.mon-ov-n { min-width: 0; font: 600 14px/20px var(--font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mon-ov-peer { color: var(--fg-3); font: 400 12px/16px var(--font); }
.mon-ov-s { color: var(--fg-3); font: 400 12px/16px var(--font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* the top of an older page: the reports above load when this reaches the view (the button under it stays as a fallback) */
.mon-sentinel { width: 100%; height: 1px; }

/* 대화로 이어가기 (30-monitoring.js monHead / monTopNodes): the item's own settings conversation, one small button in the head.
   It sits on the page (--bg), where a --layer tonal button would vanish, so it takes the card colour like a chip. */
.mon-continue { flex: none; }
.mon-continue.btn.tonal { background: var(--card); }
@media (hover: hover) { .mon-continue.btn.tonal:hover { background: var(--hover); } }


/* ---------- the monitoring list: the prototype's sections and rows (site/prototype/s-work.js #monitoring, proto.css .sec/.list/.li) ----------
   The list column is a stack of section labels and one card per section, never one long card: 감시 소식 and 답장 확인 stand alone, then
   앱 and 일반 모니터링 (and a project's own group) each get a label and a card. A row is the prototype's row: a 16px line icon, the name
   and its one-line summary, the status tag of the moment, and the chevron that says the row opens. The wait bar stays under the row (its
   own product feature), aligned with the text. */
#v-monitoring > #mon-side, #v-chat > #chat-convo.mon-side { padding: 0 0 var(--sp-4); background: transparent; border-radius: 0; }
:is(#mon-side, #chat-convo.mon-side) .mon-grp + .card.empty { margin-top: var(--sp-4); }
:is(#mon-side, #chat-convo.mon-side) .mon-sec { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; margin: var(--sp-4) var(--sp-1) var(--sp-15); color: var(--fg-2); font: 600 13px/18px var(--font); }
:is(#mon-side, #chat-convo.mon-side) .mon-sec:first-child { margin-top: 0; }
:is(#mon-side, #chat-convo.mon-side) .mon-grp { min-width: 0; border-radius: var(--r-card); background: var(--card); overflow: hidden; }
:is(#mon-side, #chat-convo.mon-side) .mon-grp > .cv-row { align-items: center; min-height: 48px; padding: var(--sp-2) var(--sp-4); gap: var(--sp-3); border-radius: 0; }
/* the rule between rows is an inset line, not a border: a row is as tall first in its card as anywhere below it */
:is(#mon-side, #chat-convo.mon-side) .mon-grp > .cv-row + .cv-row { margin-top: 0; border-top: 0; box-shadow: inset 0 1px 0 var(--line); }
@media (hover: hover) { :is(#mon-side, #chat-convo.mon-side) .cv-row:hover { background: var(--card-hover); } }
:is(#mon-side, #chat-convo.mon-side) .cv-row.on { background: var(--row-sel); } @media (hover: hover) { #mon-side .cv-row.on:hover { background: var(--row-sel); } }
:is(#mon-side, #chat-convo.mon-side) .cv-av { width: 36px; height: 36px; border-radius: 50%; background: var(--layer); color: var(--fg-2); font-size: 15px; }
:is(#mon-side, #chat-convo.mon-side) .cv-av .ic { width: 20px; height: 20px; }
:is(#mon-side, #chat-convo.mon-side) .cv-row .cv-n { font: 500 15px/22px var(--font); }
:is(#mon-side, #chat-convo.mon-side) .cv-row .cv-p { color: var(--fg-2); font: 400 12px/16px var(--font); }
/* another computer's row starts its line with where it runs (pqWhere, "맥미니에서 돌아요 · …"): in the 340 panel that line takes a second line instead of losing its news */
:is(#mon-side, #chat-convo.mon-side) .cv-row[data-k^="p:"] .cv-p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; }
:is(#mon-side, #chat-convo.mon-side) .cv-row .cv-m { gap: var(--sp-15); }
/* the row's way in: a small chevron at the right edge, after its tags (the prototype's .li .end chev) */
:is(#mon-side, #chat-convo.mon-side) .cv-row::after { align-self: center; content: ""; flex: none; width: 6px; height: 6px; margin-left: var(--sp-05); border-right: 1.5px solid var(--fg-3); border-bottom: 1.5px solid var(--fg-3); transform: rotate(-45deg); }
/* one panel width in every 모니터링 state (list, app, mail, watch): the open mail conversation draws the same column (owner 2026-11-04) */
/* a conversation opened from 모니터링 keeps 채팅's own two columns: the 모니터링 list (#chat-convo.mon-side) or the app's panel (.app-two) at the left, the conversation at
   채팅's content box, the column the item's own screen used (the app frame, owner 2026-11-11; it replaces the lone centred conversation of 2026-11-06) */
@media (min-width: 1100px) {
  /* every 모니터링 screen stands on 채팅's two columns (10-conversations.css #v-monitoring): the item list at the left, the screen at the right, so going between the feed, a watch log and
     the queue moves nothing. The home (the list, nothing opened) shows the 답장 대기 queue in the right column (mon-home, 30-monitoring.js renderMonitoring); a queue row's card and an app's
     settings (as-pane, 32-app-settings.js) take the same column. */
  #v-monitoring.cv-listing.mon-home > .chatbox { display: block; }
  #v-monitoring.rq-on > .chatbox { grid-row: 1 / -1; }
  #v-monitoring.as-on > :is(.cv-head, .chatbox), #v-monitoring.as-on > .kk > .kk-chat { display: none; }
  #v-monitoring > .as-pane { grid-column: 2; grid-row: 1 / -1; display: none; flex-direction: column; min-height: 0; margin-bottom: var(--sp-4); }
  #v-monitoring.as-on > .as-pane { display: flex; }
  #v-monitoring > .as-pane > .as-card { --ff-fill: var(--layer); display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 0; border-radius: var(--r-card); background: var(--card); }
  #v-monitoring > .as-pane > .as-card:focus { outline: 0; }
  #v-monitoring > .as-pane .app-sw { max-width: none; }
  /* the mail app's 메일함 설정 and 메일함 추가 keep the panel at the left and open in the right column (30-mailboxes.js keeps .mx-scr, not .app-two, there) */
  #v-monitoring.mx-on.mx-scr:not(.cv-listing):not(:has(> .kk.chat-open:not([hidden]))) { max-width: none; grid-template-columns: var(--frame-list-w) minmax(0, 1fr); }
  #v-monitoring.mx-on.mx-scr:not(.cv-listing) > * { grid-column: 2; }
  #v-monitoring.mx-on.mx-scr:not(.cv-listing) > #mx-pane { grid-column: 1; grid-row: 1 / -1; display: flex; flex-direction: column; gap: var(--sp-2); min-height: 0; margin-bottom: var(--sp-4); padding: 0; overflow: hidden auto; scrollbar-width: none; }
  #v-monitoring.mx-on.mx-scr .mxs { max-width: none; margin: 0; }
  #v-chat > .mon-chat-top { grid-row: 3; }
  /* The app frame (owner 2026-11-11): an app's own panel at the left edge, its content beside it - the way 채팅 stands. The view takes .app-two, its panel is the child with
     .app-side (column 1, the whole height), and every other child is the main slot (column 2), so what opens in the main slot (a list, then one mail) changes nothing else.
     The mail app uses it on #v-monitoring (the list) and on #v-chat (the open mail, whose side column is the same panel: mxTwo in 30-mailboxes.js). */
  #v-monitoring.app-two, #v-chat.app-two { --app-side: var(--frame-list-w); }   /* the sizes of 채팅 and 프로젝트: 01-tokens.css --frame-list-w, --frame-gap */
  #v-chat.app-two { --cv-w: var(--app-side); }
  #v-monitoring.app-two:not(.cv-listing):not(:has(> .kk.chat-open:not([hidden]))) { max-width: none; margin: 0; column-gap: var(--frame-gap); grid-template-columns: var(--app-side) minmax(0, 1fr); }
  #v-monitoring.app-two:not(.cv-listing) > * { grid-column: 2; }
  :is(#v-monitoring, #v-chat).app-two > .app-side { grid-column: 1; grid-row: 1 / -1; display: flex; flex-direction: column; gap: var(--sp-2); min-height: 0; margin-bottom: var(--sp-4); padding: 0; border-radius: 0; background: none; overflow: hidden auto; scrollbar-width: none; }
  body:has(:is(#v-monitoring, #v-chat).app-two:not([hidden])) { --mbox-r: var(--edge); }   /* the page runs to the right edge beside the panel: 20-mail-box.css --mbox-r */
  /* Messenger and the comment apps (30-kakao.js, 30-monitoring-comments.js) use the same frame: .kk is only their wrapper, so its rooms (or posts, or Instagram's DMs) are the
     panel and its chat is the main slot. Nothing open: the head card (#mon-head) over one quiet line to pick one; a room open: the chat takes the whole slot, with its own head. */
  #v-monitoring.app-two.kk-on:not(.cv-listing):has(> .kk:not([hidden])) { max-width: none; margin: 0; column-gap: var(--frame-gap); grid-template-columns: var(--app-side) minmax(0, 1fr); }
  #v-monitoring.app-two.kk-on > .kk:not([hidden]) { display: contents; }
  #v-monitoring.app-two.kk-on > .kk > .kk-rooms { grid-column: 1; grid-row: 1 / -1; min-height: 0; margin-bottom: var(--sp-4); }
  #v-monitoring.app-two.kk-on > .kk > .kk-chat { grid-column: 2; grid-row: 4; margin-bottom: var(--sp-4); }
  #v-monitoring.app-two.kk-on > .kk.chat-open > .kk-chat { grid-row: 1 / -1; }
  #v-monitoring.app-two.kk-on:has(> .kk.chat-open) > #mon-head { display: none; }
  #v-monitoring.app-two.kk-on:not(.as-on) > .kk:not(.chat-open) > .kk-chat { display: flex; align-self: start; background: none; }
  #v-monitoring.app-two.kk-on > .kk:not(.chat-open) > .kk-chat > :not(.kk-box) { display: none; }
  #v-monitoring.app-two.kk-on > .kk:not(.chat-open) .kk-box { flex: none; min-height: 0; background: none; }
  #v-monitoring.app-two.kk-on > .kk:not(.chat-open) .kk-in > .kk-note { color: var(--fg-3); }
}
/* over a monitor's conversation: the wait, a down banner, 지금 확인 and 소식 */
#v-chat > .mon-chat-top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); min-width: 0; padding: var(--sp-1) var(--sp-4) var(--sp-2); border-bottom: 1px solid var(--line); }
#v-chat > .mon-chat-top[hidden] { display: none; }
.mon-chat-top > .mon-prog-wrap { flex: 1 1 200px; width: auto; margin-top: 0; }
.mon-chat-top > .mon-banner { flex: 1 1 100%; }
.mon-chat-top > .mon-actions { flex: none; margin-left: auto; }
@media (max-width: 1099px) { #v-chat > .mon-chat-top { order: 2; } }

/* the open item's header (owner 2026-11-04, compact and the same for a mail and a watch): one row - icon, name, place, the moment, the actions -
   and under it one 20px line indented to the name: a mail's state, or a watch's words, slim 3px bar and result tag. No empty band, no second row of buttons. */
#mon-head .mon-hdwrap { display: flex; flex: 1; flex-direction: column; gap: var(--sp-05); min-width: 0; padding: var(--sp-2) var(--sp-4) var(--sp-2); border-radius: var(--r-card); background: var(--card); }
#mon-head .mon-hdrow { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); min-width: 0; min-height: 32px; }
#mon-head .mon-hdrow .cv-av { width: 32px; height: 32px; border-radius: 50%; background: var(--layer); color: var(--fg-2); font-size: 14px; }
#mon-head .mon-hdrow .cv-b { flex: 1 1 160px; min-width: 0; }
#mon-head .mon-hdrow .cv-n { font: 600 16px/22px var(--font); letter-spacing: -.01em; }
#mon-head .mon-hd-time { flex: none; margin-left: auto; color: var(--fg-3); font: 400 12px/16px var(--font); white-space: nowrap; }
#mon-head .mon-hdacts { display: flex; flex: none; align-items: center; gap: var(--sp-2); min-width: 0; }
#mon-head .mon-hdacts .as-hd { margin-left: 0; }
#mon-head .mon-hdwrap > .cv-p, #mon-head .mon-hdwrap > .mon-prog-wrap, #mon-head .mon-hdwrap > .mon-banner { margin-left: calc(var(--sp-8) + var(--sp-3)); width: auto; }
#mon-head .mon-hdwrap > .cv-p { min-height: 20px; color: var(--fg-2); font: 400 13px/20px var(--font); }
#mon-head .mon-hdwrap > .mon-banner { margin-top: var(--sp-1); }
#mon-head .mon-prog-wrap { flex-direction: row; align-items: center; gap: var(--sp-3); min-height: 20px; margin-top: 0; }
#mon-head .mon-prog-wrap .mon-prog-tx { order: -1; flex: 0 1 auto; min-width: 0; color: var(--fg-2); font: 400 13px/20px var(--font); }
#mon-head .mon-prog-wrap .mon-prog-top { flex: 1 1 96px; min-width: 0; }
#mon-head .mon-prog-wrap .mon-prog { height: 3px; }

/* One column for every 모니터링 screen: the head card, the cards under it and the section labels share the view's left and right edges, so nothing here insets
   the column or caps it at the chat's reading width (--col). A label's text starts on the card's outer edge, the same in the Messenger pane (#kk-rooms .kk-lh). */
#v-monitoring .tl-in { max-width: none; }
/* the timeline of an open item: the prototype's section label above its rows (확인 기록), and the cards on the page's surface */
#mon-tl > .mon-sec { margin: var(--sp-2) 0 calc(var(--sp-2) - var(--sp-4)); /* the list's 16px gap adds to these: 24px above, 8px to its card, like .sec */ color: var(--fg-2); font: 600 13px/18px var(--font); }
#mon-tl > .mon-sec:first-child { margin-top: 0; }
/* a phone opens the conversation with the same card: the wait, a down banner and the actions sit together, not loose on the page */
#mon-tl > .mon-topcard { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-card); background: var(--card); }
#mon-tl > .mon-topcard .mon-actions { justify-content: flex-end; }

/* a monitor's 확인 기록 / 실행 기록 (30-monitoring.js monLogRow): the prototype's detail list - one card, compact rows (dot, result line, small line, time at the right) */
#mon-tl > .mon-log { min-width: 0; border-radius: var(--r-card); background: var(--card); overflow: hidden; }
.mon-lr { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; min-height: 48px; padding: var(--sp-2) var(--sp-4); }
.mon-lr + .mon-lr { box-shadow: inset 0 1px 0 var(--line); }
.mon-lr[role="button"] { cursor: pointer; }
@media (hover: hover) { .mon-lr[role="button"]:hover { background: var(--card-hover); } }
.mon-lr > .dot { align-self: center; }
.mon-lb { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.mon-l1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); font: 500 15px/22px var(--font); }
.mon-lr.un .mon-l1 { font-weight: 600; }
.mon-l2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-2); font: 400 12px/16px var(--font); }
.mon-l2:empty { display: none; }
.mon-lr:not([role="button"]) :is(.mon-l1, .mon-l2) { white-space: normal; overflow-wrap: anywhere; }   /* a row with nothing to unfold shows every word */
.mon-lt { flex: none; color: var(--fg-3); font: 400 12px/16px var(--font); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mon-l1 .nw-chg s { color: var(--fg-3); }
.mon-l1 .nw-chg em { font-style: normal; font-weight: 600; color: var(--accent); }
#mon-tl > .mon-chips { justify-content: flex-start; margin-top: var(--sp-2); }
/* the inner screens of 모니터링 on a phone (an app, a mail, a room) drop the usage ring from the app bar: the title keeps the room (31-conversations.js convChrome) */
.appbar.mon-in .ustrip { display: none; }
/* a phone inside a watch: the machine's name stands in the description line under the bar (monTopNodes), so the title does not carry it a second time */
.main:has(#mon-tl > .mon-topcard .mon-pc) .appbar.mon-in h1 > .mon-pc { display: none; }

/* 프로젝트 (web/js/18-lanes.js, 19-project-main.js): three levels on one tab.
   1 list  - search + chips (전체 / 진행 중 / 확인 필요), compact rows (name, one status line, last activity), 더 보기.
   2 overview - the prototype's detail: header card, 확인 필요 (one action), then 세션 · 작업 · 결과 · 감시.
   3 pages - one section each, opened over the overview as a .pdv overlay (its own history entry: 뒤로 returns to the overview).
   The list prefix is .pl- (not .pj-: 05-log.css already owns .pj- for the project bands). */

/* ---- level 1: the list (site/prototype/s-work.js #projects): section headers, one card per group, a folder tile per row ---- */
.pl { display: flex; flex-direction: column; gap: var(--sp-3); }
.pl-top { display: flex; flex-direction: column; gap: var(--sp-2); }
.pl-search { display: flex; align-items: center; gap: var(--sp-2); height: 36px; padding: 0 var(--sp-3); border-radius: var(--r-ctl); background: var(--card); color: var(--fg-3); }
.pl-search .ic { width: 16px; height: 16px; }
.cm-rule-q { flex: none; margin-bottom: var(--sp-3); background: var(--ff-fill); }
.pl-search input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; color: var(--fg); font: inherit; outline: 0; }
.pl-search input::placeholder { color: var(--fg-3); }
.pl-search:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
/* one line at every width: the chips scroll sideways instead of wrapping */
.pl-chips { display: flex; flex-wrap: nowrap; gap: 0; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.pl-chips::-webkit-scrollbar { display: none; }
/* the prototype's .sec + .list: each group is its own card, with the heading above it */
.pl-groups { display: flex; flex-direction: column; min-width: 0; }
.pl-groups > .sec { margin: var(--sp-5) var(--sp-1) var(--sp-2); color: var(--fg-2); font: 600 var(--fs-sec)/var(--lh-sec) var(--font); }
.pl-groups > .sec:first-child { margin-top: 0; }
/* a computer's header (two or more computers, 18-lanes.js pcHead): the same section heading, a tap folds its card */
.pl-groups > .pl-pc { display: flex; align-items: center; gap: var(--sp-2); padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.pl-pc .pl-pcn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-pc .pl-pcc { color: var(--fg-3); font-weight: 400; }
.pl-pc .chev { flex: none; width: 14px; height: 14px; margin-left: auto; color: var(--fg-3); transform: rotate(90deg); transition: transform var(--m-fast) var(--m-ease); }
.pl-pc[aria-expanded="false"] .chev { transform: none; }
.pl-pc.off .pl-pcn { color: var(--fg-3); }
.pl-groups > .pl-list + .sec { margin-top: var(--sp-6); }
.pl-groups .pl-gh { margin-bottom: var(--sp-2); }
.pl-list { background: var(--card); border-radius: var(--r-card); overflow: hidden; }
.pl-list > .empty { background: transparent; }
.pl-empty-a { margin-top: var(--sp-3); }
.pl-row { display: flex; align-items: center; gap: var(--sp-3); width: 100%; min-width: 0; min-height: 48px; margin: 0; padding: var(--sp-2) var(--sp-4); border: 0; background: transparent; color: inherit; text-align: left; }
.pl-row + .pl-row { border-top: 1px solid var(--line); }
@media (hover: hover) { .pl-row:hover { background: var(--card-hover); } }
/* the open project: the same selected fill as the chat list (.cv-row.on) */
.pl-row.on, .pl-row:active { background: var(--row-sel); } @media (hover: hover) { .pl-row.on:hover { background: var(--row-sel); } }
/* the icon surface of the chat list (.cv-av): a 36px round layer tile, not a button */
.pl-row > .ico { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--layer); color: var(--fg-2); }
.pl-row > .ico .ic { width: 20px; height: 20px; }
.pl-b { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pl-1 { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.pl-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 15px/22px var(--font); }
.pl-row.unread .pl-n { font-weight: 600; }
.pl-nb { flex: none; height: 18px; min-width: 18px; padding: 0 var(--sp-15); border-radius: 9px; background: var(--warn); color: var(--bg); font: 600 11px/18px var(--font); text-align: center; }
.pl-s { display: flex; align-items: center; min-width: 0; color: var(--fg-2); font: 400 12px/16px var(--font); }
.pl-sw { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-row > .li-end { flex: none; display: flex; align-items: center; gap: var(--sp-2); margin-left: auto; }
.pl-row > .li-end > .tag { flex: none; }
.pl-row > .li-end > .chev { width: 14px; height: 14px; color: var(--fg-3); }

/* ---- level 2: the overview ---- */
.pm-o { display: flex; flex-direction: column; gap: var(--sp-3); margin-top: var(--sp-4); }
@media (max-width: 1099px) { .pm-o { max-width: 760px; } }
.pm-need { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-1); }
/* 확인 필요: the prototype's card header (title + state tag) over the question, then the one filled action */
.pm-need .ch { width: 100%; margin-bottom: var(--sp-05); }
.pm-need .ch h3 { flex: none; }
.pm-need .ch .tag { flex: none; }
.pm-need-t { font: 500 15px/22px var(--font); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* 지금 상황: the summary line above the section's rows */
.pm-goal { margin: calc(var(--sp-05) * -1) var(--sp-1) var(--sp-2); }
.pm-sec-list > .li + .li { border-top: 1px solid var(--line); }
.pm-need-s { color: var(--fg-3); font-size: 12px; line-height: 16px; }
.pm-need .cf { padding-top: var(--sp-3); }

/* the page menu (⋯) beside 프로젝트 채팅: the app's 40px page-header icon button */
.pmv-hact .ib.pmv-more { width: 40px; height: 40px; border-radius: 50%; background: var(--layer); color: var(--fg-2); }
/* a tonal button on the header card takes the page gray, so it reads as a control on the white card */
.pmv-hrow .btn.tonal { background: var(--layer); }
@media (hover: hover) { .pmv-hrow .btn.tonal:hover { background: var(--hover); } }
@media (hover: hover) { .pmv-hact .ib.pmv-more:hover { background: var(--card-hover); color: var(--fg); } }
.pmv-hact .ib.pmv-more .ic { width: 20px; height: 20px; }

/* ---- level 3: a section page (an overlay, full screen on a phone) ---- */
.pdv-hd { flex: none; display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-5) var(--sp-15) var(--sp-2); }
.pdv-back { width: 40px; height: 40px; border-radius: var(--r-ctl); color: var(--fg-2); }
.pdv-tt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-05); }
.pdv-t { margin: 0; font: 700 20px/28px var(--font); letter-spacing: -.02em; overflow-wrap: anywhere; }
.pdv-ey { color: var(--fg-3); font-size: 13px; line-height: 18px; }
.pdv-body { display: flex; flex-direction: column; padding: var(--sp-15) var(--sp-5) var(--sp-6); }
.pdv-stack { display: flex; flex-direction: column; min-width: 0; }
.pdv-stack .sec:first-child { margin-top: var(--sp-1); }
/* a page, not a dialog: wide screens get the same tall surface as .fs-card.tall */
@media (min-width: 640px) and (max-width: 1099px) { .fs-card.pdv { width: min(760px, calc(100% - 48px)); height: min(86dvh, 860px); max-height: none; } }
@media (max-width: 639px) {
  .pdv-hd { padding-left: max(var(--sp-2), env(safe-area-inset-left)); padding-right: max(var(--sp-3), env(safe-area-inset-right)); }
  .pdv-body { padding-left: max(var(--sp-4), env(safe-area-inset-left)); padding-right: max(var(--sp-4), env(safe-area-inset-right)); }
}

/* ---- wide: the list beside the overview, like 채팅's conversation list ---- */
@media (min-width: 1100px) {
  /* the chip row is wider than the column most of the time: the fade shows there is more to scroll */
  .pl-chips { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent); }
  .pl-groups > .sec { margin: var(--sp-4) var(--sp-1) var(--sp-2); }
  /* the open page of a project (세션 기록, 결과 전체 ...) takes the content column's box of the frame, not a centered dialog */
  .fs-bd:has(> .fs-card.pdv) { align-items: stretch; justify-content: flex-start; padding: var(--frame-top) var(--edge) var(--sp-4) var(--frame-x); }
  .fs-card.pdv { width: 100%; height: auto; max-height: none; }
}

/* ---------- element picker (web/js/15-picker.js): the app header's hint, hover box, numbered markers, composer chips ---------- */
.pk-hint { flex: none; color: var(--fg-3); font: 400 12px/16px var(--font); white-space: nowrap; }
.apps-hb .pk-hint { display: block; margin-top: var(--sp-05); overflow: hidden; text-overflow: ellipsis; }
.pk-box { position: fixed; z-index: 70; pointer-events: none; border-radius: 4px; outline: 2px solid var(--accent); outline-offset: -1px; background: color-mix(in srgb, var(--accent) 10%, transparent); }
.pk-box[hidden] { display: none; }
.pk-lab { position: absolute; left: -2px; bottom: 100%; margin-bottom: var(--sp-1); max-width: min(320px, 80vw); padding: var(--sp-05) var(--sp-2); border-radius: 8px; background: var(--fg); color: var(--bg); font: 500 12px/16px var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-box.below .pk-lab { bottom: auto; top: 100%; margin: var(--sp-1) 0 0; }
#pick-marks { position: fixed; inset: 0; z-index: 71; pointer-events: none; }
.pk-mark { position: fixed; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 var(--sp-15); border-radius: 10px; background: var(--accent); color: #fff; font: 700 11.5px/1 var(--font); transform: translate(0, -50%); }
.pk-mark[hidden] { display: none; }
.atray.has-pick { flex-wrap: wrap; overflow-x: visible; }
.pk-chip { height: 44px; max-width: min(320px, 100%); padding: 0 var(--sp-8) 0 var(--sp-2); border-radius: var(--r-ctl); gap: var(--sp-2); }
.pk-n { flex: none; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 var(--sp-15); border-radius: 10px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }
.pk-chip .fi-t { min-width: 0; }
.pk-chip .fi-n { max-width: 200px; }
.pk-chip .fi-m { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-chip .ax { top: 8px; right: 2px; width: 28px; height: 28px; border-radius: var(--r-ctl); background: transparent; color: var(--fg-3); }
.pk-chip .ax svg { width: 14px; height: 14px; }
@media (pointer: coarse) { .pk-chip .ax { top: 6px; width: 32px; height: 32px; border-radius: var(--r-ctl); } }
@media (max-width: 639px) { .pk-chip { max-width: 100%; } .pk-chip .fi-n { max-width: 168px; } .pk-chip .fi-m { max-width: 180px; } }

/* ---------- shell: the prototype's frame (site/prototype/proto.css "/* shell *\/") ----------
   Wide (1024px and up): a 232px sidebar (foldable to a 60px icon rail) holds the brand, the computer picker row, the five nav items with their counts and the
   usage row at the bottom; the main column holds the top bar (page title, search, bell, connection and usage chips) and the views.
   Narrow: the sidebar becomes the bottom tab bar (the same #nav, one component), the brand/picker/footer step aside, and the top
   bar keeps back + title + search + bell. Everything below only restates the frame; colors and sizes come from 01-tokens.css. */
/* the page never scrolls: a bar above the app (the update bar, the demo bar) gives .app a top margin, which would otherwise collapse through
   <body> and push the document 44px past the screen; any focus or scrollIntoView then slides the top bar away and lifts the tab bar */
body { display: flow-root; }
.side-tog { display: none; }
@media (min-width: 1024px) {
  :root { --side-w: 232px; --bar-h: 60px; }
  .app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: 100vh; height: 100dvh; padding-top: 0; }
  .side { order: 0; display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; min-height: 0; padding: var(--sp-3); overflow-y: auto; border-top: 0; background: var(--bg); }
  .main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
  .gban, .oerr { flex: none; grid-row: auto; grid-column: auto; }
  .views { flex: 1; min-height: 0; grid-row: auto; grid-column: auto; }
  .appbar { display: flex; flex: none; align-items: center; gap: var(--sp-1); height: var(--bar-h); padding: 0 var(--sp-5) 0 var(--sp-6); background: transparent; }
  .appbar .ib { width: 32px; height: 32px; }
  /* usage lives in the sidebar's lower row here (#sf-usage); the top bar copy is for the phone only */
  .appbar .ustrip { display: none; }
  /* brand: the mark and the assistant's name, 40px like the nav items below it */
  .brand { display: flex; align-items: center; gap: var(--sp-2); width: 100%; height: 40px; padding: 0 var(--sp-3); border: 0; border-radius: var(--r-ctl); background: transparent; color: inherit; font: 600 15px/20px var(--font); letter-spacing: 0; text-align: left; }
  @media (hover: hover) { .brand:hover { background: var(--hover); } }
  .brand .logo { width: 20px; height: 20px; }
  /* nav: one column, 40px rows, the open item a white card */
  .rail { display: flex; flex: none; flex-direction: column; align-self: stretch; gap: var(--sp-05); width: 100%; min-width: 0; margin: 0; margin-top: var(--sp-2); }
  .ni { position: relative; display: flex; flex: none; flex-direction: row; align-items: center; justify-content: flex-start; gap: var(--sp-2); width: 100%; height: 40px; padding: 0 var(--sp-3); border-radius: var(--r-ctl); background: transparent; color: var(--fg-2); font-size: 14px; line-height: 20px; font-weight: 500; text-align: left; }
  @media (hover: hover) { .ni:hover { background: var(--hover); color: var(--fg); } }
  .ni.on { background: var(--card); color: var(--fg); font-weight: 700; }
  .ni.on::after, .ni.on::before { content: none; }
  .ni .ic { display: block; width: 16px; height: 16px; }
  .ni .nl { min-width: 0; }
  /* a tab with something new carries one small dot at the bottom right of its text, no count (the count stays in the aria-label and the title); the phone tab bar draws the same badges */
  .ni .nnb, .ni .nub { position: static; flex: none; align-self: flex-end; width: 6px; min-width: 6px; height: 6px; margin: 0 0 13px calc(var(--sp-1) * -1); /* nudge: dot at the text's bottom right, 3px above the text line */ padding: 0; overflow: hidden; border-radius: 50%; font-size: 0; line-height: 0; }
  .ni .nnb { background: var(--warn); }
  /* the other computers' dot on the Home icon is the phone tab bar's; here the brand row has it (33-peers.js prHomeDot) */
  .ni .nub.pc { display: none; }
  /* lower area: what the limits say now; a tap opens 사용량 */
  .sfoot { margin-top: auto; padding-top: var(--sp-2); }
  .sf-row { display: flex; align-items: center; gap: var(--sp-2); width: 100%; min-height: 40px; padding: var(--sp-15) var(--sp-3); border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--fg-2); text-align: left; }
  @media (hover: hover) { .sf-row:hover { background: var(--hover); color: var(--fg); } }
  .sf-row .ic { color: var(--fg-3); }
  .sf-row .sf-k { flex: none; font-size: 12px; line-height: 16px; font-weight: 500; }
  .sf-row .sf-bar { flex: 1; min-width: 0; height: 4px; border-radius: 2px; background: var(--track); overflow: hidden; }
  .sf-row .sf-bar i { display: block; height: 100%; border-radius: 2px; background: var(--fg-2); }
  .sf-row .sf-v { flex: none; margin-left: auto; color: var(--fg-3); font-size: 12px; line-height: 16px; font-variant-numeric: tabular-nums; }
  .sf-row.warn .sf-v { color: var(--warn); }
  .sf-row.warn .sf-bar i { background: var(--warn); }
  .sf-ring { display: none; }
  /* the fold control is a bare thin chevron on the line between the sidebar and the main column, at the page title's height: out of every flow, so it takes no width and the title never moves; ‹ open, › folded */
  .app { position: relative; }
  .side-tog { background: transparent; } @media (hover: hover) { .side-tog:hover { background: transparent; } }
  .side-tog { position: absolute; left: calc(var(--side-w) - 14px); top: 16px; display: inline-grid; width: 28px; height: 28px; color: var(--fg-3); }
  @media (hover: hover) { .side-tog:hover { color: var(--fg); } }
  .side-tog .ic { width: 16px; height: 16px; }
  .side-min .side-tog .ic { transform: scaleX(-1); }
  /* folded (:root.side-min, 04-state.js sideToggle): a 60px icon rail. Names go to the title and the aria-label, a tab's dot sits at its icon's bottom right, the usage row is a ring of the same share and color with the number inside */
  :root.side-min { --side-w: 60px; }
  .side-min .side { padding: var(--sp-3) calc((var(--side-w) - var(--sp-10)) / 2); }
  .side-min .brand { position: relative; justify-content: center; padding: 0; }
  .side-min #brand-name, .side-min .brand-c .ic, .side-min .ni .nl, .side-min .sf-row .ic, .side-min .sf-k, .side-min .sf-bar, .side-min .sf-v { display: none; }
  .side-min .brand-c { position: absolute; left: 30px; top: 28px; width: 6px; height: 6px; margin: 0; }
  .side-min .brand-c.pdot::after { right: 0; bottom: 0; }
  .side-min .ni { justify-content: center; padding: 0; }
  .side-min .ni .nnb, .side-min .ni .nub { position: absolute; left: 25px; top: 24px; margin: 0; }
  .side-min .sf-row { justify-content: center; padding: 0; }
  .side-min .sf-ring { display: grid; width: 36px; height: 36px; font-size: 11px; }
  .side-min .sf-row.warn .sf-ring { color: var(--warn); }
  /* top bar: title always names the page (the sidebar carries the tabs), then search, bell, connection and usage */
  .appbar #back { margin: 0; align-self: center; }
  /* inside a 모니터링 app: ‹ 모니터링 where the page title stands; the empty title keeps the bar's right side in place */
  .appbar #back.mon-up { display: inline-flex; align-items: center; gap: var(--sp-05); width: auto; padding: 0 var(--sp-2) 0 var(--sp-05); color: var(--fg); font: 700 22px/30px var(--font); letter-spacing: -.02em; }
  .appbar:has(#back.mon-up) h1 { visibility: hidden; }
  .appbar h1, .appbar:not(.back) h1 { display: block; align-self: center; flex: 1; min-width: 0; max-width: none; margin: 0; font: 700 22px/30px var(--font); letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .appbar.tv h1 { flex: 0 0 auto; max-width: 260px; }
  .appbar .thead { flex: 1; min-width: 0; margin: 0 var(--sp-1); }
  .appbar .cmdk { display: inline-flex; align-items: center; gap: var(--sp-15); width: auto; height: 32px; margin: 0; padding: 0 var(--sp-15) 0 var(--sp-3); border-radius: var(--r-ctl); background: var(--card); color: var(--fg-3); font-size: 13px; }
  .appbar .cmdk .tx { display: inline; }
  .appbar .cmdk kbd { display: inline-block; }
  .appbar .conn, #vtog, .appbar .ustrip { margin-left: 0; }
  /* content starts 8px under the bar, like proto .view (the 24px of settings pages and the project list was a second gap) */
  .view, .views.pp { padding-top: var(--sp-2); }
}

/* the notice bell: the count sits on its top-right corner, as the prototype's .ib .bd */
.bellbtn { position: relative; }
#bell-n { position: absolute; top: 1px; right: 1px; min-width: 16px; height: 16px; padding: 0 var(--sp-1); border-radius: 8px; background: var(--warn); color: var(--bg); font-size: var(--fs-tag); line-height: var(--lh-tag); font-weight: 600; text-align: center; }
#bell-n[hidden] { display: none; }

@media (max-width: 1023px) {
  /* phone / tablet: the sidebar is the bottom tab bar (proto .tabbar), the brand and footer step aside */
  .sfoot { display: none; }
  .side { padding-bottom: max(var(--sp-05), calc(env(safe-area-inset-bottom) - var(--sp-2))); }
  .ni { height: 56px; }
  .ni.on::before { left: 28%; right: 28%; }
  .appbar { height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) var(--sp-2) 0 var(--sp-4); }
  .appbar.back { padding-left: var(--sp-1); }
  .appbar h1, .appbar:not(.back) h1 { font-size: 20px; line-height: 28px; }
  .appbar .ib { width: 36px; height: 36px; }
}
/* The computer beside a title (.mon-pc, convTitle) stays on the title's one line when it fits; when it does not it wraps to a second row, which the bar clips (1lh), so the head never grows a second line. The row is one tap height tall so the clip is clean. The 1lh counts the content alone (content-box): the phone's tap area around the title (h1.pdot border below) would otherwise come out of that one line and cut its letters in half. */
.appbar h1:has(> .mon-pc) { box-sizing: content-box; display: flex; flex-wrap: wrap; align-items: center; max-height: 1lh; line-height: var(--btn-hit); overflow: hidden; white-space: nowrap; }
.appbar h1 > .ttx { min-width: 0; overflow: hidden; text-overflow: ellipsis; }


/* ---------- 홈: the prototype's layout (site/prototype/s-work.js home, proto.css .view / .col / .grid2 / .card) ----------
   One full-width column on top (greeting, 답변 필요) and the card grid below it (two cards to a row from 720px,
   one below). The grid is the home board (07-board.js), so the cards still drag and resize; the card sizes are the prototype's. */
#v-home { display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-2) var(--sp-6) var(--sp-10); }
#home-now { display: flex; flex-direction: column; gap: var(--sp-3); order: 1; }
#home-cards { order: 2; }
.bbar { order: 3; margin: 0; justify-content: flex-end; }
#home-ended { order: 4; }
#home-ended:empty { display: none; }
#home-ended .ended { margin-top: 0; }

.hgreet { padding: 0 var(--sp-1); }
.hgreet .bigrow { display: flex; align-items: center; gap: var(--sp-15); min-width: 0; }
.hgreet .bigrow .big { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hgreet .big { font: 700 20px/28px var(--font); letter-spacing: -.01em; }
.hgreet .meta { margin-top: var(--sp-05); color: var(--fg-3); font: 400 12px/16px var(--font); }
.hgreet .hgreet-fb { margin-top: var(--sp-15); }
.hgreet .subline { margin-top: var(--sp-15); padding: 0; background: none; color: var(--fg-2); }
.hgreet-more { flex: none; width: 24px; height: 24px; color: var(--fg-3); }

/* the prototype's alert strip: one card-like row under the greeting */
.hstrip { min-height: 48px; background: var(--card); border-radius: var(--r-card); }
.hstrip .tx { display: flex; flex-direction: column; gap: var(--sp-05); }
@media (hover: hover) { .hstrip:hover { background: var(--card-hover); } }
.hstrip .end { flex: none; display: flex; align-items: center; }

/* 답변 필요: the prototype's full-width card, its count an orange badge after the title; every row (a login, a question, the drafts, the comments) starts on one left line */
.hneeds { display: flex; flex-direction: column; min-width: 0; }
.hneeds .hn-h { margin-top: 0; padding: var(--sp-4) var(--sp-5) var(--sp-1); }
.hneeds .hn-h h2 { order: 0; font: 600 16px/22px var(--font); letter-spacing: -.01em; }
.hneeds .hn-h .sup { order: 1; margin-left: 0; min-width: 18px; height: 18px; padding: 0 var(--sp-15); border-radius: 9px; background: var(--warn); color: var(--bg); font: 600 11px/18px var(--font); text-align: center; }
.hneeds .hn-h .tag { order: 2; }
.hneeds .hn { border-radius: 0 0 var(--r-card) var(--r-card); }
/* nothing to answer: the same box as an empty grid card (20px around, the state line 8px under the title) */
.hneeds:has(> .hn > .hc-none) > .hn-h:first-child { padding: var(--sp-5) var(--sp-5) 0; }
.hneeds .hn:has(> .hc-none) { padding: 0 var(--sp-5) var(--sp-5); }
.hneeds .hn > .hr { padding-left: var(--sp-5); padding-right: var(--sp-5); }
.hneeds .hn > .hr.hrx { padding-left: 0; padding-right: 0; }
.hneeds .hn > .hr.hrx > .hrx-m { padding-left: var(--sp-5); }
.hneeds .hn > .hr.hrx > .hrx-m:last-child { padding-right: var(--sp-5); }

/* the grid cards keep the prototype's card box: 20px padding, the header 8px above its list, rows to the card's edge; a row is as tall
   as its taller card (07-board.js rows mode) but each card is as tall as its content, so an empty card beside a long one leaves no blank
   box (owner 2026-11-09); the wrapper follows the card so its hover shadow does too */
#home-cards.rows .bi.fit { height: auto !important; }
#home-cards.rows .bi.fit > .card { overflow: visible; }
#home-cards.rows.measuring .bi > .card { height: auto !important; }
#home-cards .card { padding: var(--sp-5); }
#home-cards .card > .hn { margin: var(--sp-1) calc(var(--sp-5) * -1) calc(var(--sp-5) * -1); background: transparent; border-radius: 0 0 var(--r-card) var(--r-card); }
#home-cards .card > .hn > .hr { padding-left: var(--sp-5); padding-right: var(--sp-5); }
/* a finished / running task row (.hr.hrx) keeps its 16px inside the tap area (.hrx-m), so the card's 20px goes there instead and never doubles: its dot, text and state word
   stand on the same x as the 대기 중 rows' (owner 2026-11-04) */
#home-cards .card > .hn > .hr.hrx { padding-left: 0; padding-right: 0; }
#home-cards .card > .hn > .hr.hrx > .hrx-m { padding-left: var(--sp-5); }
#home-cards .card > .hn > .hr.hrx > .hrx-m:last-child, #home-cards .card > .hn > .hr.hrx > .hrx-m:has(+ .hrx-f) { padding-right: var(--sp-5); }
#home-cards .card > .hn > .hr.hrx > .hrx-f { padding-left: var(--sp-10); padding-right: var(--sp-5); }
#home-cards .card > .hn > .hr.hrx > .btn, #home-cards .card > .hn > .hr.hrx > .hrx-n:last-child { margin-right: var(--sp-4); }
#home-cards .card > .hn > .hr.hrx > .hs { margin-right: var(--sp-5); }
#home-cards .card > .hn:has(> .hc-none) { margin: 0; }
@media (max-width: 1023px) { #v-home { padding: var(--sp-1) var(--sp-4) var(--sp-6); } }

/* the computer switcher is the sidebar's brand row on a wide screen, so the page title carries no chevron or dot */
@media (min-width: 1024px) {
  .appbar:not(.back) h1.pdot::after, .appbar:not(.back) h1.p-need::after { content: none; }
  .appbar.hasp:not(.back) h1.pdot::after, .appbar.hasp:not(.back) h1.p-need::after { content: none; }
  .appbar.hasp:not(.back) h1::before { content: none; }
  .appbar.hasp:not(.back) h1.pdot, .appbar.hasp:not(.back) h1.p-need { padding-right: 0; }
  .appbar h1.pdot, .appbar h1.p-need { padding-right: 0; }
  .appbar h1.pdot::after, .appbar h1.p-need::after { content: none; }
}

/* phone / touch: an app bar control (icon button, usage strip, offline pill) keeps its drawn size and answers a tap over --btn-hit (the back arrow, 4px from the screen edge, grows inward). Neighbouring targets must not share a strip, so icon buttons sit 44px center to center: search and bell (36px each) 8px apart, the 대화 and ⋯ buttons of a mail or kakao title bar (32px each) 12px and 10px apart; the usage strip, wider than 44px, only keeps 2px off the bell so a fractional edge does not hand the bell's last pixel to it */
@media (pointer: coarse), (max-width: 639px) {
  .appbar .cmdk { margin-right: var(--sp-1); }
  .appbar .ustrip { margin-left: var(--sp-05); }
  .appbar #as-bar { margin-right: var(--sp-2); }
  .appbar #as-more-bar { margin-right: var(--sp-15); }
  .appbar :is(.ib, .ustrip, .conn) { position: relative; }
  .appbar :is(.ib, .ustrip, .conn)::after { content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, var(--btn-hit)); height: max(100%, var(--btn-hit)); transform: translate(-50%, -50%); }
  .appbar #back::after { left: 0; transform: translateY(-50%); }
  .appbar h1.pdot { padding-block: var(--sp-3); margin-block: calc(var(--sp-3) * -1); }   /* the title clips its overflow (ellipsis), so its area is padding with the same margin back */
  .appbar.cvconv h1.pdot { padding-block: 0; border-block: var(--sp-3) solid transparent; }   /* a title cut at two lines (-webkit-line-clamp) would show its third line in vertical padding, so the area is a clear border (outside the clip) with the same margin back; its lines stay centred on the bar, which a min-height would not do (-webkit-box-pack is ignored there) */
}

/* phone / touch: a control in the page body keeps its drawn size and answers a tap over --btn-hit through ::after, like the app bar above (a list row only needs 40). A row that scrolls sideways clips what hangs out above and below it (overflow-x: auto clips y too), so it carries the area as padding and gives the same back as negative margin: nothing moves. Where two areas would share a strip, the line gap or the end of the stack gives way, not the drawn size. */
@media (pointer: coarse), (max-width: 639px) {
  :where(.subsum, .mtop-b, .hgreet-more, .hgreet .subline, .board .ch .ib, .ct-file, #c-attach, #send-btn, .cbar .cchip, .mr-f, .nsc-fb, .hm-chip, .pmv-edit, .pmv-more, .dr-rm, .dr-rc-add, .dr-rc-edit .btn, .kk-add-btn, .rq-recv, .rq-og, .rq-pencil, .rq-open, .hrx-n) { position: relative; }
  :where(.subsum, .mtop-b, .hgreet-more, .hgreet .subline, .board .ch .ib, .ct-file, #c-attach, #send-btn, .cbar .cchip, .mr-f, .nsc-fb, .hm-chip, .pmv-edit, .pmv-more, .dr-rm, .dr-rc-add, .dr-rc-edit .btn, .kk-add-btn, .rq-recv, .rq-og, .rq-open, .hrx-n)::after { content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, var(--btn-hit)); height: max(100%, var(--btn-hit)); transform: translate(-50%, -50%); }
  .subsum { z-index: 1; }
  .subsum::after { top: calc(var(--sp-3) * -1); bottom: calc(var(--sp-1) * -1); height: auto; transform: translateX(-50%); }
  .qd-ln .btn.inrow::after { inset: calc(var(--sp-2) * -1 - 1px) calc(var(--sp-05) * -1); }
  .nsc-f { padding-block: var(--sp-2); margin: calc(var(--sp-1) - var(--sp-2)) 0 0; }
  .rq-hd2 .nsc-f { margin-top: calc(var(--sp-2) * -1); }
  .pl-chips { padding-block: var(--sp-2); margin-block: calc(var(--sp-2) * -1); }
  .mr-filter { padding-top: var(--sp-2); margin-top: calc(var(--sp-15) * -1); }
  #kk-rooms .kk-views { padding: var(--sp-05) 0 calc(var(--sp-3) + var(--sp-05)); margin-bottom: calc(var(--sp-3) * -1); }
  #kk-rooms .kk-lh { padding-bottom: var(--sp-3); }
  #kk-rooms .kk-views .mr-f::after, .kk-add-btn::after { top: 0; height: var(--btn-hit); transform: translateX(-50%); }
  #kk-rooms .kk-views .mr-f::after { top: calc(var(--sp-05) * -1); }
  .ct-body { padding-block: var(--sp-4); margin-block: calc(var(--sp-4) * -1); }
  .ct-file { z-index: 1; }
  .ct-file::after, .hrx-n::after { height: calc(var(--btn-hit) + var(--sp-2)); }   /* a fraction of a pixel under the rows measured 42 and 43 of 44 */
  #c-attach::after { top: calc(var(--sp-2) * -1); height: var(--btn-hit); transform: translateX(-50%); }
  #cbar { padding-block: var(--sp-15) calc(var(--sp-4) + var(--sp-05)); margin-block: calc(var(--sp-15) * -1) calc((var(--sp-4) + var(--sp-05)) * -1); }
  .cbar .cchip::after { top: calc(var(--sp-15) * -1); height: var(--btn-hit); transform: translateX(-50%); }   /* the text box ends 6px above the chips: the area grows down, over the composer's bottom padding */
  .hm-chips { row-gap: var(--sp-2); padding-bottom: var(--sp-05); }
  .pmv-edit::after { left: 0; width: 100%; height: var(--btn-hit); transform: none; }
  .mtop .mtop-b::after { left: 0; width: 100%; transform: translateY(-50%); }   /* nine buttons in the bar leave under 37px each: an area wider than the button would take a strip of its neighbour */
  .pmv-title::after { top: calc(var(--sp-3) * -1); }
  .pmv-purpose::after { top: calc(var(--sp-1) * -1); }
  .pmv-hrow { padding-top: var(--sp-15); }
  /* the controls the list above missed (ui F7) */
  :where(.td-bar, .rq-og, .nsc-x, .nsc-fold, .dr-rc-x, .dr-seg button) { position: relative; }
  :where(.td-bar, .rq-og, .nsc-x, .nsc-fold, .dr-rc-x, .dr-seg button)::after { content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, var(--btn-hit)); height: max(100%, var(--btn-hit)); transform: translate(-50%, -50%); }
  .dr-seg button { overflow: visible; }
  .dr-seg button::after { left: 0; width: 100%; transform: translateY(-50%); }   /* the two segments share an edge: tall, not wider */
  .rp-btn::before { content: ""; position: absolute; left: 50%; top: 50%; width: var(--btn-hit); height: var(--btn-hit); transform: translate(-50%, -50%); }
  .dr-rc { overflow: visible; }
  .ch > .btn.inrow::after { top: calc(var(--sp-15) * -1); bottom: calc((var(--sp-2) + var(--sp-05)) * -1); }   /* a card head sits 6px under the card's top edge, which clips */
  .dr-rc-x::after { left: calc(var(--sp-05) * -1); width: var(--btn-hit); transform: translateY(-50%); }   /* grows into the gap after it, not over the name */
}

/* 화면 공유 (features/remote-desktop/DESIGN.md Web): the app-bar pill that names who is watching, and the button on a computer's row in the switcher. The settings rows are the plain .li + .hs-sw. */
.dsk-pill { position: relative; grid-row: 1; grid-column: 8; align-self: center; max-width: 220px; margin-left: var(--sp-2); border: 0; font-family: inherit; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dsk-pill[hidden] { display: none; }
@media (hover: hover) { .dsk-pill:hover { color: var(--fg); } }
.conn:not([hidden]) ~ .dsk-pill { display: none; }
@media (max-width: 1099px) { .dsk-pill { margin-left: 0; } }
@media (max-width: 639px) { .dsk-pill { flex: 0 1 auto; min-width: 0; max-width: 40%; } }
.pr-line { display: flex; align-items: center; gap: var(--sp-1); }
.pr-line .pr-row { flex: 1; min-width: 0; }
.btn.tonal.pr-desk, .btn.tonal.pr-forget { flex: none; margin-right: var(--sp-2); background: var(--hover); white-space: nowrap; }
@media (hover: hover) { .btn.tonal.pr-desk:hover, .btn.tonal.pr-forget:hover { background: var(--active); } }
.anch .btn.tonal.pr-desk, .anch .btn.tonal.pr-forget { margin-right: var(--sp-1); }
@media (min-width: 700px) { .ds-bd.anch .ds-sheet.pr-sheet { width: 280px; } }

/* 화면 안내 (web/js/42-intro.js): the spotlight is a hole in the scrim over a real menu, the card sits next to it (above the tab bar on a phone) or in the middle. */
.intro { position: fixed; inset: 0; z-index: 1500; }
.intro-spot { position: fixed; border-radius: var(--r-ctl); box-shadow: 0 0 0 200vmax var(--scrim); outline: 2px solid var(--accent); }
.intro-spot.none { outline: 0; inset: 0; border-radius: 0; box-shadow: none; background: var(--scrim); }
.intro-tip { position: fixed; display: flex; flex-direction: column; width: min(340px, calc(100% - var(--sp-6))); padding: var(--sp-5); border-radius: var(--r-sheet); background: var(--pop); box-shadow: var(--float); }
.intro-tip.mid { inset: 0; margin: auto; height: fit-content; width: min(var(--sheet-w), calc(100% - var(--sp-6))); }
.intro-n { margin-bottom: var(--sp-15); color: var(--fg-3); font: 500 var(--fs-sec)/var(--lh-sec) var(--font); }
.intro-tip h2 { margin-top: var(--sp-3); font: 700 var(--fs-big)/var(--lh-big) var(--font); text-wrap: balance; }
.intro-b { margin-top: var(--sp-2); color: var(--fg-2); font: 400 var(--fs-body)/var(--lh-body) var(--font); }
.intro-keys { display: flex; flex-direction: column; margin-top: var(--sp-3); }
.intro-key { display: flex; align-items: center; gap: var(--sp-3); min-height: var(--btn-h); color: var(--fg-2); font: 400 var(--fs-body)/var(--lh-body) var(--font); }
.intro-key kbd { min-width: calc(var(--sp-8) * 3); text-align: center; }
.intro-ft { display: flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-5); }
.intro-skip { margin-right: auto; }
@media (max-width: 1023px) { .intro-tip:not(.mid) { left: var(--sp-3); right: var(--sp-3); width: auto; } }

/* A long title in a list row stays on one line and fades out at its end (docs/ui-spec.md 목록 행). The fade lives in the box's own right
   padding, past the content edge: text that fits ends before the gradient starts, and only text that runs on reaches it, so a short title
   (a shrink-to-fit box too) is never touched and no script has to measure a row. Last in the file order, so it wins over each list's own
   ellipsis. The full title stays in the row's open view or its title attribute. A new list title joins this selector, not a new rule. */
.li .hd:not(.pmv-wrap), .row .nm, .rt-row .nm, .fc-card .top .nm, .mt-use-tx .nm, .pal-i .nm, .subrow .nm b, .hr .hn1 .nm, .ended .en, .pl-n, .pj-nm,
.cv-n, .nsc-r .hd, .hc-row .t, .hc-mon .n, .mr .rc-title, .mth-subj, .mbox-cn, .mon-ov-n, .mon-l1, .hm-row .l, .lg-t, .lw-n, .fatt .fi-n, .mr-fname, .md .mlist-t {
  display: block; min-width: 0; padding-right: var(--sp-5); overflow: hidden; white-space: nowrap; text-overflow: clip;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - var(--sp-5)), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - var(--sp-5)), transparent);
}

/* 분할 창 (web/js/43-panes*.js): from the second pane on, #split takes the place of the one section on a wide screen and the chat tab - [list column, folded to nothing][tree of panes].
   A pane is a card like the conversation card; the active one carries the real section (.in-pane), the others are mirrors (.pane-mir). The active one is told by its head (the others' title is quieter), not by a line around it.
   The panes take the list column's width (owner 8f7c8c3d); the chat list comes back as a layer over the panes' left (.ls-open) without moving either of them. */
#split { --cv-w: 280px; display: grid; grid-template-columns: 0 minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); column-gap: 0; max-width: none; margin: 0; padding-left: var(--edge); padding-right: var(--edge); }
#split > .pane-side { grid-column: 1; position: relative; min-width: 0; min-height: 0; margin-bottom: var(--sp-4); }
:is(#split > .pane-side, #v-chat.cnv-fold) > .cv-side { display: none; position: absolute; z-index: 5; top: 0; bottom: calc(var(--sp-4) * -1); left: 0; width: var(--cv-w); padding: 0; border-radius: var(--r-card); background: var(--card); overflow-y: auto; box-shadow: var(--float); }
:is(#split.ls-open > .pane-side, #v-chat.cnv-fold.ls-open) > .cv-side { display: block; }
#split > .pane-tree { grid-column: 2; display: flex; min-width: 0; min-height: 0; }

.pane, .pane-row, .pane-col { flex: 1 1 0; display: flex; min-width: 0; min-height: 0; }
.pane-row { flex-direction: row; }
.pane-col, .pane { flex-direction: column; }
.pane { position: relative; border-radius: var(--r-card); background: var(--card); overflow: hidden; }
.pane > .pane-x { position: absolute; top: var(--sp-4); right: var(--sp-3); z-index: 3; }
/* the active pane's 목록 button: at its head's left, a full touch target; the heads leave it room so a title starts at the same place in both panes */
:is(.pane, #v-chat.cnv-fold) > .pane-ls { position: absolute; top: var(--sp-2); left: var(--sp-2); z-index: 3; width: 44px; height: 44px; border-radius: var(--r-ctl); }

.pane-bar { position: relative; flex: none; touch-action: none; }
.pane-row > .pane-bar { width: var(--sp-4); cursor: col-resize; }
.pane-col > .pane-bar { height: var(--sp-4); cursor: row-resize; }
.pane-bar::after { content: ""; position: absolute; inset: 0; margin: auto; border-radius: var(--r-ctl); background: transparent; }
.pane-row > .pane-bar::after { width: var(--sp-05); }
.pane-col > .pane-bar::after { height: var(--sp-05); }
.pane-bar:active::after { background: var(--accent); } @media (hover: hover) { .pane-bar:hover::after { background: var(--accent); } }

#split :is(#v-chat.in-pane, .pane-chat) { flex: 1; height: auto; min-height: 0; width: 100%; max-width: none; margin: 0; padding: 0; grid-template-columns: minmax(0, 1fr); }
#split :is(#v-chat.in-pane, .pane-chat)::before { display: none; }
#split :is(#v-chat.in-pane, .pane-chat) > * { grid-column: 1; }
#split :is(#cv-head, .pane-chat > .cv-head) { padding-right: calc(var(--sp-8) + var(--sp-4)); }
#split :is(#cv-head, .pane-hd) { padding-left: calc(var(--sp-12) + var(--sp-4)); }
/* 모니터링 in a pane scrolls inside its card. A pane is as narrow as the phone's column: an open room, thread or DM takes the whole pane the way it does
   below 1100px (17-kakao.css), and the app bar's back closes it (30-kakao.js kkBack, 30-monitoring-comments.js cmBack). */
#split .pane .kk.chat-open .kk-rooms { display: none; }
/* the room's request bar sits on the pane's floor however long the chat is (docs/split-panes.md 입력창): the reply cards move above it and scroll on
   their own, the chat window keeps 40% of the column and gives way first; the full screen scrolls the whole column with the cards under the bar */
#split .pane .kk-chat { overflow: hidden; }
#split .pane .kk-chat > .kk-box { flex: 1 1 0; min-height: 40%; }
#split .pane .kk-chat > .kk-composer { flex: 0 1 auto; display: flex; flex-direction: column; min-height: 0; }
#split .pane .kk-composer > * { flex: none; }
#split .pane .kk-composer > .kk-drafts { order: -1; flex: 0 1 auto; min-height: 0; margin: 0 0 var(--sp-2); overflow-y: auto; }
/* 메일 쓰기 floats over its pane's corner, not the window's (20-mail-box.css .mbox-fab is fixed to the window) */
#split .pane .mbox-fab { position: absolute; right: var(--sp-4); bottom: var(--sp-4); }
/* the copy in an inactive pane has no ids, so what #v-monitoring.kk-on hides on the real screen is hidden here by class */
.pane-pj > .view.kk-on > .chatbox { display: none; }
#split .view.in-pane:not(#v-chat) { flex: 1; min-height: 0; height: auto; max-width: none; margin: 0; padding: var(--sp-4); overflow-y: auto; }

.pane-mir { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.pane-hd { flex: none; display: flex; align-items: center; gap: var(--sp-2); min-width: 0; padding: var(--sp-3) var(--sp-4); }
.pane-hd .pane-x { margin-left: auto; }
/* the open pane is told by its head: the title of the others is quieter (the state line is --fg-3 already) */
.pane:not(.on) .pane-hd .cv-hd-t { color: var(--fg-3); }
.pane-pj { flex: 1; min-height: 0; overflow-y: auto; }
.pane-pj > .view { max-width: none; margin: 0; padding: var(--sp-4); }

/* dragging a tab, a row or a pane head (43-panes-drag.js): a ghost of the title at the pointer with what letting go does under it, the row it came from
   in its hover look, the hovered zone drawn over its pane like the file drop (accent fill, --ff-ring edge). A row a pane cannot show: a muted ghost, no zone. */
body.pn-drag, body.pn-drag * { cursor: grabbing !important; user-select: none; }
body.pn-drag.pn-no, body.pn-drag.pn-no * { cursor: not-allowed !important; }
.pn-src { background: var(--card-hover); }
.pn-ghost { position: fixed; z-index: 2100; max-width: 240px; padding: var(--sp-1) var(--sp-3); border-radius: var(--r-ctl); background: var(--card); box-shadow: var(--float); color: var(--fg); font: 500 var(--fs-sec)/var(--lh-sec) var(--font); pointer-events: none; }
.pn-ghost > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-gh { color: var(--fg-3); font: 400 var(--fs-meta)/var(--lh-meta) var(--font); }
.pn-ghost.no > .pn-gt { color: var(--fg-3); }
/* the zone glides from edge to edge and pane to pane like the board's placeholder (05-log.css .bph); 01-tokens.css turns it off with reduced motion */
.pn-zone { position: fixed; z-index: 2099; border-radius: var(--r-card); background: color-mix(in srgb, var(--accent) 12%, transparent); box-shadow: var(--ff-ring); pointer-events: none; transition: left var(--m-fast) var(--m-ease), top var(--m-fast) var(--m-ease), width var(--m-fast) var(--m-ease), height var(--m-fast) var(--m-ease); }
