/* ==========================================================================
   AI 팀메이트 오피스 — 공통 스타일 (모바일 우선 반응형)
   테마: 「클래식 × 사이버펑크」 네오누아르 (2026-09-29 리뉴얼)
     - 사이버펑크: 짙은 남색 바탕 · 네온 청록/마젠타 · 격자·스캔라인 · 모서리 꺾쇠 · 깎인 버튼
     - 클래식: 명조 제목(Noto Serif KR) · 황동(금색) 장식선 · ◆ 문양
   항상 어두운 테마다(OS 라이트/다크 설정과 무관). 색은 :root 토큰으로만 쓴다.
   레이아웃 속성(display·grid·width·position)은 E2E 가 검사하므로 장식 때문에 바꾸지 않는다.
   서체는 _Layout.cshtml 에서 Google Fonts 로 불러오고, 못 불러오면 시스템 서체로 떨어진다.
   ========================================================================== */
:root {
    --bg: #070b14;
    --bg-2: #0c1220;
    --surface: #0f1626;
    --surface-2: #141d31;
    --text: #e4e9f5;
    --muted: #8f9ab3;
    --border: #26324c;
    --accent: #22e5ff;
    --accent-2: #ff2e88;
    --accent-text: #03121a;
    --brass: #c9a45c;
    --ok: #3cf29a;
    --bad: #ff4d6d;
    --warn: #ffb020;
    --radius: 4px;
    --gutter: 16px;
    --shadow: 0 0 0 1px rgba(201, 164, 92, .06) inset, 0 8px 24px rgba(0, 0, 0, .35);
    --glow: 0 0 12px rgba(34, 229, 255, .35);
    --glow-2: 0 0 12px rgba(255, 46, 136, .4);
    --font-body: "Pretendard", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
    --font-display: "Noto Serif KR", "Batang", "AppleMyungjo", serif;
    --font-mono: "JetBrains Mono", "D2Coding", Consolas, monospace;
    /* 모서리 꺾쇠: 청록 L자 4개. 배경 맨 위 층으로 얹어 테두리는 그대로 둔다 */
    --corners:
        linear-gradient(var(--accent), var(--accent)) left top / 12px 2px no-repeat,
        linear-gradient(var(--accent), var(--accent)) left top / 2px 12px no-repeat,
        linear-gradient(var(--accent), var(--accent)) right top / 12px 2px no-repeat,
        linear-gradient(var(--accent), var(--accent)) right top / 2px 12px no-repeat,
        linear-gradient(var(--brass), var(--brass)) left bottom / 12px 1px no-repeat,
        linear-gradient(var(--brass), var(--brass)) left bottom / 1px 12px no-repeat,
        linear-gradient(var(--brass), var(--brass)) right bottom / 12px 1px no-repeat,
        linear-gradient(var(--brass), var(--brass)) right bottom / 1px 12px no-repeat;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; }
html { background: var(--bg); }

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(1200px 600px at 85% -10%, rgba(255, 46, 136, .10), transparent 60%),
        radial-gradient(900px 600px at -10% 10%, rgba(34, 229, 255, .09), transparent 60%),
        linear-gradient(rgba(34, 229, 255, .035) 1px, transparent 1px) 0 0 / 40px 40px,
        linear-gradient(90deg, rgba(34, 229, 255, .035) 1px, transparent 1px) 0 0 / 40px 40px,
        var(--bg);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    overflow-x: hidden;
}
/* 스캔라인: 화면 전체에 아주 옅게. 클릭을 가로채지 않는다 */
body::after {
    content: ""; position: fixed; inset: 0; z-index: 200; pointer-events: none;
    background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px);
}
::selection { background: var(--accent-2); color: #fff; }

a { color: var(--accent); text-decoration-color: rgba(34, 229, 255, .4); text-underline-offset: 3px; }
a:hover { text-shadow: var(--glow); }
code { font-family: var(--font-mono); word-break: break-all; color: #9fefff; }
[v-cloak] { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 스크롤바 */
* { scrollbar-color: #2c3a58 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2c3a58; border-radius: 5px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: #3d5080; }

/* ── 상단 바 ─────────────────────────────────────────────── */
.topbar {
    position: sticky; top: 0; z-index: 10;
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    padding: 10px var(--gutter);
    background: rgba(7, 11, 20, .82);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    border-image: linear-gradient(90deg, var(--accent), var(--brass) 50%, var(--accent-2)) 1;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .45);
}
.brand {
    font-family: var(--font-display); font-weight: 900; letter-spacing: .03em;
    color: var(--text); text-decoration: none; margin-right: auto;
    text-shadow: 0 0 10px rgba(34, 229, 255, .45);
}
.brand:hover { color: #fff; }
.brand-mark { color: var(--brass); text-shadow: 0 0 8px rgba(201, 164, 92, .6); }

.nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border: 1px solid var(--accent); border-radius: 2px;
    background: transparent; color: var(--accent); font-size: 20px; cursor: pointer;
    box-shadow: var(--glow);
}
.nav { display: none; width: 100%; flex-direction: column; gap: 4px; padding-top: 8px; }
.nav.open { display: flex; }
/* 좁은 화면: 메뉴가 20개를 넘어 한 줄씩 세우면 화면보다 길다(상단 바가 붙어 있어 아래 항목에 닿지 못한다 — 문제해결 #61)
   → 두 칸으로 접고, 그래도 넘치면 메뉴 안에서 굴린다 */
@media (max-width: 767px) {
    .nav.open { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 8px;
        max-height: calc(100vh - 70px); max-height: calc(100dvh - 70px); overflow-y: auto; overscroll-behavior: contain; }
}
.nav a { position: relative; padding: 8px 10px; border-radius: 2px; color: var(--text); text-decoration: none; letter-spacing: .02em; transition: color .15s, background .15s; }
.nav a:hover, .nav a:focus-visible { background: rgba(34, 229, 255, .08); color: var(--accent); text-shadow: var(--glow); }
.nav a[aria-current="page"] { color: var(--accent); }
.nav a[aria-current="page"]::after, .nav a:hover::after {
    content: ""; position: absolute; left: 10px; right: 10px; bottom: 3px; height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2)); box-shadow: var(--glow); pointer-events: none;
}

@media (min-width: 768px) {
    .nav-toggle { display: none; }
    /* 메뉴가 많아 한 줄에 안 들어가면 두 줄로 접는다(오른쪽 「로그아웃」이 화면 밖으로 잘리지 않게) */
    .nav { display: flex; width: auto; flex-direction: row; flex-wrap: wrap; justify-content: flex-end; padding-top: 0; }
}

/* ── 본문 ───────────────────────────────────────────────── */
.page { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: var(--gutter); }
.page.page-wide { max-width: 1680px; }
.footer { padding: 14px var(--gutter); color: var(--muted); font-size: 13px; text-align: center; font-family: var(--font-mono); letter-spacing: .03em;
    border-top: 1px solid rgba(201, 164, 92, .25); }

.card {
    background: var(--corners), var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}
.card.narrow { max-width: 560px; margin: 24px auto; }
.card h1 { font-size: 20px; margin: 0; font-family: var(--font-display); font-weight: 900; letter-spacing: .01em; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }

.muted { color: var(--muted); }
.error { color: var(--bad); }

/* 키-값 목록: 모바일은 한 줄씩, 넓은 화면은 두 열 */
.kv { display: grid; grid-template-columns: 1fr; gap: 4px 16px; margin: 0; }
.kv dt { color: var(--muted); font-size: 14px; }
.kv dd { margin: 0 0 10px; }
@media (min-width: 576px) {
    .kv { grid-template-columns: max-content 1fr; }
    .kv dd { margin: 0; }
}

/* ── 컨트롤 ─────────────────────────────────────────────── */
/* 주 버튼: 오른쪽 위·왼쪽 아래 모서리를 깎은 네온 판. clip-path 가 바깥 outline 을 자르므로 포커스는 안쪽 그림자로 */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 40px; padding: 0 18px;
    border: 0; border-radius: 0;
    background: linear-gradient(180deg, #5cefff, var(--accent));
    color: var(--accent-text);
    font: inherit; font-weight: 700; letter-spacing: .03em; text-decoration: none; cursor: pointer;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
    transition: filter .15s, transform .15s;
}
.btn:hover { filter: brightness(1.12) drop-shadow(0 0 6px rgba(34, 229, 255, .6)); text-shadow: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px var(--accent-2); }
.btn:disabled { opacity: .45; cursor: default; filter: grayscale(.6); }

.badge { display: inline-block; padding: 1px 10px; border-radius: 2px; font-size: 12px; font-weight: 600; border: 1px solid currentColor; font-family: var(--font-mono); letter-spacing: .04em; }
.badge.ok { color: var(--ok); box-shadow: 0 0 8px rgba(60, 242, 154, .25); }
.badge.bad { color: var(--bad); box-shadow: 0 0 8px rgba(255, 77, 109, .25); }

/* 개발 모드 전용: tooltip-guard.js 가 title 없는 컨트롤에 붙이는 표시 */
.tip-missing { outline: 2px dashed var(--bad) !important; outline-offset: 2px; }

/* ── 1단계: 폼·표·알림·탭·마법사·채팅 ───────────────────────────── */
/* 페이지 제목: 명조 + 황동 이중선 + 짧은 네온선(클래식 문장 장식) */
h1.page-title {
    font-family: var(--font-display); font-weight: 900; font-size: 24px; letter-spacing: .01em;
    margin: 0 0 16px; padding-bottom: 10px;
    background:
        linear-gradient(var(--brass), var(--brass)) left bottom / min(120px, 100%) 1px no-repeat,
        linear-gradient(var(--brass), var(--brass)) left calc(100% - 3px) / min(120px, 100%) 1px no-repeat,
        linear-gradient(90deg, var(--accent), transparent) left calc(100% - 7px) / min(48px, 100%) 2px no-repeat;
    text-shadow: 0 0 18px rgba(34, 229, 255, .18);
}
h1.page-title::before { content: "◆ "; color: var(--brass); font-size: .6em; vertical-align: .25em; text-shadow: 0 0 8px rgba(201, 164, 92, .6); }
h2 { font-family: var(--font-display); font-weight: 600; font-size: 17px; margin: 0 0 12px; color: #f1e6cc; }
h3 { letter-spacing: .01em; }
/* minmax(0, 1fr): 1fr(= minmax(auto, 1fr))는 안의 표·탭의 최소 폭보다 줄지 않아 모바일에서 페이지를 가로로 밀어낸다(운영 재현 2026-09-29, 문제해결 #23).
   0 으로 두면 칸은 화면 폭을 따르고, 넓은 표는 .table-wrap 안에서 가로 스크롤된다. */
.stack { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.grid-2 { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.spacer { flex: 1; }
.small { font-size: 13px; }

.form { display: grid; gap: 14px; max-width: 640px; }
.field { display: grid; gap: 4px; min-width: 0; }
.field > label, .field-label { font-weight: 600; font-size: 14px; color: #cfd8ec; }
.field .hint { color: var(--muted); font-size: 12.5px; }
.err { color: var(--bad); font-size: 13px; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin: 0; min-width: 0; background: rgba(15, 22, 38, .6); }
legend { font-weight: 600; padding: 0 6px; font-family: var(--font-display); color: var(--brass); }

input[type=text], input[type=password], input[type=number], input[type=url], input[type=date], input[type=search], input[type=email], input[type=time], input[type=datetime-local], select, textarea {
    width: 100%; min-height: 40px; padding: 8px 10px;
    border: 1px solid var(--border); border-radius: 2px;
    background: var(--bg-2); color: var(--text); font: inherit;
    transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #5f6a85; }
select option { background: var(--surface); color: var(--text); }
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 1px solid var(--accent); outline-offset: 0; border-color: var(--accent); box-shadow: var(--glow); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.check input { width: 18px; height: 18px; flex: none; }

.btn.secondary { background: rgba(34, 229, 255, .04); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(34, 229, 255, .55); font-weight: 600; }
.btn.secondary:hover { background: rgba(34, 229, 255, .12); }
.btn.danger { background: linear-gradient(180deg, #ff7690, var(--bad)); color: #1a0208; }
.btn.small { min-height: 32px; padding: 0 12px; font-size: 13px; clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px)); }
.linkbtn { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
.linkbtn:hover { text-shadow: var(--glow); }
.inline-form { display: inline; }

.alert { padding: 10px 14px; border-radius: 2px; border: 1px solid var(--border); border-left-width: 3px; background: var(--surface); }
.alert.ok { border-color: var(--ok); color: var(--ok); background: rgba(60, 242, 154, .06); }
.alert.bad { border-color: var(--bad); color: var(--bad); background: rgba(255, 77, 109, .07); }
.alert.warn { border-color: var(--warn); color: var(--warn); background: rgba(255, 176, 32, .07); }
.secret-once { font-family: var(--font-mono); font-size: 18px; letter-spacing: 1px; background: var(--bg-2); color: var(--accent); padding: 6px 10px; border-radius: 2px; border: 1px dashed var(--accent); }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { color: var(--brass); font-weight: 600; white-space: nowrap; font-size: 12.5px; letter-spacing: .06em; border-bottom: 1px solid rgba(201, 164, 92, .45); }
.table tbody tr:hover td { background: rgba(34, 229, 255, .04); }
.num { text-align: right !important; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }

.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stat { background: var(--corners), var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.stat .v { font-size: 24px; font-weight: 700; font-family: var(--font-mono); color: var(--accent); text-shadow: var(--glow); }
.stat .k { color: var(--muted); font-size: 13px; letter-spacing: .03em; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 14px; overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; color: var(--muted); font: inherit; cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; text-shadow: var(--glow); }

.steps { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 16px; padding: 0; list-style: none; }
.steps li { padding: 4px 10px; border-radius: 2px; border: 1px solid var(--border); font-size: 13px; color: var(--muted); font-family: var(--font-mono); }
.steps li.active { border-color: var(--accent); color: var(--accent); font-weight: 600; box-shadow: var(--glow); }
.steps li.done { color: var(--ok); border-color: var(--ok); }
.choice-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.choice { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; cursor: pointer; background: var(--surface); text-align: left; color: var(--text); font: inherit; transition: border-color .15s, box-shadow .15s; }
.choice:hover { border-color: rgba(34, 229, 255, .6); }
.choice.selected { border-color: var(--accent); outline: 1px solid var(--accent); box-shadow: var(--glow); background: var(--corners), var(--surface-2); }
.choice b { display: block; margin-bottom: 4px; color: #f1e6cc; }

/* 채팅: 모바일은 직원 목록이 위(가로 스크롤), 넓은 화면은 왼쪽 */
.chat { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .chat { grid-template-columns: 240px minmax(0, 1fr); } }
.chat-list { display: flex; gap: 6px; overflow-x: auto; min-width: 0; }
@media (min-width: 900px) { .chat-list { flex-direction: column; overflow: visible; } }
.chat-list button { text-align: left; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 2px; padding: 8px 10px; cursor: pointer; font: inherit; white-space: nowrap; }
.chat-list button:hover { border-color: rgba(34, 229, 255, .6); }
.chat-list button.active { border-color: var(--accent); outline: 1px solid var(--accent); box-shadow: inset 3px 0 0 var(--accent), var(--glow); }
.chat-panel { display: flex; flex-direction: column; min-height: 60vh; min-width: 0; background: var(--corners), var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.chat-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.chat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; max-height: 62vh; }
.bubble { max-width: 85%; padding: 8px 12px; border-radius: 2px; white-space: pre-wrap; word-break: break-word; }
.bubble.user { align-self: flex-end; background: linear-gradient(135deg, rgba(34, 229, 255, .22), rgba(255, 46, 136, .22)); color: var(--text);
    border: 1px solid rgba(255, 46, 136, .5); border-radius: 10px 2px 10px 10px; box-shadow: var(--glow-2); }
.bubble.staff { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 2px 10px 10px 10px; }
.bubble.system { align-self: center; color: var(--muted); font-size: 12.5px; background: none; font-family: var(--font-mono); }
.bubble .meta { display: block; font-size: 11.5px; opacity: .7; margin-top: 4px; font-family: var(--font-mono); }
/* 대화 입력(공용 컴포넌트 vo-chat-input, js/chat-input.js): 입력창은 가로 전체, 그 아래 줄에 [📎 파일] · 첨부 칩 · [보내기] */
.chat-input { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-top: 1px solid var(--border); }
.chat-input textarea { width: 100%; min-height: 64px; height: 64px; resize: vertical; }
.chat-input.dragging { outline: 2px dashed var(--accent); outline-offset: -4px; }
.chat-input-bar { display: flex; align-items: center; gap: 8px; }
.chat-input-bar .btn { flex: none; white-space: nowrap; }
.chat-input-files { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-input-error { margin: 0; color: var(--bad); font-size: 13px; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 2px 2px 2px 8px; border: 1px solid var(--border); border-radius: 2px; background: var(--bg-2); font-size: 13px; }
.file-chip.uploading { opacity: .6; }
.file-chip .file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.file-thumb { width: 24px; height: 24px; object-fit: cover; border-radius: 2px; flex: none; }
.file-remove { border: 0; background: transparent; color: var(--muted); cursor: pointer; font: inherit; padding: 2px 6px; border-radius: 2px; }
.file-remove:hover { background: var(--bad); color: #fff; }
.bubble-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.bubble-file { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: inherit; max-width: 100%; word-break: break-all; }
.bubble-thumb { display: block; max-width: min(220px, 100%); max-height: 160px; border-radius: 2px; border: 1px solid var(--border); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav .inline-form { display: flex; }
.nav .linkbtn { padding: 8px 10px; border-radius: 2px; color: var(--accent-2); }
.nav .linkbtn:hover, .nav .linkbtn:focus-visible { background: rgba(255, 46, 136, .1); text-shadow: var(--glow-2); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-right: 6px; }
.status-dot.on { background: var(--ok); box-shadow: 0 0 8px var(--ok); }

/* ── 2단계: 칸반·모달·Inbox ─────────────────────────────────────── */
.nav .count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 2px; background: var(--accent-2); color: #fff; font-size: 12px; text-align: center; margin-left: 4px;
    font-family: var(--font-mono); box-shadow: var(--glow-2); }
/* 칸 최소 200px: 5칸 + 간격 = 1,048px → 본문 1200px 화면에서도 가로 스크롤 없이 5칸이 다 보인다(문제해결 참조) */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
/* 칸 위쪽 레일 색 = 상태(Board.cshtml 의 data-col). RUNNING 은 느리게 숨 쉰다 */
.kcol { --rail: var(--border);
    background: var(--corners), linear-gradient(180deg, rgba(20, 29, 49, .95), rgba(15, 22, 38, .92));
    border: 1px solid var(--border); border-top: 3px solid var(--rail); border-radius: var(--radius); padding: 10px; min-height: 200px;
    display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow), 0 -6px 18px -12px var(--rail); }
.kcol[data-col="TODO"] { --rail: #6b7894; }
.kcol[data-col="READY"] { --rail: var(--accent); }
.kcol[data-col="RUNNING"] { --rail: var(--accent-2); animation: rail-pulse 2.4s ease-in-out infinite; }
.kcol[data-col="BLOCKED"] { --rail: var(--bad); }
.kcol[data-col="DONE"] { --rail: var(--ok); }
@keyframes rail-pulse { 50% { box-shadow: var(--shadow), 0 -8px 24px -8px var(--accent-2); } }
.kcol.drop { outline: 2px dashed var(--accent); box-shadow: var(--glow); }
.kcol h3 { font-size: 13.5px; margin: 0 0 4px; display: flex; justify-content: space-between; align-items: center; gap: 6px; letter-spacing: .06em; }
.kcol h3 > :last-child { font-family: var(--font-mono); font-weight: 600; color: var(--rail); }
.kcol h3 .kh { display: inline-flex; align-items: center; gap: 6px; }
.ksort { width: 100%; padding: 3px 6px; font-size: 12px; background: var(--bg-2); color: var(--muted); border: 1px solid var(--border); border-radius: var(--radius); }
.ksort:hover, .ksort:focus-visible { color: var(--text); border-color: var(--accent); }
.help-q { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-2); color: var(--muted); font-size: 12px; line-height: 1; cursor: pointer; padding: 0; }
.help-q:hover, .help-q:focus-visible { color: var(--accent); border-color: var(--accent); box-shadow: var(--glow); }
/* 칸반 도움말 팝업 */
.help-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; font-size: 13.5px; }
.help-flow .arrow { color: var(--brass); }
.help-body h3 { font-size: 15px; margin: 14px 0 6px; font-family: var(--font-display); color: #f1e6cc; }
.help-body ul { margin: 0; padding-left: 20px; }
.help-body li { margin: 3px 0; }
.help-body li::marker { color: var(--accent); }
.help-body .tag { white-space: nowrap; }
.help-example { border: 1px dashed var(--brass); border-radius: 2px; padding: 10px 12px; background: rgba(201, 164, 92, .05); margin-top: 12px; }
.help-example .ex-title { font-weight: 600; color: var(--brass); }
.help-example ol { margin: 6px 0 10px; padding-left: 20px; }
/* 항목 설명 말풍선(vo-tip): 라벨 옆 「?」 — 누르면(open) 또는 마우스를 올리면 라벨 줄 아래에 풍선이 뜬다 */
.label-row { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.label-row > label { margin: 0; }
.field > .label-row > label:not(.check) { font-weight: 600; font-size: 14px; color: #cfd8ec; }
.ibub { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--accent); background: var(--bg-2); color: var(--accent); font-size: 12px; font-weight: 700; line-height: 1; cursor: pointer; padding: 0; flex: none; }
.ibub:hover, .ibub:focus-visible, .ibub[aria-expanded="true"] { background: var(--accent); color: var(--accent-text); box-shadow: var(--glow); }
.ibub-body { display: none; position: absolute; left: 0; top: calc(100% + 8px); z-index: 60; width: min(420px, 100%); min-width: min(260px, 90vw);
    background: #0b1222; color: var(--text); border: 1px solid var(--accent); border-radius: 2px; padding: 10px 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.5), var(--glow); font-size: 13px; font-weight: 400; line-height: 1.6; text-align: left; white-space: normal; }
.ibub-body::before { content: ""; position: absolute; top: -6px; left: 14px; width: 10px; height: 10px; background: inherit; border-left: 1px solid var(--accent); border-top: 1px solid var(--accent); transform: rotate(45deg); }
.ibub-body.up { top: auto; bottom: calc(100% + 8px); }
.ibub-body.up::before { top: auto; bottom: -6px; transform: rotate(225deg); }
/* 풍선은 글만 담으므로 클릭을 가로채지 않는다 — 아래 항목의 「?」·입력칸을 가려도 그대로 눌린다 */
.ibub-body { pointer-events: none; }
.ibub-body.open, .ibub:hover + .ibub-body { display: block; }
.ibub-body b { color: var(--accent); }
/* 「선택 결과」 안내 줄: 고른 값에 따라 실행이 어떻게 되는지 */
.field-hint { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.field-hint::before { content: "▸ "; color: var(--accent); }
.field-hint:empty { display: none; }
.field-hint.warn { color: var(--warn); }
.create-flow .tag { white-space: nowrap; }
.kcard { background: var(--surface-2); border: 1px solid var(--border); border-radius: 2px; padding: 8px 10px; cursor: pointer; text-align: left; color: var(--text); font: inherit; width: 100%;
    box-shadow: inset 3px 0 0 var(--rail, var(--accent)); transition: border-color .15s, box-shadow .15s, transform .15s; }
.kcard:hover { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent), var(--glow); transform: translateY(-1px); }
/* 카드 삭제 ✕: 카드 오른쪽 위. 마우스가 있는 화면은 카드에 올렸을 때만 진하게, 터치 화면은 늘 보인다 */
.kcard-wrap { position: relative; }
.kcard-wrap .kcard { padding-right: 30px; }
.kdel { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 2px; border: 1px solid var(--border); background: var(--bg-2);
    color: var(--muted); font-size: 12px; line-height: 1; padding: 0; cursor: pointer; opacity: .35; }
.kcard-wrap:hover .kdel, .kdel:focus-visible { opacity: 1; }
.kdel:hover, .kdel:focus-visible { color: #fff; background: var(--bad); border-color: var(--bad); box-shadow: 0 0 8px var(--bad); }
@media (hover: none) { .kdel { opacity: 1; } }
.kcard .t { font-weight: 600; display: block; }
.kcard .m { color: var(--muted); font-size: 12.5px; display: block; margin-top: 2px; }
.tag { display: inline-block; padding: 0 8px; border-radius: 2px; font-size: 12px; border: 1px solid currentColor; margin-right: 4px; font-family: var(--font-mono); }
.tag.warn { color: var(--warn); } .tag.bad { color: var(--bad); } .tag.ok { color: var(--ok); } .tag.info { color: var(--accent); }
.modal-back { position: fixed; inset: 0; background: rgba(2, 5, 12, .72); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
    display: flex; align-items: flex-start; justify-content: center; padding: 24px 12px; z-index: 50; overflow-y: auto; }
.modal { background: var(--corners), var(--surface); border: 1px solid rgba(34, 229, 255, .45); border-radius: var(--radius); width: 100%; max-width: 820px; padding: 18px;
    box-shadow: 0 20px 50px rgba(0,0,0,.6), 0 0 30px rgba(34, 229, 255, .12); }
.modal .card-head { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid rgba(201, 164, 92, .35); }
.modal h2, .modal h3 { font-family: var(--font-display); }
pre.log { background: #050810; color: #b8f7c9; padding: 10px; border-radius: 2px; border: 1px solid var(--border); white-space: pre-wrap; word-break: break-word; font-size: 12.5px; font-family: var(--font-mono); max-height: 360px; overflow-y: auto; margin: 0; }
.md { white-space: pre-wrap; word-break: break-word; background: var(--bg-2); padding: 10px; border-radius: 2px; border: 1px solid var(--border); }
.inbox-item { border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); padding: 12px; display: grid; gap: 6px; background: var(--surface); box-shadow: var(--shadow); }
.inbox-item code { background: var(--bg-2); padding: 2px 6px; border-radius: 2px; }

/* ── 3단계: 3D 오피스 ───────────────────────────────────────────── */
/* 전체 화면 페이지(오피스): 본문 여백·최대 폭 없음. 임베드(오피스 위 창 안): 상단 바 없음 */
.page.page-full { max-width: none; padding: 0; display: flex; flex-direction: column; min-height: 0; }
body.full-bleed { height: 100vh; height: 100dvh; overflow: hidden; }
body.embed .page { padding: 12px; }
.only-mobile { display: inline-flex; }
@media (min-width: 900px) { .only-mobile { display: none; } }

.office { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.office-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px var(--gutter); background: rgba(10, 16, 30, .92); border-bottom: 1px solid var(--border); }
.office-switch { width: auto; max-width: 200px; min-height: 32px; padding: 2px 8px; font-weight: 600; }
.office-map { white-space: nowrap; }
.count-badge { display: inline-block; min-width: 18px; margin-left: 4px; padding: 0 5px; border-radius: 2px; background: var(--accent-2); color: #fff; font-size: 12px; text-align: center; font-family: var(--font-mono); }
.office-body { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
@media (min-width: 900px) { .office-body { grid-template-columns: 220px minmax(0, 1fr) var(--office-right-w, 340px); } }
/* 오른쪽 대화 패널 너비 손잡이 — 패널 왼쪽 가장자리를 끌어 넓힌다(패널은 overflow 라 손잡이는 본문 기준 절대 위치). 모바일 시트에서는 숨김 */
.office-right-grip { display: none; }
@media (min-width: 900px) {
    .office-right-grip { display: block; position: absolute; top: 0; bottom: 0; right: calc(var(--office-right-w, 340px) - 4px); width: 8px; z-index: 15; cursor: col-resize; touch-action: none; }
    .office-right-grip::after { content: ""; position: absolute; top: 0; bottom: 0; left: 3px; width: 2px; background: transparent; transition: background .15s; }
    .office-right-grip:hover::after, body.office-resizing .office-right-grip::after { background: var(--accent); box-shadow: var(--glow); }
}
body.office-resizing { cursor: col-resize; user-select: none; }

.office-stage { position: relative; min-height: 0; overflow: hidden; background: #0b1220; }
.office-canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; }
.office-overlay { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.office-video-surface { position: absolute; left: 0; top: 0; width: 960px; height: 540px; transform-origin: 0 0; visibility: hidden; z-index: 1; cursor: pointer; background: var(--bg); }
.office-video-surface iframe { width: 960px; height: 540px; border: 0; display: block; pointer-events: none; }
.office-video-layer { position: fixed; overflow: hidden; pointer-events: none; z-index: 45; }
.office-video-layer .office-video-surface { pointer-events: auto; }
.office-video-layer.preview { z-index: 1001; }
.office-video-layer.preview .office-video-surface, .office-video-layer.preview .office-video-surface > div, .office-video-layer.preview iframe { width: 100%; height: 100%; }
.office-video-layer.preview iframe { pointer-events: auto; }
.office-video-preview-controls { margin: 16px 0; }
.office-video-preview { width: 100%; min-width: 0; aspect-ratio: 16 / 9; min-height: 200px; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--border); margin-bottom: 12px; }
.office-video-preview p { padding: 16px; }
.office-video-time { float: right; font-variant-numeric: tabular-nums; }
.office-video-dialog { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--bg) 75%, transparent); }
.office-video-dialog .card { width: min(100%, 560px); max-height: 90dvh; overflow: auto; }
.office-video-dialog input[type=url], .office-video-dialog input[type=range] { width: 100%; }
.office-video-dialog .row { flex-wrap: wrap; margin-top: 16px; }
.office-video-playlist { margin: 12px 0; }
.office-video-playlist ol { max-height: 200px; overflow: auto; padding-left: 24px; }
.office-video-playlist li { padding: 8px 4px; border-bottom: 1px solid var(--border); }
.office-video-playlist li.active { color: var(--accent); }
.office-video-item-url { overflow-wrap: anywhere; }
.office-video-item-title, .office-video-item-url { display: block; overflow-wrap: anywhere; }
.office-video-dialog input[type=text] { width: 100%; }
.office-video-item-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.npc-tag { position: absolute; left: 0; top: 0; pointer-events: auto; white-space: nowrap; font: 600 12px/1.2 inherit; font-family: inherit;
    padding: 2px 8px; border-radius: 2px; border: 1px solid rgba(34, 229, 255, .45); background: rgba(8, 13, 25, .88); color: var(--text); cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.npc-tag.me { background: var(--accent); color: var(--accent-text); border-color: var(--accent); cursor: default; box-shadow: var(--glow); pointer-events: none; }   /* 내 이름표는 누를 기능이 없다 — 앞의 사물(일정 보드·우편함 등) 클릭을 가로채지 않게 통과 */
.npc-tag[data-status=working] { border-color: var(--accent); color: #bff6ff; }
.npc-tag[data-status=thinking] { border-color: #a78bfa; color: #ddd0ff; }
.npc-tag[data-status=approval] { border-color: var(--warn); color: #ffe0a3; }
.npc-tag[data-status=error] { border-color: var(--bad); color: #ffc2cd; }
.npc-tag[data-status=done] { border-color: var(--ok); color: #bfffe0; }
.npc-tag[data-status=speaking] { border-color: var(--accent-2); color: #ffc6e0; }
.npc-bubble { position: absolute; left: 0; top: 0; max-width: 220px; padding: 6px 10px; border-radius: 2px 10px 10px 10px; background: rgba(12, 18, 32, .95); color: var(--text); font-size: 13px;
    border: 1px solid rgba(34, 229, 255, .5); box-shadow: 0 2px 10px rgba(0,0,0,.5), var(--glow); white-space: normal; word-break: keep-all; }
.office-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; color: var(--accent); font-family: var(--font-mono); letter-spacing: .08em; }
.office-error { position: absolute; left: 12px; right: 12px; top: 12px; }
.office-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; padding: 6px 12px;
    background: rgba(8, 13, 25, .9); color: var(--text); border: 1px solid rgba(34, 229, 255, .4); border-radius: 2px; box-shadow: 0 2px 10px rgba(0,0,0,.5); font-size: 14px; white-space: nowrap; max-width: calc(100% - 24px); }
.office-help { position: absolute; right: 12px; top: 12px; max-width: 360px; padding: 12px 14px; background: var(--corners), rgba(15, 22, 38, .96); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 6px 20px rgba(0,0,0,.55); font-size: 13.5px; }
.office-help ul { margin: 6px 0 10px; padding-left: 18px; }
kbd { border: 1px solid var(--accent); border-bottom-width: 2px; border-radius: 2px; padding: 0 4px; font-size: 12px; background: var(--bg-2); color: var(--accent); font-family: var(--font-mono); }
.office-toast { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); padding: 8px 14px; border-radius: 2px; background: rgba(8, 13, 25, .95); color: var(--text); border: 1px solid var(--accent-2); box-shadow: var(--glow-2); font-size: 14px; max-width: calc(100% - 24px); }

.office-left, .office-right { background: rgba(12, 18, 32, .97); min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding: 10px; }
.office-left { border-right: 1px solid var(--border); }
.office-right { border-left: 1px solid var(--border); gap: 8px; }
.office-left h3 { font-size: 12px; color: var(--brass); margin: 10px 0 2px; letter-spacing: .08em; }
.office-left h3:first-child { margin-top: 0; }
.list-item { display: flex; align-items: center; gap: 6px; text-align: left; border: 1px solid transparent; background: none; color: var(--text); border-radius: 2px; padding: 6px 8px; cursor: pointer; font: inherit; }
.list-item:hover { background: rgba(34, 229, 255, .07); }
.list-item.active { border-color: var(--accent); background: rgba(34, 229, 255, .08); box-shadow: inset 3px 0 0 var(--accent); }
.list-item.off { opacity: .5; }
.st-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: #6b7894; }
.st-dot[data-status] { box-shadow: 0 0 6px currentColor; }
.st-dot[data-status=idle] { background: var(--ok); color: var(--ok); }
.st-dot[data-status=working] { background: var(--accent); color: var(--accent); }
.st-dot[data-status=thinking] { background: #a78bfa; color: #a78bfa; }
.st-dot[data-status=approval] { background: var(--warn); color: var(--warn); }
.st-dot[data-status=error] { background: var(--bad); color: var(--bad); }
.st-dot[data-status=done] { background: #12d6a0; color: #12d6a0; }
.st-dot[data-status=speaking] { background: var(--accent-2); color: var(--accent-2); }
.st-dot[data-status=tool] { background: #4d9dff; color: #4d9dff; }
.panel-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.office-right .tabs { margin-bottom: 0; }
.office-log { max-height: none; flex: 1; min-height: 160px; padding: 6px 2px; }
.office-right .chat-input { padding: 6px 0 0; border-top: 1px solid var(--border); }
.bubble .who { display: block; font-size: 12px; font-weight: 700; opacity: .85; margin-bottom: 2px; color: var(--brass); }
.panel-list { display: grid; gap: 6px; overflow-y: auto; }
.report-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.report-row .grow { flex: 1; min-width: 120px; }

/* 모바일: 좌우 패널은 화면 아래에서 올라오는 시트 */
@media (max-width: 899px) {
    .office-left, .office-right { position: absolute; left: 0; right: 0; bottom: 0; max-height: 62%; z-index: 20; border: 0; border-top: 1px solid var(--accent);
        border-radius: 10px 10px 0 0; box-shadow: 0 -6px 20px rgba(0,0,0,.5), var(--glow); transform: translateY(105%); transition: transform .2s ease; }
    .office-left.open, .office-right.open { transform: none; }
    .office-left:not(.open), .office-right:not(.open) { visibility: hidden; }
    .office-hint { white-space: normal; border-radius: 2px; }
}

.modal.modal-frame { max-width: 1100px; height: calc(100vh - 48px); height: calc(100dvh - 48px); display: flex; flex-direction: column; }
.modal.modal-frame.modal-wide { max-width: 1680px; }   /* 칸반: 다섯 칸이 다 보이게 */
.modal-frame iframe { flex: 1; width: 100%; border: 1px solid var(--border); border-radius: 2px; background: var(--bg); }

/* 오피스 목록·미리보기·캐릭터 미리보기 */
.office-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.map-preview { position: relative; height: 260px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: #0b1220; }
.map-preview canvas { display: block; width: 100%; height: 100%; }
.avatar-preview { width: 200px; height: 220px; border-radius: var(--radius); border: 1px solid var(--border); background: radial-gradient(circle at 50% 30%, #1d2a48, #0b1220 70%); }
.avatar-preview canvas { display: block; width: 100%; height: 100%; }

/* ── 4단계: 회의·Skill ─────────────────────────────────────────── */
.meeting-log { max-height: 55vh; min-height: 200px; border: 1px solid var(--border); border-radius: 2px; background: rgba(7, 11, 20, .5); }
ul.plain { margin: 0; padding-left: 18px; }
details.inbox-item > summary { cursor: pointer; list-style: revert; }
details.inbox-item > summary::marker { color: var(--accent); }

/* ── 5단계: 사용량 그래프·타임라인·관리자 열람 ───────────────────── */
.range-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.range-form .field { margin: 0; }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 160px; padding: 8px 0 0; border-bottom: 1px solid var(--brass); overflow-x: auto; }
.bars .bar { flex: 1 0 8px; min-width: 8px; display: flex; flex-direction: column-reverse; height: 100%; cursor: default; }
.bars .bar i { display: block; width: 100%; }
.bars .bar i.shared { background: linear-gradient(0deg, #0fa3b8, var(--accent)); box-shadow: 0 0 6px rgba(34, 229, 255, .4); }
.bars .bar i.own { background: var(--warn); }
.bars-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-family: var(--font-mono); }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 1px; margin-right: 4px; vertical-align: middle; }
.meter { height: 8px; border-radius: 1px; background: var(--bg-2); border: 1px solid var(--border); overflow: hidden; min-width: 60px; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--ok), var(--accent)); box-shadow: 0 0 6px rgba(60, 242, 154, .5); }
.readonly-banner { background: rgba(255, 176, 32, .08); color: var(--warn); border: 1px solid rgba(255, 176, 32, .55); border-radius: 2px; padding: 8px 12px; font-size: 14px; }
.timeline { overflow-x: auto; }
.timeline-inner { min-width: 680px; }
.tl-row { display: flex; align-items: stretch; height: 34px; border-bottom: 1px dashed var(--border); }
.tl-row.tl-head { height: 24px; border-bottom: 1px solid var(--brass); }
.tl-label { flex: 0 0 200px; max-width: 200px; padding: 0 8px; background: none; border: 0; text-align: left; cursor: pointer; color: var(--text);
    font: inherit; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 34px; }
.tl-label:hover { color: var(--accent); }
.tl-head .tl-label { line-height: 24px; color: var(--muted); cursor: default; }
.tl-track { position: relative; flex: 1; }
.tl-axis span { position: absolute; top: 4px; transform: translateX(-50%); white-space: nowrap; font-size: 12px; color: var(--muted); font-family: var(--font-mono); }
.tl-bar { position: absolute; top: 8px; height: 18px; border-radius: 1px; min-width: 4px; overflow: hidden; }
.tl-bar .tl-wait { display: block; height: 100%; background: rgba(255,255,255,.25); }
.tl-bar.TODO { background: #6b7894; } .tl-bar.READY { background: #0fa3b8; } .tl-bar.RUNNING { background: var(--accent-2); box-shadow: var(--glow-2); }
.tl-bar.BLOCKED { background: var(--bad); } .tl-bar.DONE { background: var(--ok); }
.tl-due { position: absolute; top: 4px; width: 2px; height: 26px; background: var(--warn); }
.tl-now { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--accent-2); opacity: .8; pointer-events: none; box-shadow: var(--glow-2); }
@media (max-width: 599px) { .tl-label { flex-basis: 120px; max-width: 120px; } .timeline-inner { min-width: 520px; } }

/* 데모(고용 전 시연) — Pages/Home/Demo.cshtml */
.demo-title { font-size: 15px; margin-right: 4px; font-family: var(--font-display); }
.demo-steps { display: flex; gap: 4px; overflow-x: auto; max-width: 100%; scrollbar-width: thin; }
.demo-step { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px 3px 4px; border-radius: 2px; border: 1px solid var(--border);
    background: var(--surface); color: var(--muted); font: inherit; font-size: 13px; white-space: nowrap; cursor: pointer; }
.demo-step .n { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 1px; background: var(--border); color: var(--text); font-size: 11px; font-weight: 700; font-family: var(--font-mono); }
.demo-step.done { color: var(--text); }
.demo-step.done .n { background: var(--ok); color: #03140b; }
.demo-step.active { border-color: var(--accent); color: var(--accent); font-weight: 700; box-shadow: var(--glow); }
.demo-step.active .n { background: var(--accent); color: var(--accent-text); }
.demo-rate { width: auto; min-height: 32px; padding: 2px 8px; }
/* 데모의 장면 안내는 위쪽에 둔다. 좁은 화면의 `.office-hint { bottom: 92px }` 가 뒤에 와서 bottom 을 되살리면 위·아래가 모두 걸려 세로로 길게 늘어난다 — 더 구체적인 선택자로 고정한다 */
.office-hint.demo-caption { top: 12px; bottom: auto; width: max-content; white-space: nowrap; }
.demo-explain { display: grid; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.demo-explain p { margin: 0; line-height: 1.55; }
.demo-report { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--ok); border-radius: 2px; background: rgba(60, 242, 154, .05); }
.demo-suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.demo-suggest .chip { padding: 4px 10px; border-radius: 2px; border: 1px solid var(--accent); background: transparent; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.demo-suggest .chip:hover { background: rgba(34, 229, 255, .1); box-shadow: var(--glow); }
.demo-suggest .chip:disabled { opacity: .5; cursor: default; }
@media (max-width: 899px) { .demo-step .t { display: none; } .demo-step.active .t { display: inline; } }

/* 움직임 줄이기 설정을 켠 사용자에게는 펄스·전환을 끈다 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .kcard:hover { transform: none; }
}

/* ── 턴테이블 노래 목록 (music-player.js, docs/턴테이블_음악.md) ── */
.music-modal { max-width: 620px; display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); }
.music-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.music-upload label.btn { cursor: pointer; }
.music-upload label.btn.disabled { opacity: .45; cursor: default; filter: grayscale(.6); pointer-events: none; }
.music-list { flex: 1 1 auto; min-height: 80px; max-height: 45vh; overflow-y: auto; border: 1px solid var(--border); border-radius: 2px; padding: 4px; background: var(--bg-2); }
.music-row { display: flex; align-items: center; gap: 6px; }
.music-row .list-item.grow { flex: 1; min-width: 0; }
.music-row.active .list-item { border-color: var(--brass); background: rgba(201, 164, 92, .1); box-shadow: inset 3px 0 0 var(--brass); }
.music-row .danger { color: var(--bad); }
.music-no { width: 2em; flex: none; text-align: right; color: var(--muted); font-family: var(--font-mono); }
.music-row.active .music-no { color: var(--brass); }
.music-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.music-bar { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid rgba(201, 164, 92, .35); padding-top: 8px; }
.music-now b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--brass); font-family: var(--font-display); }
.music-seek { display: flex; align-items: center; gap: 8px; }
.music-seek input[type=range] { flex: 1; min-width: 0; accent-color: var(--brass); }
.music-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.music-volume { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.music-volume input[type=range] { width: 110px; accent-color: var(--brass); }
.music-now-btn { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── claude.ai 프로젝트 초기설정 창 (js/project-setup.js, 0017) ───────────── */
.setup-modal { max-width: 760px; display: flex; flex-direction: column; gap: 10px; }
.setup-modal textarea[readonly], .setup-modal input[readonly] { font-family: var(--font-mono); font-size: 12.5px; }
.setup-steps { margin: 0; padding-left: 20px; line-height: 1.7; color: var(--muted); }
.setup-steps b { color: var(--text); }

/* ── 결과물 미리보기 창 (Artifacts.cshtml) — 본문만 스크롤 ───────────────── */
.artifact-preview { display: flex; flex-direction: column; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); }
.artifact-preview .md { overflow-y: auto; min-height: 0; flex: 1; }

/* ── 1:1 대화 도구: 업무로 등록 · 대화 삭제 (js/chat-actions.js) ───────────── */
.chat-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chat-card-modal { max-width: 760px; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow-y: auto; }
.office-chat-tools { display: flex; justify-content: flex-end; padding: 4px 0 6px; }

/* ── 칸반: 결과물 바로 보기 · 고쳐서 재시도 (Board.cshtml, 0018) ─────────── */
.artifact-inline { max-height: 360px; overflow-y: auto; margin-top: 4px; font-size: 13.5px; }
.revise-modal { max-width: 1100px; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow-y: auto; }
.revise-grid { align-items: start; }
.revise-grid .artifact-inline { max-height: 55vh; }

/* ── 대화 말풍선 「결과물로 저장」 (docs/대화_파일저장.md) ─────────────── */
.bubble .bubble-save { display: inline-block; margin-top: 4px; font-size: 12px; opacity: .8; }
.bubble .bubble-save:hover, .bubble .bubble-save:focus-visible { opacity: 1; }

/* ── 다이어리 (docs/다이어리_일정_연동기획서.md) — 월요일 시작 월 달력 ───────── */
.diary-head { flex-wrap: wrap; gap: 8px; }
.diary-month { margin: 0 6px; font-size: 18px; min-width: 7.5em; text-align: center; }
.diary-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.diary-dow { text-align: center; font-size: 12px; color: var(--muted); padding: 4px 0; }
.diary-dow:nth-child(6), .diary-dow:nth-child(7) { color: var(--accent-2); }
.diary-cell { min-height: 84px; display: flex; flex-direction: column; gap: 2px; align-items: stretch; text-align: left; padding: 4px; min-width: 0;
    background: var(--surface-2); border: 1px solid var(--border); border-radius: 2px; color: var(--text); font: inherit; cursor: pointer; overflow: hidden; }
.diary-cell:hover, .diary-cell:focus-visible { border-color: var(--accent); }
.diary-cell.other { opacity: .45; }
.diary-cell.weekend .diary-day { color: var(--accent-2); }
.diary-cell.today { box-shadow: var(--glow); border-color: var(--accent); }
.diary-cell.selected { outline: 1px solid var(--accent); background: var(--surface); }
.diary-day { font-size: 12px; font-weight: 700; }
.diary-chip { font-size: 11px; line-height: 1.35; padding: 0 4px; border-radius: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    border-left: 3px solid var(--diary-c, var(--accent)); background: rgba(255, 255, 255, .04); }
.diary-more { font-size: 11px; color: var(--muted); }
.diary-list { display: grid; gap: 6px; }
.diary-row { display: flex; gap: 10px; align-items: baseline; text-align: left; width: 100%; padding: 8px 10px; cursor: pointer; font: inherit; color: var(--text);
    background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--diary-c, var(--accent)); border-radius: 2px; }
.diary-row:hover, .diary-row:focus-visible { border-color: var(--accent); }
.diary-when { flex: none; min-width: 6.5em; font-variant-numeric: tabular-nums; color: var(--muted); }
.diary-row .grow { min-width: 0; flex: 1; }
.c-primary { --diary-c: var(--accent); }
.c-accent { --diary-c: var(--accent-2); }
.c-good { --diary-c: var(--ok); }
.c-warn { --diary-c: var(--warn); }
.c-danger { --diary-c: var(--bad); }
.diary-modal { max-width: 640px; }
.diary-modal fieldset { border: 1px solid var(--border); border-radius: 2px; padding: 8px 12px; display: grid; gap: 8px; }
@media (max-width: 600px) {
    .diary-cell { min-height: 56px; padding: 2px; }
    .diary-chip { font-size: 0; height: 5px; padding: 0; border-left-width: 0; background: var(--diary-c, var(--accent)); }
    .diary-month { font-size: 16px; min-width: 6em; }
}

/* ── 「도구」 이용자 키 (0020, docs/SNS게시_SnsHub연동기획서.md) ── */
.tool-key { flex-wrap: wrap; gap: 8px; align-items: center; }
.bad-text { color: var(--bad); }

/* ── 오피스 상주 O2 (docs/오피스상주_기획서.md): 상단 메뉴 화면을 오피스 위에 열고 3D 는 오른쪽 아래 미니 창 ── */
.resident-toggle, .done-sound-toggle, .report-tts-toggle, .llm-switch-toggle, .gfx-quality { font-size: 13px; white-space: nowrap; }
.gfx-quality select { font-size: 12px; padding: 2px 4px; width: auto; }
.llm-switch-toggle.off { color: var(--bad); }
.resident-page-area { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--bg); }
.resident-page-area iframe { display: block; width: 100%; height: 100%; border: 0; background: var(--bg); }
.office.resident-page .office-stage { position: fixed; right: 16px; bottom: 16px; width: 320px; height: 200px; z-index: 45;
    border: 1px solid var(--accent); border-radius: var(--radius); box-shadow: var(--glow), var(--shadow); }
.office.resident-page.mini-collapsed .office-stage { height: 32px; }
.office.resident-page .office-hint, .office.resident-page .office-help, .office.resident-page .npc-bubble { display: none; }
.office.resident-page .npc-tag { font-size: 9px; padding: 0 3px; }
.mini-bar { position: absolute; top: 0; left: 0; right: 0; height: 32px; z-index: 3; display: flex; align-items: center; gap: 6px; padding: 0 6px;
    background: rgba(8, 13, 25, .94); border-bottom: 1px solid var(--border); font-size: 12px; }
.mini-bar .mini-title { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--accent); }
.mini-catch { position: absolute; left: 0; right: 0; top: 32px; bottom: 0; z-index: 2; background: transparent; border: 0; cursor: zoom-in; }
.office.resident-mobile .office-stage { visibility: hidden; }
.resident-return { position: fixed; right: 16px; bottom: 16px; z-index: 46; box-shadow: var(--glow); }

/* ── 메일 (docs/메일.md) ─────────────────────────────────────────────── */
.mail-head { flex-wrap: wrap; gap: 8px; }
.mail-head select { max-width: 100%; min-width: 0; }
.mail-list { display: grid; gap: 4px; }
.mail-row { display: flex; gap: 10px; align-items: baseline; text-align: left; width: 100%; min-width: 0; padding: 8px 10px; cursor: pointer; font: inherit; color: var(--text);
    background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: 2px; }
.mail-row:hover, .mail-row:focus-visible { border-color: var(--accent); }
.mail-row.unread { border-left-color: var(--accent); font-weight: 700; }
.mail-when { flex: none; min-width: 4.5em; font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 400; }
.mail-from { flex: none; width: 11em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-subject { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-modal { max-width: 860px; }
.mail-modal fieldset { border: 1px solid var(--border); border-radius: 2px; padding: 8px 12px; display: grid; gap: 8px; min-width: 0; }
.mail-meta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; margin: 0 0 8px; font-size: 13px; }
.mail-meta dt { color: var(--muted); }
.mail-meta dd { margin: 0; overflow-wrap: anywhere; }
.mail-frame { width: 100%; height: 55vh; border: 1px solid var(--border); border-radius: 2px; background: #fff; }
.mail-text { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 55vh; overflow: auto; margin: 0; padding: 12px; font: inherit;
    background: var(--surface-2); border: 1px solid var(--border); border-radius: 2px; }
.mail-accounts { display: grid; gap: 6px; margin-bottom: 12px; }
.mail-account { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 2px; }
.mail-account .grow { min-width: 0; flex: 1 1 14em; overflow-wrap: anywhere; }
.mail-port { width: 6.5em; flex: none; }
.mail-modal .row > input[type="text"] { flex: 1; min-width: 0; }
@media (max-width: 600px) {
    .mail-row { flex-wrap: wrap; gap: 2px 8px; }
    .mail-from { width: auto; flex: 1; min-width: 0; }
    .mail-subject { flex: 1 0 100%; white-space: normal; }
}
.mail-modal .form { max-width: none; }
.mail-account b { margin-right: 6px; }

/* ── 다이어리 알림 설정(텔레그램) (docs/텔레그램_알람.md) ─────────────────── */
.diary-notify { max-width: 560px; }
.diary-notify fieldset { border: 1px solid var(--border); border-radius: 2px; padding: 8px 12px; display: grid; gap: 8px; min-width: 0; margin-bottom: 10px; }
.diary-notify ol { margin: 0; padding-left: 1.3em; display: grid; gap: 4px; }
.diary-notify .row > input[type="text"] { flex: 1; min-width: 0; }
.diary-channel { max-width: 11em; }

/* ── 직원 기본업무(자동업무) (docs/기본업무.md) ──────────────────────── */
.duty-group { border: 1px solid var(--border); border-radius: 2px; padding: 10px 12px; display: grid; gap: 10px; min-width: 0; }
.duty-card { display: grid; gap: 8px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 2px; min-width: 0; }
.duty-card .grow { flex: 1 1 14em; min-width: 0; }
.duty-card p { margin: 0; overflow-wrap: anywhere; }
.duty-group .form { max-width: none; }
/* 사이트 모니터링: 캡처한 화면(실행 기록·미리보기) — 폭에 맞춰 줄이고 테두리만 */
.site-shot { display: block; max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 2px; margin-top: 8px; }
.site-row .grow { flex: 1 1 14em; min-width: 0; overflow-wrap: anywhere; }
/* 캡처한 화면 보기: 작은 그림(Inbox·캡처 목록) → 누르면 크게 보기 창(shot-viewer.js) */
.site-shot.zoomable, .shot-thumb { cursor: zoom-in; }
.shot-thumb { display: block; max-width: min(320px, 100%); max-height: 150px; object-fit: cover; object-position: left top; border: 1px solid var(--border); border-radius: 2px;
    background: var(--surface-2); margin-top: 6px; }
.shot-thumb:hover, .shot-thumb:focus-visible, .site-shot.zoomable:hover { border-color: var(--accent); box-shadow: var(--glow); outline: none; }
.shot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.shot-cell { display: grid; gap: 4px; align-content: start; min-width: 0; overflow-wrap: anywhere; }
.shot-cell .shot-thumb { width: 100%; max-width: 100%; height: 120px; max-height: none; margin-top: 0; }
/* z-index: 펫(210)·펫 대화창(220)보다 위 — 창의 버튼을 펫이 가리지 않게 */
.shot-viewer { position: fixed; inset: 0; z-index: 230; display: grid; grid-template-rows: auto minmax(0, 1fr); background: rgba(2, 5, 12, .94); }
.shot-viewer-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--surface); }
.shot-viewer-bar .grow { flex: 1 1 10em; min-width: 0; overflow-wrap: anywhere; }
.shot-viewer-body { overflow: auto; padding: 12px; text-align: center; }
.shot-viewer-body img { max-width: 100%; height: auto; border: 1px solid var(--border); cursor: zoom-in; }
.shot-viewer.actual .shot-viewer-body { text-align: left; }
.shot-viewer.actual .shot-viewer-body img { max-width: none; cursor: zoom-out; }
.duty-group tr.clickable { cursor: pointer; }
.duty-group tr.clickable:hover td { background: var(--surface-2); }
.inbox-report { white-space: pre-wrap; overflow-wrap: anywhere; }
.duty-card .field { align-content: start; }
/* 누를 수 있는 말풍선(기본업무 보고): 누르면 Inbox 의 그 보고를 연다 */
.npc-bubble.link { pointer-events: auto; cursor: pointer; max-width: 260px; border-color: var(--accent-2); }
.npc-bubble.link::after { content: " ▸ 눌러서 보기"; color: var(--accent); font-size: 12px; white-space: nowrap; }
.npc-bubble.link:hover { background: var(--surface-2); }
.fax-reception-bubble { pointer-events: none; white-space: nowrap; max-width: min(290px, 85vw); border-color: #9cff57; }
.office.resident-page .fax-reception-bubble:not([hidden]) { display: block; }
.phone-bubble { pointer-events: none; white-space: nowrap; max-width: min(290px, 85vw); border-color: #4dabf7; }
.office.resident-page .phone-bubble:not([hidden]) { display: block; }
/* 전화 창(0071, js/office/phone.js): 오피스 셸 위에 떠 있어 다른 화면을 열어도 통화가 이어진다. 펫(210)·펫 창(220)보다 위 */
.phone-panel { position: fixed; right: 16px; top: 64px; z-index: 230; width: 320px; max-width: calc(100vw - 32px); max-height: calc(100vh - 96px); overflow-y: auto;
    background: var(--corners), var(--surface); border: 1px solid var(--accent-2); box-shadow: var(--glow-2); display: grid; gap: 8px; }
.phone-panel[hidden] { display: none; }
.phone-panel .card-head { display: flex; align-items: center; gap: 8px; }
.phone-panel .card-head h2 { margin: 0; flex: 1; }
.phone-status { margin: 0; font-weight: 600; color: var(--accent); }
.phone-peer { margin: 0; min-height: 1.2em; }
.phone-row select, .phone-row input { width: 100%; box-sizing: border-box; }
.phone-dest { font-family: var(--font-mono); font-size: 18px; letter-spacing: 1px; }
.phone-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.phone-pad .btn { font-size: 16px; padding: 8px 0; }
.phone-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.phone-actions .btn[hidden] { display: none; }
.phone-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 180px; overflow-y: auto; font-size: 13px; }
@media (max-width: 600px) { .phone-panel { top: auto; bottom: 16px; right: 16px; left: 16px; width: auto; } }
.inbox-item.focus { border-color: var(--accent-2); box-shadow: var(--glow-2); }
/* 주기 만들기(duty-schedule.js): 반복 방식·간격·시각을 고르는 묶음 — 기본업무 탭·크론 화면 */
.duty-sched { display: grid; gap: 8px; padding: 10px 12px; border: 1px dashed var(--border); border-radius: 2px; background: var(--bg-2); min-width: 0; }
.sched-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.sched-row > label:not(.check), .sched-row > .sched-label { font-weight: 600; font-size: 13px; color: #cfd8ec; min-width: 4.5em; }
.duty-sched select, .duty-sched input[type=number], .duty-sched input[type=time] { width: auto; max-width: 100%; flex: 0 1 auto; }
.duty-sched input.sched-minute { width: 5.5em; }
.duty-sched input.duty-cron { flex: 1 1 10em; min-width: 0; width: auto; }
.duty-sched input[type=time] { color-scheme: dark; }
.sched-summary { margin: 0; overflow-wrap: anywhere; }
.sched-summary .sched-arrow, .sched-summary .sched-text { color: var(--accent); }
.sched-summary .sched-expr { margin-left: 6px; opacity: .75; }

/* ── 3D 오피스 「지금 하는 일」 패널 (docs/3D오피스.md): 3D 화면 안 왼쪽 아래에 겹쳐 놓는다 — 스테이지 크기를 바꾸지 않는다 ── */
.office-activity { position: absolute; left: 12px; bottom: 12px; z-index: 4; width: min(380px, calc(100% - 24px)); max-height: 46%; display: flex; flex-direction: column;
    background: rgba(8, 13, 25, .93); color: var(--text); border: 1px solid rgba(34, 229, 255, .4); border-radius: 2px; box-shadow: 0 2px 10px rgba(0,0,0,.5); font-size: 13px; }
.act-head { display: flex; align-items: center; gap: 6px; width: 100%; padding: 6px 10px; background: transparent; border: 0; color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.act-head b { color: var(--brass); white-space: nowrap; }
.act-brief { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.act-toggle { margin-left: auto; color: var(--accent); font-size: 12px; white-space: nowrap; }
.act-body { overflow-y: auto; padding: 0 10px 8px; display: grid; gap: 8px; }
.act-body > p { margin: 0; }
.act-item { display: grid; gap: 2px; min-width: 0; padding-top: 6px; border-top: 1px solid var(--border); }
.act-title { text-align: left; overflow-wrap: anywhere; }
.act-turn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; color: #cfd8ec; padding-left: 12px; }
.act-turn.open { white-space: pre-wrap; overflow-wrap: anywhere; }
.act-turn.system { color: var(--muted); }
.act-turn b { color: var(--accent); font-weight: 600; margin-right: 4px; }
.act-turn:hover, .act-turn:focus-visible { background: rgba(34, 229, 255, .06); outline: none; }
.act-now { color: #ffc6e0; cursor: default; }
.act-now b { color: var(--accent-2); }
.act-log { font-family: var(--font-mono); font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 12px; }
.office.resident-page .office-activity, .office.resident-mobile .office-activity { display: none; }
/* 「예약된 업무」: 「지금 하는 일」과 같은 모양으로 오른쪽 아래. 두 패널이 겹치지 않게 폭을 줄인다 */
.office-upcoming { left: auto; right: 12px; width: clamp(220px, calc(100% - 416px), 340px); }
.office-upcoming .act-body { gap: 0; }
.up-item { display: grid; gap: 2px; width: 100%; min-width: 0; padding: 6px 2px; background: transparent; border: 0; border-top: 1px solid var(--border); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.up-item:hover, .up-item:focus-visible { background: rgba(34, 229, 255, .08); outline: none; }
.up-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-meta { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-when { color: var(--accent); font-family: var(--font-mono); }
.up-when.soon { color: var(--accent-2); }
/* 다른 화면에서 「이 항목」으로 바로 들어왔을 때 그 줄을 잠깐 강조한다(?edit= · ?duty= · ?post=) */
.focus-flash { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: var(--glow); }
.mini-ticker { color: var(--text); }
.panel-now { text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.npc-tag[data-status=tool] { border-color: var(--brass); color: #f0dcae; }
.npc-tag .npc-sub { display: block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; font-weight: 400; font-size: 10px; opacity: .85; }
.office.resident-page .npc-tag .npc-sub { display: none; }
.npc-tag .npc-sub.link { text-decoration: underline; cursor: pointer; opacity: 1; }
@media (max-width: 899px) {
    .office-activity { left: 8px; bottom: 8px; width: calc(100% - 16px); max-height: 50%; }
    /* 좁은 화면: 「예약된 업무」는 「지금 하는 일」의 접힌 머리 바로 위에. 「지금 하는 일」을 펼치면 가려지므로 숨긴다 */
    .office-upcoming { left: 8px; right: 8px; bottom: 44px; width: auto; max-height: 44%; }
    .office-activity:not(.collapsed):not(.office-upcoming) ~ .office-upcoming { display: none; }
    .office-hint { bottom: 92px; }
}

/* 음악 결과물 재생기 (docs/음악생성.md) */
.artifact-audio audio { width: 100%; max-width: 560px; }
.artifact-audio.row { flex-wrap: wrap; }
.artifact-audio.row audio { flex: 1 1 260px; min-width: 0; height: 36px; }

/* SNS 예약 초안에 붙은 파일 (docs/SNS미디어첨부.md) */
.sns-attach { display: grid; gap: 6px; justify-items: start; }
.sns-candidates { display: grid; gap: 6px; justify-items: start; }
.sns-candidate { display: grid; gap: 4px; justify-items: start; padding: 6px; border: 1px solid var(--border); max-width: 220px; }
.sns-candidate.current { border-color: var(--accent); }
.sns-candidate-media { display: block; max-width: 100%; max-height: 180px; background: var(--bg); }
.sns-attach-image, .sns-attach-video { display: block; max-width: min(100%, 360px); max-height: 360px; border: 1px solid var(--border); background: var(--bg); }

/* 이미지·영상 결과물 (docs/이미지영상생성.md) — 창·카드 안에 맞춰 줄인다(원래 크기는 새 창) */
.artifact-visual img, .artifact-visual video { display: block; max-width: 100%; max-height: 62vh; border: 1px solid var(--border); background: var(--bg); }
.artifact-preview .artifact-visual { overflow-y: auto; min-height: 0; flex: 1; }

/* 진행 중인 작업 표시 (docs/진행중작업_표시.md) — 떠 있는 카드. 레이아웃을 건드리지 않는다(position: fixed). 왼쪽 아래 — 오른쪽 아래는 펫 버튼·3D 미니 창이 쓴다 */
.vo-work { position: fixed; left: 16px; bottom: 16px; z-index: 205; width: 340px; max-width: calc(100vw - 92px); max-height: 46vh; overflow-y: auto;
    background: var(--corners), rgba(8, 13, 25, .96); border: 1px solid var(--accent-2); border-radius: 2px; box-shadow: var(--glow-2); font-size: 13px; }
.vo-work-head { display: flex; align-items: center; gap: 6px; width: 100%; padding: 6px 10px; background: none; border: 0; color: var(--text); cursor: pointer; text-align: left; font: inherit; }
.vo-work-head b { color: var(--brass); flex: none; }
.vo-work-brief { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.vo-work-toggle { margin-left: auto; flex: none; color: var(--accent-2); font-size: 12px; }
.vo-work-row { display: block; padding: 6px 10px 8px; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; }
a.vo-work-row:hover { background: rgba(53, 224, 255, .07); }
.vo-work-line { display: flex; align-items: center; gap: 6px; }
.vo-work-icon { flex: none; }
.vo-work-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.vo-work-sub { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; margin-top: 2px; }
.vo-work-note { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vo-work-time { flex: none; font-family: var(--font-mono); }
.vo-work-row.failed .vo-work-note { color: var(--bad); white-space: normal; }
.vo-work-bar { height: 4px; margin-top: 5px; background: var(--bg-2); border: 1px solid var(--border); overflow: hidden; }
.vo-work-bar span { display: block; height: 100%; background: var(--accent-2); transition: width 1s linear; }
.vo-work-bar.unknown span, .vo-work-row.queued .vo-work-bar span { opacity: .45; animation: vo-work-pulse 1.4s ease-in-out infinite; }
@keyframes vo-work-pulse { 0%, 100% { opacity: .25; } 50% { opacity: .7; } }
@media (prefers-reduced-motion: reduce) { .vo-work-bar span { transition: none; animation: none; } }
/* 3D 오피스 「지금 하는 일」 패널 안의 같은 줄 */
.act-work .vo-work-bar { margin: 4px 0 0 14px; }
/* 자료실 (docs/자료실.md) */
.library-group.selected { border-color: var(--accent); box-shadow: var(--glow); }
.library-group .library-group-open { text-align: left; }
.library-image { display: block; max-width: 100%; max-height: 46vh; border: 1px solid var(--border); background: var(--bg); margin-bottom: 8px; }
pre.library-text { background: #050810; color: var(--text); padding: 10px; border-radius: 2px; border: 1px solid var(--border); white-space: pre-wrap; overflow-wrap: anywhere;
    font-size: 13px; max-height: 46vh; overflow-y: auto; margin: 0; }
.library-item .tag { margin-left: 6px; }
.library-picker .check { min-width: 0; overflow-wrap: anywhere; }
.library-chat-modal { max-width: 520px; text-align: left; }

/* 글 + 차트 그림(rich-text.js — docs/차트문서.md): 직원이 글에 적은 ```chart 블록을 서버가 그린 그림. 그림 바탕은 흰색(PDF 와 같은 그림)이다 */
.chart-block { display: block; margin: 8px 0; white-space: normal; }
.chart-img { display: block; max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.chart-raw { display: block; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-mono); font-size: 12px; color: var(--muted); border-left: 2px solid var(--border); padding-left: 8px; }
/* 직원이 HTML 로 꾸민 블록(rich-text.js) — 격리 창. 크게 보기는 화면 가득 덮개 */
.html-block-wrap { display: block; margin: 8px 0; white-space: normal; }
.html-block { display: block; width: 100%; height: 160px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.html-block-bar { display: flex; gap: 6px; margin-top: 4px; }
.html-block-wrap.big { position: fixed; inset: 3vh 3vw; z-index: 2000; margin: 0; padding: 8px; display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--accent); box-shadow: var(--glow), 0 0 0 100vmax rgba(0, 0, 0, .6); }
.html-block-wrap.big .html-block { flex: 1; height: auto !important; }
.html-block-wrap.big .chart-raw { max-height: 30vh; overflow: auto; }
.artifact-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; white-space: normal; }

/* ── 4단계 회의 · 3D 회의실 (docs/회의_4단계_3D회의실.md) ── */
.meeting-stage { margin: 4px 0 10px; }
.meeting-steps { margin-bottom: 8px; }
.meeting-stage-status { margin-right: auto; }
.meeting-rediscuss { margin-top: 8px; }
.mroom { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; gap: 8px; padding: 10px var(--gutter); }
.mroom-top .card-head { margin-bottom: 6px; }
.mroom-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 10px; background: rgba(10, 16, 30, .92); border: 1px solid var(--border); border-radius: 2px; }
.mroom-slider { flex: 1; min-width: 120px; width: auto; padding: 0; accent-color: var(--accent); }
.mroom-count { font-family: var(--font-mono); white-space: nowrap; }
/* 3D 회의실(왼쪽) + 대화창(오른쪽). 높이는 화면에 남는 만큼 — 대화창은 그 안에서만 스크롤한다 */
.mroom-main { display: flex; gap: 8px; flex: 1 1 0; min-height: min(56vh, 600px); }
.mroom-stage { position: relative; flex: 1 1 auto; min-width: 0; overflow: hidden; background: #070b14; border: 1px solid var(--border); border-radius: 2px; }
.mroom-canvas { position: absolute; inset: 0; }
/* 안내판은 왼쪽 위 — 가운데 위는 뒤 줄(의장) 머리 위 말풍선 자리다 */
.mroom-board { position: absolute; left: 10px; top: 10px; width: max-content; max-width: min(360px, calc(100% - 20px)); display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
    padding: 8px 14px; background: rgba(8, 13, 25, .9); border: 1px solid rgba(34, 229, 255, .45); border-radius: 2px; box-shadow: var(--glow); }
.mroom-board-title { color: var(--accent); font-family: var(--font-display); }
.mroom-board-agenda { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mroom-board-status { font-size: 12px; color: var(--muted); }
.mroom-board-status i { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--muted); }
.mroom-board-status i.on { background: var(--accent-2); box-shadow: 0 0 8px var(--accent-2); }
.mroom-video { position: absolute; z-index: 2; top: 12%; left: 50%; width: min(52%, 560px); aspect-ratio: 16 / 9; transform: translateX(-50%); background: var(--bg); border: 6px solid var(--surface-2); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.mroom-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.mroom-video-edit { position: absolute; right: 4px; bottom: 4px; opacity: .82; }
.mroom-video-editor { position: absolute; z-index: 5; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .58); }
.mroom-video-editor .card { width: min(100%, 520px); margin: 0; }
.mroom-video-editor input { width: 100%; }
.mroom-log { flex: 0 0 400px; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: rgba(10, 16, 30, .92); border: 1px solid var(--border); border-radius: 2px; }
.mroom-log-list { flex: 1 1 0; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.mroom-turn { border: 1px solid var(--border); max-width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.mroom-turn.user { align-self: flex-end; }
.mroom-turn.focus { border-color: var(--seat-color, var(--accent)); border-left-color: var(--seat-color, var(--accent)); box-shadow: 0 0 10px var(--seat-color, var(--accent)); }
.mroom-say { flex: none; padding: 8px 10px; border-top: 1px solid var(--border); }
/* 오피스 상주 안에서 열렸을 때: 접힌 3D 미니 창의 제목 줄(아래 16px + 높이 32px)이 대화창 아래를 덮지 않게 */
.mroom.in-resident .mroom-log { padding-bottom: 56px; }
.room-tag { border-color: var(--seat-color, rgba(34, 229, 255, .45)); max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.room-tag[data-status=speaking] { border-color: var(--seat-color); box-shadow: 0 0 12px var(--seat-color); }
.room-bubble { pointer-events: none; }
@media (max-width: 899px) {
    .mroom { padding: 8px; }
    .mroom-main { flex-direction: column; flex: none; min-height: 0; }
    .mroom-stage { flex: none; height: 46vh; min-height: 240px; }
    .mroom-log { flex: none; max-height: 70vh; }
    .mroom-log-list { flex: 0 1 auto; max-height: 46vh; }
    .mroom-board { display: none; }   /* 좁은 화면: 머리 위 말풍선과 겹친다 — 같은 내용이 위의 단계 탭·상태 줄에 있다 */
    .mroom-video { top: 10%; width: min(72%, 420px); border-width: 4px; }
    .room-tag { max-width: 110px; }
}
/* 오피스에서 회의실을 눌렀을 때의 창: 화면을 거의 다 채운다(전용 장면으로 「전환」) */
.modal-back.modal-room-back { padding: 8px; }
.modal.modal-frame.modal-room { max-width: none; height: calc(100vh - 16px); height: calc(100dvh - 16px); padding: 10px; }
