:root {
  --bg: #F5F6F8; --surface: #FFFFFF; --line: #E4E7EC; --line-strong: #D0D5DD;
  --text: #111827; --text-2: #344054; --muted: #475467; --faint: #667085; --soft: #F2F4F7; --softer: #F9FAFB;
  --accent: #3454D1; --accent-dark: #22389A; --accent-bg: #EEF1FB; --accent-bg-2: #F5F7FF;
  --claude: #C2410C; --claude-bg: #FFF1E8; --gpt: #0B7A5C; --gpt-bg: #E9F7F2;
  --ok: #12B76A; --ok-text: #05603A; --ok-bg: #ECFDF3;
  --warn-text: #8A4B00; --warn-bg: #FEF6E7; --err-text: #B42318; --err-bg: #FEF3F2;
  --mono: ui-monospace, "Cascadia Code", Consolas, "D2Coding", monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: Pretendard, Inter, "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  font-size: 14px; line-height: 1.5; -webkit-text-size-adjust: 100%;
}
[hidden] { display: none !important; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.55; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: var(--accent); } a:hover { color: var(--accent-dark); }
.grow { flex: 1 1 0; }
.muted { color: var(--muted); } .small { font-size: 12px; }

/* 공통 부품 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 14px;
  border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-size: 13px; font-weight: 600;
}
.btn:hover:not(:disabled) { background: var(--softer); }
.btn.primary { border-color: transparent; background: var(--accent); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--accent-dark); }
.btn.big { min-height: 44px; border-radius: 10px; font-size: 14px; }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: 12.5px; font-weight: 500; border-color: var(--line); color: var(--text-2); }
.btn.danger { color: var(--err-text); }
.icon-btn { width: 44px; height: 44px; border-radius: 10px; border: none; background: transparent; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--soft); }
.label { font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: 0.04em; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: var(--soft); color: var(--text-2); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #98A2B3; }
.pill.on { background: var(--ok-bg); color: var(--ok-text); } .pill.on .dot { background: var(--ok); }
.pill.off { background: var(--err-bg); color: var(--err-text); } .pill.off .dot { background: var(--err-text); }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--soft); }
.seg.full { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg-btn { min-height: 34px; padding: 0 12px; border-radius: 7px; border: none; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; }
.seg-btn.on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(16,24,40,0.08); }
.mark { display: inline-block; width: 10px; height: 10px; flex: none; }
.mark.claude { border-radius: 3px; background: var(--claude); }
.mark.codex { border-radius: 50%; background: var(--gpt); }
.mark.sm { width: 8px; height: 8px; } .mark.sm.claude { border-radius: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip.claude { background: var(--claude-bg); color: #9A3412; }
.chip.codex { background: var(--gpt-bg); color: #075E46; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag.run { background: var(--accent-bg); color: var(--accent-dark); }
.tag.wait { background: var(--warn-bg); color: var(--warn-text); }
.tag.idle { background: var(--soft); color: var(--text-2); }
.tag.ok { background: var(--ok-bg); color: var(--ok-text); }
.tag.err { background: var(--err-bg); color: var(--err-text); }
.bar { height: 8px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; }
.bar.claude > i { background: var(--claude); } .bar.codex > i { background: var(--gpt); }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); animation: blink 1.2s infinite both; }
.dots i:nth-child(2) { animation-delay: 0.2s; } .dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dots i { animation: none; } }

/* 등록 화면 */
.gate { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.gate-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 14px; padding: 28px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.gate-card h1 { margin: 6px 0 0; font-size: 20px; letter-spacing: -0.01em; }
.gate-card p { margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.field input { min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 400; font-size: 15px; }
.error { color: var(--err-text); font-size: 13px; min-height: 18px; }

/* 상단 */
#app { height: 100%; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 14px; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--line); min-height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -0.01em; white-space: nowrap; }
.logo { width: 28px; height: 28px; border-radius: 8px; background: var(--text); display: inline-flex; align-items: center; justify-content: center; gap: 0; }
.logo i { width: 9px; height: 9px; border-radius: 50%; border: 1.6px solid #fff; margin: 0 -1px; }
.top-stat { font-size: 13px; color: var(--muted); white-space: nowrap; } .top-stat strong { color: var(--text); }
.me { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 8px; border: none; border-radius: 10px; background: transparent; font-size: 13px; font-weight: 600; }
.me:hover { background: var(--soft); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: #E0E7FF; color: var(--accent-dark); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }
.only-narrow { display: none; }

/* 본문 */
.body { flex: 1 1 0; min-height: 0; display: flex; position: relative; }
.side { width: 284px; flex: none; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; padding: 16px 14px; overflow-y: auto; }
.side-sec { display: flex; flex-direction: column; gap: 8px; }
.side > * { flex-shrink: 0; }
.grow-sec { flex: 1 0 auto; min-height: 120px; }
.model-list { display: flex; flex-direction: column; gap: 4px; }
.model-group { font-size: 11.5px; color: var(--faint); padding: 4px 2px 0; }
.model { min-height: 50px; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; gap: 10px; text-align: left; width: 100%; }
.model:hover { background: var(--softer); }
.model.on { border: 1.5px solid var(--accent); background: var(--accent-bg-2); padding: 6.5px 9.5px; }
.model .names { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.model .n { font-size: 13.5px; font-weight: 600; } .model .d { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.model .check { color: var(--accent); flex: none; visibility: hidden; } .model.on .check { visibility: visible; }
.row-field { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--text-2); padding-top: 4px; }
.row-field select { min-height: 36px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); }
.search { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 10px; border-radius: 8px; background: var(--soft); color: var(--muted); }
.search input { flex: 1 1 0; min-width: 0; border: none; background: transparent; outline: none; font-size: 13px; color: var(--text); }
.conv-list { display: flex; flex-direction: column; gap: 2px; }
.conv-day { font-size: 11.5px; color: var(--faint); padding: 8px 4px 2px; }
.conv { display: flex; align-items: center; gap: 4px; border-radius: 8px; }
.conv:hover { background: var(--softer); } .conv.on { background: var(--accent-bg); }
.conv-open { flex: 1 1 0; min-width: 0; min-height: 42px; padding: 6px 4px 6px 10px; border: none; background: transparent; display: flex; align-items: center; gap: 8px; text-align: left; border-radius: 8px; }
.conv-open .marks { display: inline-flex; gap: 2px; flex: none; min-width: 8px; }
.conv-open .t { flex: 1 1 0; min-width: 0; font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv.on .t { font-weight: 600; color: var(--text); }
.conv-del { width: 32px; height: 32px; flex: none; border: none; background: transparent; border-radius: 7px; color: var(--faint); opacity: 0; display: inline-flex; align-items: center; justify-content: center; }
.conv:hover .conv-del, .conv-del:focus-visible, .conv.on .conv-del { opacity: 1; }
.conv-del:hover { background: var(--line); color: var(--err-text); }
.empty { font-size: 12.5px; color: var(--faint); padding: 10px 4px; }
.side-foot { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.acct { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.acct .dot { width: 8px; height: 8px; border-radius: 50%; background: #98A2B3; flex: none; }
.acct.ok .dot { background: var(--ok); } .acct.bad .dot { background: var(--err-text); }
.acct .s { font-weight: 600; } .acct.ok .s { color: var(--ok-text); } .acct.bad .s { color: var(--err-text); }

/* 채팅 */
.chat { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.chat-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 24px; border-bottom: 1px solid var(--line); background: #FAFBFC; min-height: 58px; }
.chat-head h1 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.messages { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 22px; }
.welcome { margin: auto; max-width: 460px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 8px; }
.welcome h2 { margin: 0; font-size: 20px; color: var(--text); letter-spacing: -0.01em; }
.turn { display: flex; flex-direction: column; gap: 14px; }
.user-row { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.bubble { max-width: min(640px, 88%); padding: 11px 15px; border-radius: 14px 14px 4px 14px; background: var(--text); color: #fff; font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.user-meta { font-size: 11.5px; color: var(--faint); }
.replies { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.replies.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.reply { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.replies:not(.two) .reply { max-width: 820px; }
.replies.two .reply { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.reply-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.reply-head strong { color: var(--text); font-size: 13px; }
.reply-body { font-size: 14.5px; color: #1F2937; overflow-wrap: anywhere; min-width: 0; }
.reply-status { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--text-2); align-self: flex-start; }
.reply-error { padding: 10px 14px; border-radius: 10px; background: var(--err-bg); color: var(--err-text); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.reply-actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* 마크다운 */
.md > :first-child { margin-top: 0; } .md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 10px; } .md ul, .md ol { margin: 0 0 10px; padding-left: 22px; } .md li { margin: 2px 0; }
.md h1, .md h2, .md h3, .md h4 { margin: 16px 0 8px; line-height: 1.35; letter-spacing: -0.01em; }
.md h1 { font-size: 19px; } .md h2 { font-size: 17px; } .md h3 { font-size: 15.5px; } .md h4 { font-size: 14.5px; }
.md code { font-family: var(--mono); font-size: 0.9em; padding: 1px 5px; border-radius: 5px; background: var(--soft); }
.md pre { position: relative; margin: 0 0 10px; padding: 14px 16px; border-radius: 10px; background: #0F172A; color: #E2E8F0; overflow-x: auto; }
.md pre code { padding: 0; background: transparent; font-size: 12.5px; line-height: 1.6; white-space: pre; display: block; }
.md pre .copy { position: absolute; top: 6px; right: 6px; min-height: 28px; padding: 0 9px; border-radius: 6px; border: 1px solid #334155; background: #1E293B; color: #CBD5E1; font-size: 11.5px; }
.md pre .copy:hover { background: #334155; }
.md pre .lang { display: block; font-family: var(--mono); font-size: 11px; color: #94A3B8; margin-bottom: 6px; }
.md blockquote { margin: 0 0 10px; padding: 2px 12px; border-left: 3px solid var(--line-strong); color: var(--muted); }
.md hr { border: none; border-top: 1px solid var(--line); margin: 14px 0; }
.md .table-wrap { overflow-x: auto; margin: 0 0 10px; }
.md table { border-collapse: collapse; font-size: 13.5px; }
.md th, .md td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
.md th { background: var(--softer); font-weight: 600; }

/* 입력창 */
.composer-wrap { padding: 0 24px 18px; }
.composer { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: 0 2px 8px rgba(16,24,40,0.06); }
.composer:focus-within { border-color: var(--accent); }
.composer textarea { border: none; outline: none; resize: none; background: transparent; font-size: 14.5px; line-height: 1.5; max-height: 220px; min-height: 24px; padding: 2px; }
.composer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.composer .btn.primary { min-height: 40px; padding: 0 18px; border-radius: 10px; font-size: 14px; }

/* 오른쪽 정보 */
.info { width: 300px; flex: none; background: var(--surface); border-left: 1px solid var(--line); padding: 18px 16px; display: flex; flex-direction: column; gap: 20px; overflow-y: auto; }
.info-sec { display: flex; flex-direction: column; gap: 8px; }
.info-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.usage { display: flex; flex-direction: column; gap: 5px; }
.usage-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.usage-top b { font-weight: 600; } .usage-top span { color: var(--muted); white-space: nowrap; }
.usage .note { font-size: 12px; color: var(--faint); }
.q-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: var(--softer); font-size: 12.5px; }
.q-item.mine { background: var(--accent-bg-2); }
.q-item .who { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-item.mine .who { font-weight: 600; }
.q-item .st { color: var(--muted); white-space: nowrap; } .q-item.mine .st { color: var(--accent-dark); font-weight: 600; }
.dev-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; }
.dev-grid span { aspect-ratio: 1; border-radius: 4px; background: var(--line); }
.dev-grid span.on { background: var(--ok); } .dev-grid span.me { background: var(--accent); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 8px; height: 8px; border-radius: 2px; background: var(--line); }
.legend i.on { background: var(--ok); } .legend i.me { background: var(--accent); }
.addr-box { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 10px; background: var(--softer); border: 1px solid var(--line); }
.addr-box .t { font-size: 12.5px; font-weight: 600; }
.addr { font-family: var(--mono); font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }

/* 서버 화면 */
.dash { flex: 1 1 0; min-height: 0; overflow-y: auto; }
.dash-inner { width: 100%; max-width: 1360px; margin: 0 auto; padding: 24px 24px 40px; display: flex; flex-direction: column; gap: 20px; }
.dash-title h1 { margin: 0; font-size: 24px; letter-spacing: -0.02em; } .dash-title p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.tile { padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.tile .k { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.tile .v { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; } .tile .v small { font-size: 16px; font-weight: 500; color: var(--faint); }
.tile .s { font-size: 12.5px; color: var(--faint); }
.dash-cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.card.pad { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.card h2 { margin: 0; font-size: 15px; }
.dash-main { flex: 999 1 560px; min-width: 0; overflow: hidden; }
.dash-sideCol { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.table-scroll { overflow-x: auto; }
table.devs { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 13px; }
table.devs th { text-align: left; padding: 10px 12px; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.devs td { padding: 11px 12px; border-bottom: 1px solid var(--soft); vertical-align: middle; }
table.devs tr:last-child td { border-bottom: none; }
table.devs th:first-child, table.devs td:first-child { padding-left: 18px; } table.devs th:last-child, table.devs td:last-child { padding-right: 18px; text-align: right; }
table.devs .name { font-weight: 600; } table.devs .ip { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
table.devs .num { text-align: right; font-variant-numeric: tabular-nums; }
table.devs tr.offline td { color: var(--faint); } table.devs tr.offline .name { font-weight: 500; }
.acct-head { display: flex; align-items: center; gap: 10px; } .acct-head h2 { flex: 1 1 0; }
.kv { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }
.kv > span:first-child { flex: 1 1 0; }
.kv .val { padding: 4px 12px; border-radius: 8px; background: var(--soft); font-weight: 600; color: var(--text); }
.kv input[type=number] { width: 72px; min-height: 36px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line-strong); text-align: right; }
.code { font-family: var(--mono); font-size: 18px; font-weight: 700; letter-spacing: 0.12em; }
.hint { font-size: 12.5px; color: var(--faint); }
.err-note { font-size: 12.5px; color: var(--err-text); overflow-wrap: anywhere; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 10px; background: var(--text); color: #fff; font-size: 13.5px; z-index: 50; box-shadow: 0 8px 24px rgba(16,24,40,0.2); }
.scrim { position: absolute; inset: 0; background: rgba(16,24,40,0.4); z-index: 15; }

@media (max-width: 1180px) { .info { display: none; } }
@media (max-width: 820px) {
  .only-narrow { display: inline-flex; } .hide-narrow { display: none; }
  .top { gap: 8px; padding: 6px 10px; }
  .side { position: absolute; top: 0; bottom: 0; left: 0; z-index: 20; width: min(300px, 86vw); transform: translateX(-102%); transition: transform 0.18s ease; }
  .side.open { transform: none; box-shadow: 8px 0 24px rgba(16,24,40,0.18); }
  .chat-head { padding: 10px 14px; } .messages { padding: 16px 14px; } .composer-wrap { padding: 0 10px 10px; }
  .replies.two { grid-template-columns: minmax(0, 1fr); }
  .btn.sm { min-height: 40px; } .seg-btn { min-height: 38px; }
  .dash-inner { padding: 16px 12px 32px; }
  .conv-del { opacity: 1; }
  #send-hint { display: none; }
}

.stack { display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 480px) {
  .top .brand > span:last-child { display: none; }
  .pill { padding: 5px 9px; }
  .seg-btn { padding: 0 10px; }
}

/* 외부 접속 설정 */
.ext-box { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.ext-box .t { font-size: 13px; font-weight: 600; color: var(--text); }
.field.sm { font-size: 12.5px; gap: 4px; }
.field.sm input { min-height: 38px; font-size: 13px; font-family: var(--mono); min-width: 0; width: 100%; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; min-height: 36px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* 도구 사용 기록과 생성된 이미지 */
.reply-tools { align-self: flex-start; max-width: 100%; min-width: 0; padding: 6px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); }
.reply-tools summary { cursor: pointer; min-height: 24px; display: list-item; }
.tool-line { display: flex; gap: 8px; padding: 2px 0; min-width: 0; }
.tool-kind { flex: none; color: var(--faint); }
.tool-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-images { display: flex; flex-wrap: wrap; gap: 12px; }
.img-tile { margin: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; max-width: min(100%, 440px); }
.img-tile img { display: block; max-width: 100%; height: auto; min-height: 80px; border-radius: 12px; border: 1px solid var(--line); background: var(--soft); cursor: zoom-in; }

/* 첨부 */
.attach-btn { gap: 5px; display: inline-flex; align-items: center; }
.attach-list { display: flex; flex-wrap: wrap; gap: 8px; }
.attach-item { display: flex; align-items: center; gap: 8px; max-width: 100%; padding: 5px 6px 5px 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); font-size: 12.5px; }
.attach-item img { width: 36px; height: 36px; object-fit: cover; border-radius: 6px; flex: none; background: #fff; }
.attach-icon { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 6px; background: var(--surface); color: var(--text-2); flex: none; }
.attach-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.attach-size { color: var(--faint); flex: none; }
.attach-x { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: none; border-radius: 6px; background: transparent; color: var(--text-2); cursor: pointer; flex: none; }
.attach-x:hover { background: var(--line); }
.composer.drop { border-color: var(--accent); background: var(--soft); }
.user-attach { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: flex-end; gap: 8px; max-width: min(640px, 88%); }
.user-thumb { width: 132px; height: 132px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); background: var(--soft); cursor: zoom-in; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 7px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.file-cut { color: var(--muted); font-size: 11.5px; font-weight: 400; white-space: nowrap; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
@media (max-width: 760px) { .user-thumb { width: 104px; height: 104px; } .attach-name { max-width: 120px; } .attach-btn span { display: none; } }
