/* 클로드비서 허브 화면 스타일 (PIN-OPS-012)
   목적: Claude Code 데스크톱 앱의 구조(좌 목록 / 중앙 대화 / 우 패널 / 하단 입력칸)를 축소 차용. 토큰은 자체 정의(외부 로고·워드마크 없음).
   테마: :root = 라이트, [data-theme=dark] = 다크, [data-theme=auto] 는 prefers-color-scheme 를 따른다.
   반응형: <760 모바일(하단 탭 + 서랍 + 시트) / 760～1099 2열 / ≥1100 3열. 폴드8 접힘(≈373px)·펼침(≈800px) 둘 다 이 구간에 든다.
   실패 지점: 없음(정적). 클래스 이름은 app.js 와 1:1 이므로 바꾸면 둘 다 바꾼다. */

:root {
  --bg: #f7f6f3;           /* 바탕(따뜻한 회백) */
  --bg-2: #efede8;         /* 사이드바·패널 */
  --surface: #ffffff;      /* 카드·입력칸 */
  --surface-2: #f2f0eb;    /* 사용자 말풍선·코드 */
  --ink: #1f1e1d;
  --ink-2: #4b4842;
  --muted: #7d786f;
  --line: #e2dfd8;
  --line-2: #cfcbc2;
  --accent: #2f5bea;       /* 코발트: 행동·링크·선택 */
  --accent-ink: #ffffff;
  --accent-soft: #e6ecfd;
  --ok: #1f7a4d; --ok-soft: #e3f2e9;
  --warn: #a86a00; --warn-soft: #fdf1da;
  --danger: #b3261e; --danger-soft: #fbe9e7;
  --info: #2f5bea;
  --radius: 12px; --radius-s: 8px;
  --shadow: 0 1px 2px rgba(31,30,29,.05), 0 8px 24px rgba(31,30,29,.06);
  --mono: ui-monospace, "Cascadia Mono", "D2Coding", "Consolas", monospace;
  --sans: "Pretendard", -apple-system, BlinkMacSystemFont, "Malgun Gothic", "맑은 고딕", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #1a1917; --bg-2: #201f1d; --surface: #262523; --surface-2: #2e2d2a;
  --ink: #e8e4dc; --ink-2: #c9c4ba; --muted: #8f897e; --line: #35332f; --line-2: #45423d;
  --accent: #6b8cff; --accent-ink: #0e1224; --accent-soft: #26304f;
  --ok: #5fc48f; --ok-soft: #1f3529; --warn: #e6b04d; --warn-soft: #3a2f16; --danger: #ef7d75; --danger-soft: #3d2320;
  --info: #6b8cff;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px rgba(0,0,0,.35);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --bg: #1a1917; --bg-2: #201f1d; --surface: #262523; --surface-2: #2e2d2a;
    --ink: #e8e4dc; --ink-2: #c9c4ba; --muted: #8f897e; --line: #35332f; --line-2: #45423d;
    --accent: #6b8cff; --accent-ink: #0e1224; --accent-soft: #26304f;
    --ok: #5fc48f; --ok-soft: #1f3529; --warn: #e6b04d; --warn-soft: #3a2f16; --danger: #ef7d75; --danger-soft: #3d2320;
    --info: #6b8cff;
    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 14.5px; line-height: 1.55; -webkit-text-size-adjust: 100%; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
code, pre, .mono { font-family: var(--mono); font-size: .92em; }
[hidden] { display: none !important; }
.boot { padding: 40px; color: var(--muted); text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.dim { opacity: .55; }
.off { opacity: .45; filter: grayscale(1); }
.spacer { flex: 1; }
.row { display: flex; align-items: center; gap: 8px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pre { white-space: pre-wrap; word-break: break-word; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }

/* ── 버튼·칩·입력 ── */
.btn { border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--radius-s); padding: 7px 12px; font-size: 13.5px; font-weight: 500; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; line-height: 1.2; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); background: var(--accent); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--danger); border-color: var(--danger-soft); }
.btn.sm { padding: 4px 9px; font-size: 12.5px; }
.btn.icon { padding: 6px 8px; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.danger { background: var(--danger-soft); color: var(--danger); }
.chip.accent { background: var(--accent-soft); color: var(--accent); }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-ink); }
.badge.work { background: var(--warn); color: #1f1e1d; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); }
.dot.on { background: var(--ok); } .dot.work { background: var(--warn); } .dot.wake { background: var(--accent); }
input[type=text], input[type=search], input[type=password], input[type=time], input[type=number], select, textarea {
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-s); padding: 7px 10px; color: var(--ink); outline: none; min-width: 0;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select.sm, input.sm { padding: 4px 8px; font-size: 12.5px; }
.switch { position: relative; width: 38px; height: 22px; border-radius: 11px; background: var(--line-2); border: 0; padding: 0; flex: none; transition: .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch.on { background: var(--accent); }
.switch.on::after { left: 19px; }
.switch:disabled { opacity: .4; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.card + .card { margin-top: 10px; }
.card h3 { margin: 0 0 8px; font-size: 14px; }
.card h4 { margin: 12px 0 6px; font-size: 13px; color: var(--ink-2); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 8px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list.tight li { padding: 5px 0; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { color: var(--muted); font-weight: 600; font-size: 12px; }
.tbl-wrap { overflow-x: auto; }

/* ── 로그인 ── */
.login-wrap { min-height: 100svh; display: flex; align-items: center; justify-content: center; padding: 24px 18px calc(24px + env(safe-area-inset-bottom)); background: var(--bg); }
.login-card { width: 100%; max-width: 360px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 26px 22px 20px; box-shadow: var(--shadow); }
.login-card .brand { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.login-card .brand img { width: 36px; height: 36px; border-radius: 9px; }
.login-card h1 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.login-card .sub { margin: 0 0 18px; color: var(--muted); font-size: 12.5px; }
.pin-display { display: flex; gap: 10px; justify-content: center; margin: 4px 0 14px; }
.pin-dot { width: 13px; height: 13px; border-radius: 50%; background: var(--line-2); transition: .15s; }
.pin-dot.on { background: var(--accent); transform: scale(1.1); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.keypad button { padding: 13px 0; font-size: 19px; font-weight: 600; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; }
.keypad button:active { background: var(--surface-2); }
.keypad button.wide { font-size: 13px; color: var(--muted); }
.login-err { color: var(--danger); font-size: 13px; min-height: 20px; margin-top: 10px; text-align: center; }
.login-foot { margin-top: 12px; text-align: center; font-size: 11.5px; color: var(--muted); }

/* ── 셸 레이아웃 ── */
.shell { display: grid; grid-template-columns: 250px 1fr; grid-template-rows: 100svh; height: 100svh; }
.shell.with-panel { grid-template-columns: 250px 1fr 320px; }
.sidebar { background: var(--bg-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.side-head { display: flex; align-items: center; gap: 8px; padding: calc(12px + env(safe-area-inset-top)) 14px 8px; }
.side-head img { width: 26px; height: 26px; border-radius: 7px; }
.side-head .name { font-weight: 700; letter-spacing: -.02em; font-size: 15px; }
.side-scroll { flex: 1; overflow-y: auto; min-height: 0; padding: 0 8px 8px; }
.side-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 10px 8px 4px; }
.biz { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 7px 9px; border: 0; background: transparent; border-radius: var(--radius-s); color: var(--ink-2); font-size: 13.5px; }
.biz:hover { background: var(--surface); }
.biz.on { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.biz .num { font-family: var(--mono); font-size: 11px; color: var(--muted); width: 22px; flex: none; }
.biz .nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.biz .st { font-size: 10.5px; color: var(--muted); flex: none; }
.nav { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 7px 9px; border: 0; background: transparent; border-radius: var(--radius-s); color: var(--ink-2); font-size: 13.5px; }
.nav:hover { background: var(--surface); }
.nav.on { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.nav .ico { width: 18px; text-align: center; font-size: 13px; color: var(--muted); }
.side-foot { padding: 8px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.side-foot .devs { display: flex; gap: 6px; align-items: center; }

.main { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--bg); }
.topbar { display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 14px 8px; border-bottom: 1px solid var(--line); background: var(--bg); min-height: 48px; }
.topbar .title { font-weight: 700; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.content { flex: 1; overflow-y: auto; min-height: 0; padding: 14px 16px 24px; }
.content.narrow { max-width: 900px; width: 100%; margin: 0 auto; }
.panel { background: var(--bg-2); border-left: 1px solid var(--line); overflow-y: auto; min-height: 0; padding: 12px 14px calc(14px + env(safe-area-inset-bottom)); font-size: 13px; }
.panel h3 { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 14px 0 6px; }
.panel h3:first-child { margin-top: 0; }
.panel .box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 10px; }
.panel .box + .box { margin-top: 6px; }
.panel .clamp { max-height: 160px; overflow: hidden; position: relative; }
.panel .clamp.open { max-height: none; }
.panel .more { display: block; margin-top: 4px; }
.panel .recent button { background: transparent; border: 0; color: var(--ink-2); text-align: left; padding: 3px 0; width: 100%; font-size: 12.5px; }
.panel .recent button:hover { color: var(--accent); }
.mobile-only { display: none; }

/* ── 대화 ── */
.chat { display: flex; flex-direction: column; gap: 14px; max-width: 900px; margin: 0 auto; }
.tip { border: 1px dashed var(--line-2); background: var(--surface); border-radius: var(--radius); padding: 10px 14px; display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.tip .t { font-weight: 600; margin-right: 6px; }
.tip .x { margin-left: auto; }
.msg { display: flex; flex-direction: column; gap: 8px; }
.q { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; white-space: pre-wrap; word-break: break-word; }
.q .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.prog { border-left: 2px solid var(--line-2); margin-left: 6px; padding-left: 10px; }
.prog summary { cursor: pointer; font-size: 12.5px; color: var(--muted); list-style: none; display: flex; align-items: center; gap: 6px; }
.prog summary::-webkit-details-marker { display: none; }
.prog summary::before { content: "▸"; font-size: 11px; }
.prog[open] summary::before { content: "▾"; }
.prog .lines { margin: 6px 0 0; padding: 0; list-style: none; font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.prog .lines li { padding: 1px 0; white-space: pre-wrap; word-break: break-word; }
.prog .lines li .ts { color: var(--muted); margin-right: 8px; }
.spin { display: inline-block; width: 10px; height: 10px; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.a { padding: 2px 4px; }
.md h1, .md h2, .md h3, .md h4 { margin: 14px 0 6px; line-height: 1.3; }
.md h1 { font-size: 18px; } .md h2 { font-size: 16px; } .md h3 { font-size: 14.5px; } .md h4 { font-size: 14px; }
.md p { margin: 6px 0; } .md ul, .md ol { margin: 6px 0; padding-left: 22px; } .md li { margin: 2px 0; }
.md pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; overflow-x: auto; }
.md code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.md pre code { background: transparent; padding: 0; }
.md blockquote { margin: 6px 0; padding: 2px 12px; border-left: 3px solid var(--line-2); color: var(--ink-2); }
.md table { border-collapse: collapse; margin: 8px 0; font-size: 13px; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--line); padding: 4px 8px; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.mem { border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--surface); border-radius: var(--radius-s); padding: 8px 12px; font-size: 13px; }
.mem .h { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.mem ul { margin: 0; padding-left: 18px; }
.att { display: flex; flex-wrap: wrap; gap: 6px; }
.att a { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: var(--radius-s); padding: 4px 10px; font-size: 12.5px; text-decoration: none; color: var(--ink); background: var(--surface); }
.actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); }
.err { border: 1px solid var(--danger-soft); background: var(--danger-soft); border-radius: var(--radius-s); padding: 10px 12px; font-size: 13px; }
.err .h { font-weight: 700; color: var(--danger); margin-bottom: 4px; }
.err .dev { font-family: var(--mono); font-size: 12px; color: var(--ink-2); white-space: pre-wrap; word-break: break-all; margin-top: 4px; }
.empty { color: var(--muted); text-align: center; padding: 40px 10px; font-size: 13.5px; }

/* ── 입력칸 ── */
.composer { border-top: 1px solid var(--line); background: var(--bg); padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); }
.composer .inner { max-width: 900px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; padding: 8px 10px; position: relative; }
.composer .inner:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.composer textarea { width: 100%; border: 0; background: transparent; resize: none; padding: 4px 4px 2px; min-height: 40px; max-height: 40vh; outline: none; box-shadow: none; }
.composer .bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.composer .bar select { font-size: 12px; padding: 3px 6px; border-radius: 6px; background: var(--surface-2); border-color: transparent; }
.composer .send { margin-left: auto; }
.composer .files { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.composer .files .chip button { border: 0; background: transparent; padding: 0 0 0 4px; color: inherit; }
.slash { position: absolute; left: 10px; bottom: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-s); box-shadow: var(--shadow); min-width: 260px; max-width: 90%; z-index: 5; overflow: hidden; }
.slash button { display: flex; gap: 10px; width: 100%; text-align: left; padding: 7px 12px; border: 0; background: transparent; font-size: 13px; }
.slash button.on, .slash button:hover { background: var(--accent-soft); }
.slash .c { font-family: var(--mono); color: var(--accent); min-width: 70px; }
.slash .d { color: var(--muted); }

/* ── 브리핑·목록 화면 ── */
.two { display: grid; grid-template-columns: 220px 1fr; gap: 14px; }
.datelist button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 7px 10px; border-radius: var(--radius-s); color: var(--ink-2); font-size: 13px; }
.datelist button.on { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.datelist .pv { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── 파일 ── */
.tree { font-size: 13px; }
.tree .node { display: flex; align-items: center; gap: 6px; padding: 3px 6px; border-radius: 6px; cursor: pointer; user-select: none; }
.tree .node:hover { background: var(--surface-2); }
.tree .node.on { background: var(--accent-soft); }
.tree .node .ico { width: 16px; text-align: center; color: var(--muted); font-size: 12px; }
.tree .kids { margin-left: 16px; border-left: 1px dashed var(--line); padding-left: 4px; }
.files-grid { display: grid; grid-template-columns: 300px 1fr; gap: 12px; min-height: 60vh; }
.viewer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-height: 60vh; overflow: hidden; display: flex; flex-direction: column; }
.viewer .vhead { padding: 8px 12px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; font-size: 13px; }
.viewer iframe { flex: 1; border: 0; width: 100%; min-height: 55vh; background: #fff; }
.viewer textarea { flex: 1; border: 0; border-radius: 0; min-height: 55vh; font-family: var(--mono); font-size: 13px; }
.viewer .vbody { flex: 1; overflow: auto; padding: 12px 14px; }
.viewer img { max-width: 100%; }

/* ── 기기 ── */
.dev-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.dev-state { font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.uptime { display: flex; gap: 4px; align-items: flex-end; height: 42px; margin-top: 6px; }
.uptime .bar { flex: 1; background: var(--accent-soft); border-radius: 3px 3px 0 0; position: relative; min-height: 2px; }
.uptime .bar i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--accent); border-radius: 3px 3px 0 0; }
.uptime-lab { display: flex; gap: 4px; font-size: 10px; color: var(--muted); }
.uptime-lab span { flex: 1; text-align: center; }

/* ── 설정 ── */
.set-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.set-row:first-of-type { border-top: 0; }
.set-row .lab { flex: 1; }
.set-row .lab small { display: block; color: var(--muted); font-size: 11.5px; }
.set-row.sub { padding-left: 18px; }

/* ── 상태 ── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 12px; }
.stat .n { font-size: 20px; font-weight: 700; } .stat .l { font-size: 11.5px; color: var(--muted); }
.logx { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 10px; font-family: var(--mono); font-size: 11.5px; white-space: pre-wrap; word-break: break-all; max-height: 50vh; overflow: auto; }

/* ── 모달·토스트 ── */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; width: 100%; max-width: 560px; max-height: 90svh; overflow: auto; box-shadow: var(--shadow); padding: 18px 20px; }
.modal h2 { margin: 0 0 12px; font-size: 16px; }
.modal .foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.modal label { display: block; font-size: 12.5px; color: var(--muted); margin: 10px 0 3px; }
.modal input[type=text], .modal select, .modal textarea { width: 100%; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 9px 16px; border-radius: 10px; font-size: 13px; z-index: 60; box-shadow: var(--shadow); max-width: 90vw; }
.toast.err { background: var(--danger); color: #fff; }

/* ── 하단 탭·서랍(모바일) ── */
.tabbar { display: none; }
.drawer-bg { display: none; }

@media (max-width: 1099px) {
  .shell, .shell.with-panel { grid-template-columns: 250px 1fr; }
  .panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(360px, 92vw); z-index: 40; transform: translateX(100%); transition: transform .2s; box-shadow: var(--shadow); }
  .panel.open { transform: none; }
  .mobile-only { display: inline-flex; }
}
@media (max-width: 759px) {
  .shell, .shell.with-panel { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: min(300px, 85vw); z-index: 45; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .drawer-bg { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 44; }
  .drawer-bg[hidden] { display: none; }
  .content { padding: 10px 12px 20px; }
  .tabbar { display: flex; border-top: 1px solid var(--line); background: var(--bg-2); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .tabbar button { flex: 1; border: 0; background: transparent; padding: 6px 2px; font-size: 11px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 2px; border-radius: 8px; }
  .tabbar button .ico { font-size: 16px; }
  .tabbar button.on { color: var(--accent); background: var(--surface); }
  .two { grid-template-columns: 1fr; }
  .files-grid { grid-template-columns: 1fr; }
  .composer .bar select { max-width: 96px; }
}
