* { box-sizing: border-box; }
:root {
  --bg: #f4f5f7; --surface: #fff; --line: #e5e7eb; --text: #1f2933; --muted: #6b7280;
  --accent: #24446b; --accent-soft: #e8eef6; --danger: #b42318;
}
html, body { height: 100%; margin: 0; }
body {
  display: flex;
  font: 14px/1.5 system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  color: var(--text); background: var(--bg);
}
[hidden] { display: none !important; }
.muted { color: var(--muted); }
h2 { margin: 0 0 12px; font-size: 15px; }
h3 { margin: 18px 0 8px; font-size: 14px; color: var(--muted); font-weight: 600; }

.btn {
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  color: var(--text); font: inherit; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: #f1f3f5; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #1c3757; }
.btn.danger { color: var(--danger); }
.btn.small { padding: 3px 8px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }

/* 왼쪽 세로 메뉴 */
.side { flex: none; width: 68px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 0; background: #eef1f5; border-right: 1px solid var(--line); }
.side-logo { display: block; margin-bottom: 10px; }
.side-gap { flex: 1; }
.side-btn { width: 58px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 6px; border: 0; border-radius: 10px; background: transparent; font: inherit; font-size: 11px; line-height: 1.2; color: var(--muted); cursor: pointer; }
.side-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-btn:hover { background: #e2e7ee; color: var(--text); }
.side-btn.on { background: var(--accent); color: #fff; font-weight: 700; box-shadow: 0 2px 6px rgba(36, 68, 107, .3); }
#notify-btn.on { background: transparent; color: #0f766e; font-weight: 600; }

/* 오른쪽 본문 + 위쪽 얇은 띠 */
.app { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bar { min-height: 56px; display: flex; align-items: center; gap: 12px; padding: 9px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
/* 사이트 이름 · 고르기 — 왼쪽 지구 아이콘 · 오른쪽 화살표(그린 SVG) */
.site-name, .site-pick {
  min-width: 0; height: 38px; padding: 0 14px 0 38px; border: 1px solid transparent; border-radius: 10px;
  font-size: 15px; font-weight: 700; line-height: 36px; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: no-repeat 12px 50% / 16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2324446b' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c3 3.5 3 14.5 0 18M12 3c-3 3.5-3 14.5 0 18'/%3E%3C/svg%3E");
}
.site-pick {
  max-width: 320px; padding-right: 36px; border-color: #d5d9df; cursor: pointer; appearance: none; -webkit-appearance: none;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2324446b' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c3 3.5 3 14.5 0 18M12 3c-3 3.5-3 14.5 0 18'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: 12px 50%, right 12px center; background-size: 16px, 16px; background-repeat: no-repeat;
}
.site-pick:hover, .site-pick:focus { border-color: var(--accent); outline: none; }
.site-pick:focus-visible { box-shadow: 0 0 0 3px rgba(36, 68, 107, .18); }
.hint { font-size: 12px; color: var(--danger); }
.who { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.who:hover, .who:focus-visible { border-color: var(--line); background: #f6f7f9; color: var(--text); outline: none; }
.who svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.who .caret { width: 14px; height: 14px; }

/* 3단 */
/* 채팅 — 목록 · 대화 · 방 정보가 떨어진 흰 카드(정보 칸은 넓은 화면일수록 320 → 420px) */
.chat { flex: 1; min-height: 0; display: grid; grid-template-columns: 360px minmax(0, 1fr) clamp(320px, 21vw, 420px); gap: 10px; padding: 12px; }
.col { min-height: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.list-col { display: flex; flex-direction: column; }
.info-col { padding: 20px; overflow-y: auto; }
.conv-col { display: flex; flex-direction: column; min-width: 0; }

.scope { display: flex; gap: 6px; padding: 14px 14px 10px; }
.scope-btn { flex: 1; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); font: inherit; cursor: pointer; color: var(--muted); }
.scope-btn.on { border-color: var(--accent); color: var(--accent); font-weight: 600; }
/* 상태 탭 — 회색 띠 안에 고른 탭만 흰 카드처럼 */
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 0 14px 12px; padding: 4px; border-radius: 11px; background: #eef1f5; }
.tab { display: flex; flex-direction: column; align-items: center; padding: 6px 0; border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: 13px; cursor: pointer; color: var(--muted); }
.tab b { font-size: 16px; line-height: 1.3; color: var(--text); font-variant-numeric: tabular-nums; }
.tab.on { background: var(--surface); color: var(--accent); font-weight: 600; box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.tab.on b { color: var(--accent); }

.rooms { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; border-top: 1px solid var(--line); }
.room { padding: 14px 18px; border-bottom: 1px solid #eef0f3; cursor: pointer; }
.room:hover { background: #f8f9fb; }
.room.on { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.room-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.room-top strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.room-sub .new { flex: none; padding: 1px 6px; border-radius: 999px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.tab .dot { position: relative; }
.tab .dot::after { content: ""; position: absolute; top: -2px; right: -9px; width: 6px; height: 6px; border-radius: 50%; background: #ef4444; }
.room-top .ago { flex: none; font-size: 12px; font-weight: 600; color: #1d4ed8; }
.room-sub { margin-top: 4px; display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.room-sub span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.none { padding: 24px; text-align: center; color: var(--muted); }

/* 대화 */
.empty { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--muted); }
.empty svg { width: 56px; height: 56px; padding: 14px; border-radius: 50%; background: var(--accent-soft); fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.empty p { margin: 0; font-size: 15px; }
.conv { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.conv-head { min-height: 56px; display: flex; align-items: center; gap: 8px; padding: 10px 18px; background: var(--surface); border-bottom: 1px solid var(--line); }
.conv-head strong { font-size: 16px; }
.spacer { flex: 1; }
.back, .info-toggle, .back-info { display: none; }
.badge { flex: none; white-space: nowrap; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: #eef0f3; color: var(--muted); }
.badge.waiting { background: #fff4e5; color: #b54708; }
.badge.answered { background: var(--accent-soft); color: var(--accent); }

.msgs { flex: 1; overflow-y: auto; padding: 20px max(20px, calc((100% - 980px) / 2)); display: flex; flex-direction: column; gap: 14px; background: #fafbfc; }
.msg { display: flex; flex-direction: column; max-width: 65%; }
.msg.visitor { align-self: flex-start; align-items: flex-start; }
.msg.agent, .msg.auto { align-self: flex-end; align-items: flex-end; }
.who-line { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.bubble { padding: 10px 14px; border-radius: 14px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }
/* 말풍선 색 — 손님 창과 같은 규칙 */
.visitor .bubble { background: #fff; border: 1px solid #d9dde3; color: #1f2933; }
.agent .bubble { background: #bfdbfe; color: #172554; }
.auto .bubble { background: #fde68a; color: #422006; }

.readonly { margin: 0; padding: 12px 18px; background: #fffbea; color: #7a5d00; border-top: 1px solid var(--line); }
/* 입력 — 테두리 있는 둥근 상자 안에 입력칸 + 보내기(대화 줄과 같은 폭) */
.composer { display: flex; align-items: flex-end; gap: 8px; margin: 12px max(12px, calc((100% - 980px) / 2)); padding: 8px 8px 8px 4px; border: 1px solid #d5d9df; border-radius: 14px; background: var(--surface); }
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(36, 68, 107, .12); }
.composer textarea { flex: 1; resize: none; min-height: 44px; max-height: 200px; padding: 8px 10px; border: 0; border-radius: 8px; font: inherit; color: inherit; }
.composer textarea:focus { outline: none; }
.composer .btn { padding: 9px 18px; font-weight: 600; border-radius: 10px; }

/* 상담사 메모 — 손님에게 안 보임 · 살구색 */
.msg.memo { align-self: center; align-items: center; max-width: 80%; }
.memo .bubble { background: #fff3e6; border: 1.5px dashed #f0a46b; color: #7a3410; }

/* 손님 기기 알약 */
.device { min-width: 0; padding: 2px 9px; border-radius: 999px; background: #eef0f3; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 방 정보 */
.info-col h2 { font-size: 16px; margin-bottom: 14px; }
dl { margin: 0; display: grid; grid-template-columns: 84px 1fr; gap: 10px 12px; }
dt { color: var(--muted); }
dd { margin: 0; word-break: break-all; }
dl > .muted { grid-column: 1 / -1; }

/* 설정 */
.settings { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.card { width: 100%; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
input, select, textarea { padding: 7px 9px; border: 1px solid #d5d9df; border-radius: 8px; font: inherit; color: inherit; background: #fff; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field > span { color: var(--muted); font-size: 13px; }
.field textarea { resize: vertical; }
.saved { padding: 1px 8px; border-radius: 999px; background: #e6f4f1; font-size: 12px; color: #0f766e; font-weight: 600; }

/* 사이트 설정 — 넓으면 왼쪽(기본 · 자동 메시지) · 오른쪽(알림) 2단 */
.set-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 1000px) { .set-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.set-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card-head { margin-bottom: 16px; }
.card-head h2 { margin: 0; font-size: 16px; }
.card-head p { margin: 2px 0 0; font-size: 13px; }
.item { display: flex; flex-direction: column; gap: 6px; }
.item + .item { margin-top: 18px; }
.item-head { min-height: 26px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.item-head label, .item-head strong { font-size: 14px; font-weight: 600; }
.item input, .item textarea { width: 100%; padding: 9px 12px; border-radius: 10px; line-height: 1.5; }
.item input:focus, .item textarea:focus, .dlg input:focus, .dlg select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(36, 68, 107, .12); }
.item textarea { resize: vertical; }
.help { margin: 0; font-size: 12px; color: var(--muted); }
.help-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 6px; }
.count { flex: none; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* 켜기 스위치 */
.switch { flex: none; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { position: relative; width: 36px; height: 20px; border-radius: 999px; background: #cfd5dd; transition: background .15s; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:checked ~ span:last-child { color: var(--accent); font-weight: 600; }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px rgba(36, 68, 107, .25); }
.notify { display: flex; flex-direction: column; gap: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.notify > .item-head { margin-bottom: 14px; }
.notify .item + .item { margin-top: 14px; }
.notify.soon { margin-top: 12px; background: #fafbfc; }
.notify.soon > .item-head { margin-bottom: 0; }
.notify.soon strong { color: var(--muted); }
.test-row { display: flex; align-items: center; gap: 10px; margin-top: 16px; }

/* 계정 — 줄 카드 */
.user-list { display: flex; flex-direction: column; gap: 10px; }
.user-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.user-row .avatar { width: 40px; height: 40px; font-size: 16px; }
.user-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.user-name strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-name span { font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role { flex: none; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eef0f3; color: var(--muted); }
.role.admin { background: var(--accent-soft); color: var(--accent); }
.role.super { background: #1e3a5f; color: #fff; }
.role.agent { background: #e6f4f1; color: #0f766e; }
.user-actions { flex: none; display: flex; gap: 8px; }
.user-actions .btn { padding: 7px 12px; }
.dlg .field input, .dlg .field select { padding: 9px 12px; border-radius: 10px; }
.dlg-note { margin: -8px 0 14px; font-size: 13px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 10px 16px; border-radius: 10px; background: #1f2933; color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.2); z-index: 10; }

/* 로그인 */
.login-page { align-items: center; justify-content: center; }
.login-box { width: 100%; max-width: 340px; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; gap: 12px; }
.login-box h1 { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 20px; color: var(--accent); }
.login-box p { margin: 0; }
.login-box label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 13px; }
.login-box input { font-size: 15px; color: var(--text); }
.login-box .btn { padding: 10px; font-size: 15px; }
.err { color: var(--danger); font-size: 13px; }

/* 좁은 화면 — 목록 → 대화(→ 정보) 전환 */
@media (max-width: 900px) {
  body { flex-direction: column; }
  .side { order: 2; width: auto; flex-direction: row; justify-content: space-around; padding: 4px 8px; border-right: 0; border-top: 1px solid var(--line); }
  .side-logo, .side-gap { display: none; }
  .side-btn { width: auto; flex: 1; max-width: 90px; padding: 6px 0 4px; }
  .app { min-height: 0; flex: 1; }
  .bar { gap: 10px; padding: 8px 12px; flex-wrap: wrap; }
  .who { display: none; }
  .chat { grid-template-columns: 1fr; gap: 0; padding: 0; }
  .col { border: 0; border-radius: 0; box-shadow: none; }
  .msgs { padding: 16px; }
  .composer { margin: 8px; }
  .conv-head { flex-wrap: wrap; gap: 6px; padding: 8px 10px; }
  .conv-head .btn { padding: 5px 10px; }
  .conv-col, .info-col { display: none; }
  .room-open .list-col { display: none; }
  .room-open .conv-col { display: flex; }
  .room-open.info-open .conv-col { display: none; }
  .room-open.info-open .info-col { display: block; border-left: 0; }
  .back, .info-toggle { display: inline-block; }
  .conv-head .device { display: none; } /* 좁으면 「정보」 안의 기기 줄로 */
  .msg { max-width: 88%; }
  .back-info { display: inline-block; margin-bottom: 12px; }
}
a.btn { display: inline-flex; align-items: center; text-decoration: none; }
.memo-form { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.memo-form h2 { margin: 0; }
.memo-form p { margin: 0; font-size: 12px; }
.memo-form textarea { width: 100%; padding: 8px 10px; border: 1px solid #f0b27a; border-radius: 8px; background: #fff3e6; font: inherit; resize: vertical; }
.memo-form textarea:focus { outline: none; border-color: #c2570c; }
.memo-btn { align-self: flex-end; background: #c2570c; border-color: #c2570c; color: #fff; }
.memo-btn:hover { background: #a84a09; }
.info-col dd { overflow-wrap: anywhere; word-break: keep-all; }

/* 화면 머리줄(사이트 관리 · 내 계정) */
.page { width: 100%; max-width: 1120px; display: flex; flex-direction: column; gap: 20px; }
.page.narrow { max-width: 760px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head > div { min-width: 0; }
.page-head h1 { margin: 0; font-size: 22px; line-height: 1.3; letter-spacing: -.01em; }
.page-head p { margin: 4px 0 0; font-size: 13px; word-break: keep-all; }
.page-head .btn { flex: none; }
.page-head .btn.primary { padding: 9px 16px; font-weight: 600; }
.ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* 요약 띠 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.stat span { font-size: 12px; color: var(--muted); }
.stat b { font-size: 24px; line-height: 1.2; color: var(--text); font-variant-numeric: tabular-nums; }
.stat.hot { border-color: #fecaca; background: #fef2f2; }
.stat.hot b, .stat.hot span { color: var(--danger); }

/* 사이트 카드 */
.site-grid { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
@media (min-width: 1000px) { .site-grid { grid-template-columns: 1fr 1fr; } }
.site-card { display: flex; flex-direction: column; gap: 16px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); transition: box-shadow .3s, border-color .3s; min-width: 0; }
.site-card:hover { box-shadow: 0 4px 14px rgba(16, 24, 40, .08); }
.site-card.flash { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(36, 68, 107, .25); }
.site-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 18px; font-weight: 700; }
.site-title { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.site-title strong { max-width: 100%; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { padding: 1px 8px; border-radius: 999px; background: #eef0f3; color: var(--muted); font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; }
.nums { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 10px; background: #fafbfc; }
.num { display: flex; flex-direction: column; align-items: center; padding: 10px 4px; }
.num + .num { border-left: 1px solid var(--line); }
.num b { font-size: 20px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.num span { font-size: 12px; color: var(--muted); }
.num.hot b, .num.hot span { color: var(--danger); }
.site-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.site-actions .btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; }
.site-actions .btn.primary { font-weight: 600; }
.site-actions .btn.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.embed-wrap { display: flex; flex-direction: column; gap: 6px; }
.embed-box { position: relative; }
.embed { width: 100%; margin: 0; padding: 12px 14px; padding-right: 76px; border-radius: 10px; background: #0f172a; color: #e2e8f0; font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }
.embed-box .copy { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 4px; background: #1e293b; border-color: #334155; color: #e2e8f0; }
.embed-box .copy:hover { background: #334155; }
.embed-box .copy .ico { width: 14px; height: 14px; }
.embed-note { margin: 0; font-size: 12px; }

/* 빈 상태 */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 20px; background: var(--surface); border: 1px dashed #cfd5dd; border-radius: 14px; color: var(--muted); text-align: center; }
.empty-state .ico { width: 36px; height: 36px; stroke-width: 1.5; }
.empty-state p { margin: 0; }

/* 사이트 추가 창 */
.dlg { width: calc(100% - 32px); max-width: 420px; padding: 24px; border: 0; border-radius: 14px; box-shadow: 0 20px 50px rgba(15, 23, 42, .25); color: var(--text); }
.dlg::backdrop { background: rgba(15, 23, 42, .45); }
.dlg h2 { margin-bottom: 16px; font-size: 17px; }
.dlg .err { margin: -4px 0 12px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.dlg-actions .btn { padding: 8px 16px; }

@media (max-width: 600px) {
  .settings { padding: 16px; }
  .page-head { align-items: flex-start; }
  .page-head h1 { font-size: 19px; }
  .stats { gap: 8px; }
  .stat { padding: 10px 12px; }
  .stat b { font-size: 20px; }
  .user-row { flex-wrap: wrap; padding: 14px; }
  .user-actions { width: 100%; padding-left: 54px; }
  .bar { gap: 8px; }
  .site-pick { flex: 1; max-width: none; }
  .site-card { padding: 16px; }
}
.me-tag { align-self: center; line-height: 1.5; padding: 2px 8px; border-radius: 999px; background: #eef0f3; color: var(--muted); font-size: 12px; font-weight: 600; }
