/* ============ 폰트: Pretendard (시바 사이트와 동일, OFL) ============ */
@font-face { font-family: 'Pretendard Variable'; font-weight: 45 920; font-style: normal; font-display: swap;
  src: url('/assets/fonts/PretendardVariable.woff2') format('woff2-variations'), url('/assets/fonts/PretendardVariable.woff2') format('woff2'); }

/* ============ 테마 ============ */
:root,
[data-theme='light'] {
  --bg: #fafafa;
  --panel: #ffffff;
  --panel-2: #f5f5f5;
  --border: #e7e7e7;
  --border-strong: #d4d4d4;
  --text: #0a0a0a;
  --text-2: #404040;
  --muted: #737373;
  --accent: #0a0a0a;
  --accent-fg: #ffffff;
  --hover: #f4f4f5;
  --ring: rgba(10, 10, 10, 0.06);
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --warn: #d97706;
  --warn-bg: #fffbeb;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  --console-bg: #fafafa;
  --t-blue: #3b82f6; --t-blue-bg: rgba(59,130,246,.1);
  --t-green: #16a34a; --t-green-bg: rgba(22,163,74,.1);
  --t-amber: #e08a00; --t-amber-bg: rgba(245,158,11,.12);
  --t-violet: #7c5cf0; --t-violet-bg: rgba(124,92,240,.1);
  --t-rose: #e8466a; --t-rose-bg: rgba(232,70,106,.1);
  --t-teal: #0f9f8f; --t-teal-bg: rgba(20,184,166,.1);
  --t-sky: #0b8bd1; --t-sky-bg: rgba(14,165,233,.1);
  --chart: #0a0a0a;
  color-scheme: light;
}

[data-theme='dark'] {
  --bg: #09090b;
  --panel: #111113;
  --panel-2: #18181b;
  --border: #232326;
  --border-strong: #34343a;
  --text: #fafafa;
  --text-2: #d4d4d8;
  --muted: #8b8b93;
  --accent: #fafafa;
  --accent-fg: #09090b;
  --hover: #1a1a1d;
  --ring: rgba(250, 250, 250, 0.07);
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.1);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);
  --warn: #f59e0b;
  --warn-bg: rgba(245, 158, 11, 0.1);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
  --console-bg: #0c0c0e;
  --t-blue: #6ea3ff; --t-blue-bg: rgba(96,150,255,.13);
  --t-green: #4ade80; --t-green-bg: rgba(74,222,128,.12);
  --t-amber: #fbbf24; --t-amber-bg: rgba(251,191,36,.12);
  --t-violet: #a78bfa; --t-violet-bg: rgba(167,139,250,.13);
  --t-rose: #fb7192; --t-rose-bg: rgba(251,113,146,.12);
  --t-teal: #2dd4bf; --t-teal-bg: rgba(45,212,191,.12);
  --t-sky: #38bdf8; --t-sky-bg: rgba(56,189,248,.12);
  --chart: #fafafa;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s, color 0.2s;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
svg.lucide { width: 16px; height: 16px; stroke-width: 2; flex-shrink: 0; }

/* ============ 상단 네비게이션 (반투명 글래스) ============ */
:root, [data-theme='light'] {
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-line: rgba(0, 0, 0, 0.05);
  --ambient-1: rgba(120, 120, 140, 0.10);
  --ambient-2: rgba(0, 0, 0, 0.05);
}
[data-theme='dark'] {
  --glass-bg: rgba(17, 17, 21, 0.55);
  --glass-strong: rgba(24, 24, 28, 0.78);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-line: rgba(255, 255, 255, 0.06);
  --ambient-1: rgba(160, 160, 200, 0.09);
  --ambient-2: rgba(255, 255, 255, 0.04);
}
.topnav {
  position: sticky; top: 0; z-index: 40;
  background: linear-gradient(to bottom, var(--glass-bg), color-mix(in srgb, var(--glass-bg) 80%, transparent));
  transition: box-shadow .2s, background .2s;
  -webkit-backdrop-filter: blur(15px) saturate(1.5);
  backdrop-filter: blur(15px) saturate(1.5);
  border-bottom: 1px solid var(--glass-border);
}
.topnav.scrolled { box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.18); }
[data-theme='dark'] .topnav.scrolled { box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.7); }
/* 반투명이 잘 보이도록 페이지 배경에 은은한 그라데이션/패턴 */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 420px at 15% -120px, var(--ambient-1), transparent 70%),
    radial-gradient(800px 380px at 90% -80px, var(--ambient-1), transparent 70%),
    radial-gradient(var(--ambient-2) 1px, transparent 1px) 0 0 / 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, #000, #000 40%, transparent 85%);
  mask-image: linear-gradient(to bottom, #000, #000 40%, transparent 85%);
}
.topnav-inner { max-width: 1240px; margin: 0 auto; height: 64px; padding: 0 24px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; width: 200px; height: 64px; }
.brand-logo { height: 32px; max-width: 180px; object-fit: contain; display: block; }
.brand-logo[hidden], .brand-mark[hidden] { display: none; }
.login-logo { height: 52px; max-width: 220px; object-fit: contain; display: block; margin: 0 auto 18px; }
.login-logo[hidden] { display: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; box-shadow: 0 2px 8px -2px rgba(0,0,0,.25); transition: transform .2s; }
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.04); }
.brand-mark svg.lucide { width: 17px; height: 17px; }
.brand-title { font-weight: 700; font-size: 14.5px; letter-spacing: -0.01em; line-height: 1.2; }
.brand-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }

/* 카테고리 */
.nav-cats { flex: 1; display: flex; justify-content: center; align-self: stretch; }
.nav-cat { position: relative; width: 150px; display: flex; flex-direction: column; }
.nav-cat-btn {
  position: relative; height: 64px; width: 100%;
  border: none; background: none; cursor: pointer;
  color: var(--text-2); font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em;
  transition: color .15s;
}
.nav-cat-btn::after {
  content: ''; position: absolute; left: 24px; right: 24px; bottom: -1px; height: 2px;
  background: var(--text); border-radius: 2px; transform: scaleX(0); transition: transform .2s ease;
}
.nav-cat:hover .nav-cat-btn, .nav-cat.hover .nav-cat-btn, .nav-cat.active .nav-cat-btn { color: var(--text); }
.nav-cat.active .nav-cat-btn::after { transform: scaleX(1); opacity: .35; }
.topnav.mega-open .nav-cat.hover .nav-cat-btn::after,
.nav-cat:hover .nav-cat-btn::after { transform: scaleX(1); opacity: 1; }

/* 메가 메뉴 컬럼 (각 카테고리 바로 아래) */
.nav-col {
  position: absolute; top: 64px; left: 0; right: 0;
  display: flex; flex-direction: column; align-items: stretch; gap: 2px;
  padding: 12px 10px 16px;
  border-left: 1px solid var(--glass-line);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.nav-cat:last-child .nav-col { border-right: 1px solid var(--glass-line); }
.topnav.mega-open .nav-col { opacity: 1; visibility: visible; transform: none; }
.nav-sub {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 7px 10px 7px 8px; border-radius: 10px;
  color: var(--text-2); font-size: 13.5px; font-weight: 500; white-space: nowrap;
}
.nav-sub .sic {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--glass-line); border: 1px solid var(--glass-border); color: var(--muted);
}
.nav-sub .sic svg.lucide { width: 14px; height: 14px; }
/* 마우스를 올리거나 현재 페이지면 이름 아래에 밑줄 (색은 그대로) */
.nav-sub .nl { position: relative; padding-bottom: 2px; }
.nav-sub .nl::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: left center; transition: transform .2s ease;
}
.nav-sub:hover .nl::after { transform: scaleX(1); }
.nav-sub.active .nl::after { transform: scaleX(1); }

/* 메가 메뉴 배경: 헤더 밖 형제 요소로 둬야 backdrop-filter(블러)가 정상 동작 */
.mega-bg {
  position: fixed; left: 0; right: 0; top: 65px; height: 0; z-index: 39;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(15px) saturate(1.5);
  backdrop-filter: blur(15px) saturate(1.5);
  border-bottom: 1px solid var(--glass-border);
  opacity: 0; visibility: hidden; transition: opacity .18s ease, visibility .18s;
}
.mega-bg.open { opacity: 1; visibility: visible; }

/* 모바일 메뉴 */
.nav-link { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; transition: background .12s; }
.nav-link:hover { background: var(--hover); }
.nav-link.active { background: var(--panel-2); }
.nav-link .ni { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border); background: var(--panel); display: grid; place-items: center; color: var(--text-2); flex-shrink: 0; }
.nav-link.active .ni { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.nav-link .nt { font-weight: 600; font-size: 13.5px; }
.nav-link .nd { font-size: 12px; color: var(--muted); }

.topnav-right { display: flex; align-items: center; justify-content: flex-end; gap: 10px; width: 200px; flex-shrink: 0; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; white-space: nowrap;
  border-radius: 999px; border: 1px solid var(--glass-border); background: var(--glass-line);
  font-size: 12.5px; font-weight: 500; color: var(--text-2); cursor: pointer; transition: background .15s;
}
.status-pill:hover { background: var(--hover); }
.status-pill.on .dot { color: var(--success); }
.status-pill.off .dot { color: var(--danger); }
.icon-btn { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--border); background: var(--panel); display: inline-grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--hover); }
.mobile-only { display: none; }
.mobile-menu { display: none; }

.content { padding: 32px 24px 48px; max-width: 1240px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

/* ============ 컴포넌트 ============ */
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.card-head h3 { margin: 0; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-head h3 svg.lucide { color: var(--muted); }
.card-body { padding: 18px; }
.card-body.flush { padding: 0; }

.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.stack { display: flex; flex-direction: column; gap: 16px; }

.stat { padding: 18px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13px; font-weight: 500; }
.stat-icon { width: 30px; height: 30px; border-radius: 8px; background: var(--panel-2); display: grid; place-items: center; color: var(--text-2); }
.stat-value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-top: 10px; line-height: 1.2; }
.stat-value small { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.stat-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--border-strong); background: var(--panel);
  font-weight: 500; font-size: 13.5px; cursor: pointer; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s, transform 0.05s;
}
.btn:hover { background: var(--hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent); opacity: 0.88; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn-danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger-solid:hover { background: var(--danger); opacity: 0.9; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--hover); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn-icon { width: 36px; padding: 0; }
.btn-sm.btn-icon { width: 30px; }
.btn-block { width: 100%; }

.input, .select {
  height: 38px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--panel);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  outline: none; width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.input:hover, .select:hover { border-color: var(--border-strong); }
.input:focus, .select:focus { border-color: var(--border-strong); box-shadow: 0 0 0 4px var(--ring); }
.input::placeholder { color: var(--muted); opacity: 0.85; }
.select { appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
.input-group { position: relative; display: flex; align-items: center; }
.input-group > svg.lucide { position: absolute; left: 12px; color: var(--muted); pointer-events: none; width: 15px; height: 15px; }
.input-group .input { padding-left: 36px; }
.input-group .kbd { position: absolute; right: 8px; pointer-events: none; }
.input-group .kbd + .input, .input-group.has-kbd .input { padding-right: 64px; }
.kbd { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 6px; border: 1px solid var(--border); background: var(--panel-2); font-size: 11px; color: var(--muted); font-family: inherit; }
.kbd svg.lucide { width: 12px; height: 12px; }
.hint { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.hint svg.lucide { width: 14px; height: 14px; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 500; color: var(--text-2); }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 500;
  border: 1px solid var(--border); background: var(--panel-2); color: var(--text-2);
}
.badge.success { color: var(--success); background: var(--success-bg); border-color: transparent; }
.badge.danger { color: var(--danger); background: var(--danger-bg); border-color: transparent; }
.badge.warn { color: var(--warn); background: var(--warn-bg); border-color: transparent; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.dot.pulse { box-shadow: 0 0 0 0 currentColor; animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 50%, transparent); }
  70% { box-shadow: 0 0 0 6px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--panel-2); object-fit: cover; }
.head { width: 32px; height: 32px; border-radius: 6px; background: var(--panel-2); image-rendering: pixelated; }

/* 테이블 / 리스트 */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 10px 18px; border-bottom: 1px solid var(--border); background: var(--panel-2); }
.table td { padding: 12px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: color-mix(in srgb, var(--hover) 60%, transparent); }
.table th:first-child { border-top-left-radius: 12px; }

.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: none; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .name { font-weight: 600; }
.list-item .sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty .empty-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--panel-2); display: grid; place-items: center; margin: 0 auto 12px; color: var(--muted); }
.empty .empty-icon svg.lucide { width: 20px; height: 20px; }
.empty strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }

.tabs { display: inline-flex; padding: 3px; gap: 2px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 9px; }
.tabs button { border: none; background: none; height: 28px; padding: 0 12px; border-radius: 6px; cursor: pointer; color: var(--muted); font-weight: 500; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.tabs button.active { background: var(--panel); color: var(--text); box-shadow: var(--shadow); }

.switch { display: inline-block; vertical-align: middle; position: relative; width: 38px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--border-strong); border-radius: 999px; cursor: pointer; transition: background 0.2s; }
.switch span::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform 0.2s; box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.switch input:checked + span { background: var(--accent); }
[data-theme='dark'] .switch input:checked + span::before { background: var(--accent-fg); }
.switch input:checked + span::before { transform: translateX(16px); }

.progress { height: 6px; background: var(--panel-2); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.4s; }

.kv { display: grid; grid-template-columns: 110px 1fr; gap: 10px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

.actions-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.action-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  height: 78px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel);
  cursor: pointer; font-size: 12.5px; font-weight: 500; color: var(--text-2);
  transition: background 0.15s, border-color 0.15s;
}
.action-tile:hover { background: var(--hover); border-color: var(--border-strong); color: var(--text); }
.action-tile svg.lucide { width: 18px; height: 18px; }

/* 차트 */
.chart { width: 100%; height: 180px; display: block; }
.chart .grid-line { stroke: var(--border); stroke-dasharray: 3 3; }
.chart .axis-label { fill: var(--muted); font-size: 11px; }
.chart .line { fill: none; stroke: var(--text); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--text); opacity: 0.06; }
.chart-tip { position: absolute; pointer-events: none; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 12px; box-shadow: var(--shadow-lg); white-space: nowrap; transform: translate(-50%, -110%); }

/* 콘솔 */
.console {
  height: calc(100vh - 300px); min-height: 360px; overflow-y: auto;
  background: var(--console-bg); padding: 14px 16px;
  font-size: 12.5px; line-height: 1.65; white-space: pre-wrap; word-break: break-word;
  border-bottom: 1px solid var(--border);
}
.console .l-warn { color: var(--warn); }
.console .l-err { color: var(--danger); }
.console .l-cmd { color: var(--text); font-weight: 600; }
.console .l-out { color: var(--text-2); }
.console .l-info { color: var(--muted); }
.console-input { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.console-input .prompt { color: var(--muted); padding-left: 4px; }
.console-input input { flex: 1; border: none; outline: none; background: transparent; height: 34px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 28px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--border); background: var(--panel); font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.chip:hover { background: var(--hover); color: var(--text); }

/* 사용자 메뉴 */
.user-btn { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: 999px; border: 1px solid var(--glass-border); background: var(--glass-line); cursor: pointer; }
.user-btn:hover, .status-pill:hover { background: var(--hover); }
.user-btn .avatar { width: 28px; height: 28px; }
.user-btn span { font-weight: 500; font-size: 13px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 50;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu .head-info { display: flex; align-items: center; gap: 10px; padding: 8px 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.dropdown-menu .head-info .avatar { width: 36px; height: 36px; }
.dropdown-menu .head-info #menuName { font-weight: 600; }
.dropdown-menu .head-info #menuId { font-size: 12px; color: var(--muted); }
.menu-item svg.lucide { color: var(--muted); }
.menu-item.danger svg.lucide { color: var(--danger); }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: none; background: none; border-radius: 7px; cursor: pointer; text-align: left; font-size: 13px; }
.menu-item:hover, .menu-item:focus-visible { background: var(--hover); outline: none; }
.menu-item.danger { color: var(--danger); }
.menu-sep { height: 1px; background: var(--border); margin: 6px 0; }

/* 모달 */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(2px); display: grid; place-items: center; z-index: 100; padding: 20px; animation: fade 0.15s; }
.modal { width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); animation: pop 0.18s ease-out; }
.modal-body { padding: 22px; }
.modal-body h3 { margin: 0 0 6px; font-size: 16px; }
.modal-body p { margin: 0; color: var(--muted); }
.modal-body .field { margin-top: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--panel-2); border-radius: 0 0 14px 14px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.97) translateY(4px); } }

/* 토스트 */
#toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { display: flex; align-items: flex-start; gap: 10px; min-width: 260px; max-width: 380px; padding: 12px 14px; border-radius: 10px; background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: pop 0.2s ease-out; font-size: 13px; }
.toast.success svg.lucide { color: var(--success); }
.toast.error svg.lucide { color: var(--danger); }
.toast .t-body { flex: 1; }
.toast .t-out { color: var(--muted); font-size: 12px; margin-top: 2px; word-break: break-word; }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text-2); font-size: 13px; margin-bottom: 16px; }
.alert.warn { background: var(--warn-bg); border-color: transparent; color: var(--warn); }

.skeleton { background: linear-gradient(90deg, var(--panel-2), var(--hover), var(--panel-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 6px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.muted { color: var(--muted); }
.text-sm { font-size: 12.5px; }
.ml-auto { margin-left: auto; }
.prop-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 1.4fr); gap: 16px; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--border); }
.prop-row:last-child { border-bottom: none; }
.prop-row .k { font-weight: 500; font-size: 13px; }
.prop-row.changed { background: var(--warn-bg); }

/* ============ 로그인 ============ */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; }
.login-card { width: 100%; max-width: 380px; padding: 32px; text-align: center; }
.login-card .brand-mark { width: 48px; height: 48px; border-radius: 12px; margin: 0 auto 18px; }
.login-card .brand-mark svg.lucide { width: 24px; height: 24px; }
.login-card h1 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.login-card p { margin: 6px 0 24px; color: var(--muted); }
.btn-discord { height: 44px; font-size: 14px; }
.login-foot { margin-top: 18px; font-size: 12px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; }
.login-theme { position: absolute; top: 20px; right: 20px; }
.login-bg { position: fixed; inset: 0; z-index: -1; background-image: radial-gradient(var(--border) 1px, transparent 1px); background-size: 22px 22px; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); }

/* ============ 컨텍스트 메뉴 ============ */
.ctx {
  position: fixed; z-index: 150; min-width: 210px; max-width: 260px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 6px; animation: ctxIn .12s ease-out;
}
@keyframes ctxIn { from { opacity: 0; transform: scale(.97); } }
.ctx-head { display: flex; align-items: center; gap: 10px; padding: 6px 8px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.ctx-head .head { width: 28px; height: 28px; }
.ctx-head .t { font-weight: 600; font-size: 13px; }
.ctx-head .s { font-size: 11.5px; color: var(--muted); }
.ctx .menu-item { padding: 7px 10px; }
.ctx .menu-item .sc { margin-left: auto; font-size: 11px; color: var(--muted); }

/* 우클릭 가능한 행 */
.list-item.ctx-target, tr.ctx-target td { cursor: context-menu; user-select: none; }
.list-item.ctx-target:hover { background: color-mix(in srgb, var(--hover) 70%, transparent); }
.list-item.ctx-open, tr.ctx-open td { background: var(--hover) !important; }
.more-btn { width: 30px; height: 30px; border-radius: 8px; border: none; background: none; color: var(--muted); display: none; place-items: center; cursor: pointer; }
.more-btn:hover { background: var(--panel-2); color: var(--text); }

/* ============ 반응형 ============ */
@media (max-width: 1100px) {
  .nav-cat { width: 112px; }
  .brand, .topnav-right { width: auto; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
}
@media (max-width: 860px) {
  .nav-cats, .mega-bg, .status-pill, .user-btn span { display: none; }
  .brand, .topnav-right { width: auto; }
  .topnav-right { margin-left: auto; }
  .mobile-only { display: inline-grid; }
  .topnav-inner { padding: 0 16px; }
  .mobile-menu.open { display: block; position: fixed; top: 65px; left: 0; right: 0; bottom: 0; z-index: 35; background: var(--glass-bg); -webkit-backdrop-filter: blur(15px) saturate(1.5); backdrop-filter: blur(15px) saturate(1.5); padding: 12px 16px 24px; overflow-y: auto; border-top: 1px solid var(--border); }
  .mobile-menu .m-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 14px 10px 6px; }
  .content { padding: 20px 16px 40px; }
  .grid-2 { grid-template-columns: 1fr; }
  .prop-row { grid-template-columns: 1fr; gap: 6px; }
  .hide-sm { display: none; }
  .more-btn { display: grid; }
}
@media (max-width: 520px) {
  .grid-4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat-value { font-size: 21px; }
}

/* ============ 프로필 메뉴 ============ */
.user-btn .chev { width: 14px; height: 14px; color: var(--muted); transition: transform .2s; }
.dropdown.open .user-btn .chev { transform: rotate(180deg); }
.profile-menu {
  position: fixed; left: auto; z-index: 60; display: none;
  width: 264px; padding: 6px; border-radius: 14px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
  border: 1px solid var(--glass-border);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.28), 0 1px 2px rgba(0, 0, 0, 0.06);
  transform-origin: top right;
}
.profile-menu.open { display: block; animation: menuIn .14s ease-out; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

.pm-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; }
.pm-avatar-wrap { position: relative; flex-shrink: 0; }
.pm-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--panel-2); display: block; }
.pm-avatar-wrap::after { content: ''; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--success); border: 2px solid var(--panel); }
.pm-info { min-width: 0; }
.pm-name { font-weight: 600; font-size: 14px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-id { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.pm-dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }

.pm-section { padding: 10px 10px 12px; border-top: 1px solid var(--glass-line); }
.pm-caption { font-size: 11.5px; font-weight: 500; color: var(--muted); margin-bottom: 8px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 3px; border-radius: 10px; background: var(--glass-line); border: 1px solid var(--glass-border); }
.seg button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0 6px; border: none; background: none; border-radius: 7px; cursor: pointer; font-size: 11.5px; font-weight: 500; color: var(--muted); transition: background .15s, color .15s, box-shadow .15s; }
.seg button svg.lucide { width: 15px; height: 15px; }
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

.pm-list { padding: 4px 0; border-top: 1px solid var(--glass-line); }
.pm-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border: none; background: none; border-radius: 8px;
  cursor: pointer; text-align: left; font-size: 13.5px; color: var(--text-2);
  transition: background .12s, color .12s;
}
.pm-item svg.lucide { width: 16px; height: 16px; color: var(--muted); transition: color .12s; }
.pm-item:hover { background: var(--glass-line); color: var(--text); }
.pm-item:hover svg.lucide { color: var(--text); }
.pm-item.danger:hover { color: var(--danger); background: var(--danger-bg); }
.pm-item.danger:hover svg.lucide { color: var(--danger); }
.pm-foot { padding-bottom: 0; }

/* ============ 플레이어 상세 ============ */
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 500; margin-bottom: 14px; transition: color .15s; }
.back-link:hover { color: var(--text); }
.profile-card { display: flex; align-items: center; gap: 20px; padding: 22px; position: relative; overflow: hidden; }
.profile-card::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(400px 160px at 0% 0%, var(--ambient-1), transparent 70%); }
.profile-card > * { position: relative; }
.profile-head { width: 88px; height: 88px; border-radius: 14px; image-rendering: pixelated; background: var(--panel-2); box-shadow: 0 6px 20px -8px rgba(0,0,0,.35); flex-shrink: 0; }
.profile-name { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.profile-meta span { display: inline-flex; align-items: center; gap: 6px; }
.profile-meta svg.lucide { width: 14px; height: 14px; }
.profile-card.ctx-target { cursor: context-menu; }
.profile-card .more-btn { position: absolute; top: 12px; right: 12px; }
.badge svg.lucide { width: 12px; height: 12px; }
.click-row { cursor: pointer; }

.bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; height: 160px; align-items: end; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.bar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; background: var(--panel-2); border-radius: 6px; overflow: hidden; }
.bar { width: 100%; background: var(--text); border-radius: 6px; opacity: .85; transition: height .4s ease; }
.bar-col:hover .bar { opacity: 1; }
.bar-col span { font-size: 11px; color: var(--muted); }

/* ============ 플러그인 ============ */
.alert svg.lucide { margin-top: 1px; }
.dropzone {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 12px;
  border: 1.5px dashed var(--border-strong); background: color-mix(in srgb, var(--panel) 70%, transparent);
  cursor: pointer; transition: border-color .15s, background .15s; outline: none;
}
.dropzone:hover, .dropzone:focus-visible, .dragging .dropzone { border-color: var(--text-2); background: var(--panel); }
.dz-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--border); color: var(--text-2); }
.dz-title { font-weight: 600; }
.dz-sub { font-size: 12.5px; color: var(--muted); }
.plugin-row { align-items: flex-start; }
.plugin-row .sub { white-space: normal; }
.plugin-row .switch { margin-top: 8px; }
.plugin-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--accent); color: var(--accent-fg); }
.plugin-row.off .plugin-icon { background: var(--panel-2); color: var(--muted); border: 1px solid var(--border); }
.plugin-row.off .name { color: var(--muted); }
.ver { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11px; color: var(--muted); background: var(--panel-2); border: 1px solid var(--border); }

/* ============ 파일 관리자 ============ */
.file-card { position: relative; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; min-width: 0; }
.crumb { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; }
.crumb:hover { background: var(--hover); color: var(--text); }
.crumb:last-child { color: var(--text); font-weight: 600; }
.crumb svg.lucide { width: 14px; height: 14px; }
.crumb-sep { color: var(--border-strong); display: inline-flex; }
.crumb-sep svg.lucide { width: 14px; height: 14px; }
.files-table td { padding-top: 9px; padding-bottom: 9px; }
.file-row { cursor: pointer; user-select: none; }
.file-ic { width: 28px; height: 28px; border-radius: 7px; display: inline-grid; place-items: center; background: var(--panel-2); color: var(--muted); flex-shrink: 0; }
.file-ic svg.lucide { width: 15px; height: 15px; }
.file-ic.dir { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }
.fname-dir { font-weight: 600; }
.drop-overlay { position: absolute; inset: 0; border-radius: 12px; display: none; align-items: center; justify-content: center; gap: 10px; background: color-mix(in srgb, var(--panel) 85%, transparent); backdrop-filter: blur(4px); border: 2px dashed var(--text-2); font-weight: 500; z-index: 5; pointer-events: none; }
.file-card.dragging .drop-overlay { display: flex; }

/* 편집기 */
.editor-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .45); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 24px; animation: fade .15s; }
.editor { width: min(1100px, 100%); height: min(820px, 100%); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .18s ease-out; }
.editor-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 16px; border-bottom: 1px solid var(--border); }
.editor-title { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.editor-sub { font-size: 12px; color: var(--muted); }
.editor-sub.dirty { color: var(--warn); }
.editor-body { flex: 1; display: flex; min-height: 0; background: var(--console-bg); }
.gutter { margin: 0; padding: 14px 10px 14px 14px; text-align: right; color: var(--muted); opacity: .6; font-size: 12.5px; line-height: 1.6; overflow: hidden; user-select: none; border-right: 1px solid var(--border); min-width: 48px; }
.code { flex: 1; border: none; outline: none; resize: none; padding: 14px 16px; background: transparent; color: var(--text); font-size: 12.5px; line-height: 1.6; tab-size: 2; white-space: pre; overflow: auto; }

/* ============ 즐겨찾기 ============ */
.fav-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.fav-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.fav-label svg.lucide { width: 14px; height: 14px; }
.chip.fav { height: 30px; padding: 0 12px; border-radius: 999px; font-weight: 500; }
.chip.fav svg.lucide { width: 13px; height: 13px; color: var(--muted); }
.chip.fav:hover svg.lucide { color: var(--text); }
.chip.add { height: 30px; border-radius: 999px; border-style: dashed; color: var(--muted); }
.grow { flex: 1; min-width: 0; }

/* ============ 명령어 자동 완성 ============ */
.console-input { position: relative; }
.ac {
  position: absolute; left: 10px; right: 10px; bottom: calc(100% + 6px); z-index: 30;
  max-width: 640px; border-radius: 12px; overflow: hidden;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid var(--glass-border);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .3);
  animation: ctxIn .1s ease-out;
}
.ac[hidden], .ac-list[hidden], .ac-hint[hidden] { display: none; }
.ac-list { max-height: 272px; overflow-y: auto; padding: 5px; }
.ac-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.ac-item.active { background: var(--glass-line); box-shadow: inset 0 0 0 1px var(--glass-border); }
.ac-ic { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: var(--glass-line); color: var(--muted); flex-shrink: 0; }
.ac-ic svg.lucide { width: 13px; height: 13px; }
.ac-item.active .ac-ic { background: var(--accent); color: var(--accent-fg); }
.ac-label { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-label b { color: var(--text); font-weight: 700; }
.ac-desc { margin-left: auto; padding-left: 12px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; font-family: inherit; }
.ac-hint { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 8px 12px; font-size: 12.5px; border-top: 1px solid var(--glass-line); color: var(--text-2); }
.ac-list[hidden] + .ac-hint { border-top: none; }
.ac-cmd { font-weight: 700; color: var(--text); }
.ac-dim { color: var(--muted); }
.ac-on { color: var(--accent-fg); background: var(--accent); border-radius: 5px; padding: 0 5px; font-weight: 600; }
.ac-src { margin-left: auto; font-family: 'Pretendard Variable', Pretendard, sans-serif; font-size: 11.5px; color: var(--muted); padding-left: 10px; }
.grow { flex: 1; min-width: 0; }

/* ============ 설정 파일 편집기 ============ */
.modal.wide { max-width: 860px; }
.modal.wide .modal-body { max-height: calc(100vh - 180px); overflow: auto; }
.cfg { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 16px; align-items: start; }
.cfg-side { position: sticky; top: 80px; max-height: calc(100vh - 100px); display: flex; flex-direction: column; overflow: hidden; }
.cfg-search { padding: 12px; border-bottom: 1px solid var(--border); }
.cfg-list { overflow-y: auto; padding: 6px; }
.cfg-group + .cfg-group { margin-top: 2px; }
.cfg-ghead { display: flex; align-items: center; gap: 8px; width: 100%; height: 34px; padding: 0 8px; border: none; background: none; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-2); text-align: left; }
.cfg-ghead:hover { background: var(--hover); }
.cfg-ghead svg.lucide { width: 15px; height: 15px; color: var(--muted); }
.cfg-ghead .chev { width: 13px; height: 13px; transition: transform .15s; }
.cfg-group.open .chev { transform: rotate(90deg); }
.cfg-ghead span:not(.cfg-count) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfg-count { font-size: 11px; font-weight: 500; color: var(--muted); background: var(--panel-2); border-radius: 999px; padding: 1px 7px; }
.cfg-items { display: none; padding: 2px 0 6px 18px; }
.cfg-group.open .cfg-items { display: block; }
.cfg-item { display: flex; align-items: center; gap: 8px; width: 100%; height: 30px; padding: 0 8px; border: none; background: none; border-radius: 7px; cursor: pointer; font-size: 12.5px; color: var(--text-2); text-align: left; }
.cfg-item svg.lucide { width: 14px; height: 14px; color: var(--muted); flex-shrink: 0; }
.cfg-item:hover { background: var(--hover); color: var(--text); }
.cfg-item.active { background: var(--panel-2); color: var(--text); font-weight: 600; box-shadow: inset 0 0 0 1px var(--border); }
.cfg-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfg-dirty { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); flex-shrink: 0; }

.cfg-main { position: relative; overflow: hidden; min-height: 560px; display: flex; flex-direction: column; }
.cfg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.cfg-title { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.cfg-path { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfg-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-top: 1px; }
.cfg-meta .lang { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; color: var(--muted); border: 1px solid var(--border); border-radius: 5px; padding: 0 5px; }
.dirty-pill { display: inline-flex; align-items: center; gap: 5px; color: var(--warn); font-weight: 500; }
.dirty-pill .dot { width: 6px; height: 6px; }
.cfg-actions { display: flex; align-items: center; gap: 6px; }
.cfg-actions .btn.active { background: var(--panel-2); border-color: var(--text-2); }
.syn { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 500; margin-right: 4px; }
.syn svg.lucide { width: 13px; height: 13px; }
.syn.ok { color: var(--success); background: var(--success-bg); }
.syn.bad { color: var(--danger); background: var(--danger-bg); cursor: pointer; }
.cfg-note { display: flex; align-items: center; gap: 8px; padding: 9px 16px; font-size: 12.5px; border-bottom: 1px solid var(--border); }
.cfg-note.warn { background: var(--warn-bg); color: var(--warn); }
.cfg-editor { flex: 1; min-height: 0; height: calc(100vh - 290px); min-height: 460px; position: relative; }
.cfg-foot { display: flex; align-items: center; gap: 12px; padding: 8px 14px; border-top: 1px solid var(--border); font-size: 12px; min-height: 38px; }
.cfg-err { display: inline-flex; align-items: center; gap: 6px; color: var(--danger); cursor: pointer; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfg-err:empty { cursor: default; }
.cfg-err svg.lucide { width: 14px; height: 14px; flex-shrink: 0; }
.kbds { display: flex; gap: 4px; margin-left: auto; }
.kbds .kbd { height: 20px; font-size: 10.5px; }

.cfg-watch { border-top: 1px solid var(--border); background: var(--panel-2); }
.cw-head { display: flex; align-items: center; gap: 8px; padding: 9px 14px; font-size: 12.5px; }
.cw-head svg.lucide { width: 15px; height: 15px; }
.cw-head .icon-btn { margin-left: auto; }
.cw-lines { max-height: 160px; overflow: auto; padding: 0 14px 10px; font-size: 11.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-all; }
.cw-lines .l-err { color: var(--danger); } .cw-lines .l-warn { color: var(--warn); }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 7px; }
.icon-btn.sm svg.lucide { width: 14px; height: 14px; }

.cfg-hist { position: absolute; top: 0; right: 0; bottom: 0; width: 300px; z-index: 8; background: var(--glass-strong); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-left: 1px solid var(--border); box-shadow: -12px 0 30px -18px rgba(0,0,0,.4); display: flex; flex-direction: column; animation: slideIn .16s ease-out; }
@keyframes slideIn { from { transform: translateX(16px); opacity: 0; } }
.ch-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--glass-line); }
.ch-head b { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; }
.ch-head b svg.lucide { width: 15px; height: 15px; color: var(--muted); }
.ch-list { overflow-y: auto; padding: 8px; }
.ch-item { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 9px 8px; border: none; background: none; border-radius: 9px; cursor: pointer; text-align: left; position: relative; }
.ch-item:hover { background: var(--glass-line); }
.ch-item + .ch-item::before { content: ''; position: absolute; left: 13px; top: -10px; height: 14px; width: 2px; background: var(--border); }
.ch-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--panel); margin-top: 3px; flex-shrink: 0; position: relative; z-index: 1; }
.ch-dot.now { border-color: var(--text); background: var(--text); }
.ch-note { display: block; font-size: 13px; font-weight: 600; color: var(--text); }
.ch-sub { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }

/* 비교(diff) */
.diff { margin-top: 12px; border: 1px solid var(--border); border-radius: 10px; overflow: auto; max-height: 52vh; font-size: 12px; line-height: 1.6; background: var(--console-bg); }
.dl { display: grid; grid-template-columns: 42px 42px 18px 1fr; white-space: pre; }
.dl .dn { color: var(--muted); text-align: right; padding-right: 8px; opacity: .7; user-select: none; }
.dl .dm { color: var(--muted); user-select: none; }
.dl .dt { padding-right: 12px; }
.dl.add { background: color-mix(in srgb, var(--success) 14%, transparent); }
.dl.add .dm, .dl.add .dt { color: var(--success); }
.dl.del { background: color-mix(in srgb, var(--danger) 12%, transparent); }
.dl.del .dm, .dl.del .dt { color: var(--danger); }
.dl.skip { display: block; text-align: center; color: var(--muted); padding: 4px; background: var(--panel-2); font-family: inherit; font-size: 11.5px; }
.diff-empty { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 14px; border-radius: 10px; background: var(--panel-2); color: var(--muted); }
.diff-stat { display: inline-flex; gap: 6px; font-weight: 700; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12.5px; }
.diff-stat .add { color: var(--success); } .diff-stat .del { color: var(--danger); }

/* ============ 코드 편집기 ============ */
.ce { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--console-bg); }
.ce-wrap { position: relative; flex: 1; min-height: 0; display: flex; overflow: hidden; }
.ce-gutter { width: 52px; flex-shrink: 0; overflow: hidden; border-right: 1px solid var(--border); background: color-mix(in srgb, var(--panel-2) 60%, transparent); }
.ce-nums { padding: 12px 10px 12px 0; text-align: right; color: var(--muted); font: 12.5px/1.65 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; opacity: .7; will-change: transform; }
.ce-nums .err { color: var(--danger); font-weight: 700; opacity: 1; }
.ce-area { position: relative; flex: 1; min-width: 0; overflow: hidden; }
.ce-hl, .ce-ta {
  margin: 0; padding: 12px 16px; border: 0; tab-size: 2;
  font: 12.5px/1.65 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre; letter-spacing: 0; word-spacing: 0;
}
.ce-hl { position: absolute; top: 0; left: 0; min-width: 100%; pointer-events: none; color: var(--text); will-change: transform; }
.ce-ta { position: absolute; inset: 0; width: 100%; height: 100%; resize: none; outline: none; background: transparent; color: transparent; caret-color: var(--text); overflow: auto; }
.ce-ta::selection { background: color-mix(in srgb, #4f8cff 32%, transparent); color: transparent; }
.ce-line.err { background: color-mix(in srgb, var(--danger) 14%, transparent); text-decoration: underline wavy color-mix(in srgb, var(--danger) 70%, transparent); text-underline-offset: 3px; }
.tk-key { color: #2563eb; } .tk-str { color: #16803c; } .tk-num { color: #c2410c; } .tk-const { color: #9333ea; }
.tk-com { color: #8b8b93; font-style: italic; } .tk-punc { color: #737373; } .tk-anchor { color: #0891b2; } .tk-color { color: #db2777; font-weight: 700; }
[data-theme='dark'] .tk-key { color: #7cb7ff; } [data-theme='dark'] .tk-str { color: #86efac; } [data-theme='dark'] .tk-num { color: #fdba74; }
[data-theme='dark'] .tk-const { color: #d8b4fe; } [data-theme='dark'] .tk-com { color: #6b6b74; } [data-theme='dark'] .tk-anchor { color: #67e8f9; } [data-theme='dark'] .tk-color { color: #f9a8d4; }
.ce-find { position: absolute; top: 8px; right: 18px; z-index: 6; display: grid; gap: 6px; padding: 8px; border-radius: 10px; background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.ce-find[hidden] { display: none; }
.ce-find-row { display: flex; align-items: center; gap: 4px; }
.ce-find:not(.replace) .ce-find-row:last-child { display: none; }
.ce-find input { width: 190px; height: 30px; padding: 0 9px; border-radius: 7px; border: 1px solid var(--border); background: var(--panel-2); outline: none; font-size: 12.5px; }
.ce-find input:focus { border-color: var(--border-strong); }
.ce-count { min-width: 46px; text-align: center; font-size: 11.5px; color: var(--muted); }
.ce-count.none { color: var(--danger); }
.ce-btn { height: 30px; min-width: 30px; padding: 0 6px; border-radius: 7px; border: 1px solid transparent; background: none; color: var(--text-2); cursor: pointer; font-size: 12px; }
.ce-btn:hover { background: var(--hover); }
.ce-btn.on { border-color: var(--text-2); color: var(--text); }
.ce-btn.wide { padding: 0 10px; border-color: var(--border); }

@media (max-width: 960px) {
  .cfg { grid-template-columns: 1fr; }
  .cfg-side { position: static; max-height: 300px; }
  .cfg-hist { width: 100%; }
}
.cfg-hist[hidden], .cfg-watch[hidden] { display: none; }

/* ============ 웹 지도 ============ */
.map-card { overflow: hidden; height: calc(100vh - 190px); min-height: 480px; }
.map-card iframe { width: 100%; height: 100%; border: 0; display: block; background: var(--console-bg); }
.map-setup { display: grid; gap: 12px; }
.map-step-title { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14.5px; margin-top: 8px; }
.step-n { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.map-plugins { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.map-plugin { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel); }
.map-plugin:first-child { border-color: var(--text-2); }
.map-plugin p { margin: 0; font-size: 13px; color: var(--text-2); }
.map-plugin ol { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--muted); display: grid; gap: 4px; }
.map-plugin-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 6px; }
.alert b { color: inherit; }
.cmd-box { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--console-bg); border: 1px solid var(--border); font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-all; overflow: auto; }

/* ============ 대시보드 ============ */
.dx-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 4px 0 22px; }
.dx-title { min-width: 0; }
.dx-title h2 { margin: 0 0 8px; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--muted); }
.dx-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--border-strong); }
.dx-state { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; color: var(--muted); }
.dx-state.on { color: var(--success); }
.dx-state.off { color: var(--danger); }
.dx-addr { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--text-2); font-variant-numeric: tabular-nums; }
.dx-addr svg.lucide { width: 13px; height: 13px; opacity: 0; transition: opacity .15s; }
.dx-addr:hover { color: var(--text); }
.dx-addr:hover svg.lucide { opacity: .7; }
.dx-actions { display: flex; gap: 6px; }

.dx-main { border-radius: 16px; overflow: hidden; margin-bottom: 28px; }
.dx-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dx-m { padding: 22px 24px 20px; min-width: 0; }
.dx-m + .dx-m { border-left: 1px solid var(--border); }
.dx-l { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.dx-v { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.dx-v small { font-size: 15px; font-weight: 700; color: var(--muted); margin-left: 3px; }
.dx-s { font-size: 12.5px; color: var(--muted); margin-top: 4px; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dx-lv { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.dx-lv.good { background: var(--success); } .dx-lv.warn { background: var(--warn); } .dx-lv.bad { background: var(--danger); }

.dx-chart { border-top: 1px solid var(--border); padding: 18px 24px 8px; }
.dx-chart-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.chart-legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); font-weight: 400; }
.chart-legend b { color: var(--text); font-weight: 800; margin-left: 4px; font-variant-numeric: tabular-nums; }
.chart.soft { height: 210px; overflow: visible; }
.chart.soft .grid-line { stroke: var(--border); opacity: .6; }
.chart.soft .grid-line.base { opacity: 1; }
.chart.soft .axis-label { font-size: 11px; fill: var(--muted); }
.chart.soft .line { fill: none; stroke: var(--chart); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.chart.soft .area { fill: url(#cFill); }
.chart.soft .g0 { stop-color: var(--chart); stop-opacity: .12; }
.chart.soft .g1 { stop-color: var(--chart); stop-opacity: 0; }
.chart.soft .last-dot { fill: var(--chart); stroke: var(--panel); stroke-width: 2; }
.chart.soft .last-glow { fill: var(--chart); opacity: .12; animation: chartPulse 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.chart.soft .hover-line { stroke: var(--border-strong); stroke-dasharray: 3 4; }
.chart.soft .hover-dot { fill: var(--panel); stroke: var(--chart); stroke-width: 2.2; }
.chart.soft.intro .line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: chartDraw 1.1s cubic-bezier(.4,.1,.2,1) forwards; }
.chart.soft.intro .area { opacity: 0; animation: chartFade .8s .4s ease forwards; }
@keyframes chartDraw { to { stroke-dashoffset: 0; } }
@keyframes chartFade { to { opacity: 1; } }
@keyframes chartPulse { 0%,100% { transform: scale(.7); opacity: .16; } 50% { transform: scale(1.3); opacity: .05; } }
.dx-chart .chart-tip { border-radius: 10px; line-height: 1.45; text-align: center; }

.dx-sys { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; padding: 14px 24px; border-top: 1px solid var(--border); background: var(--panel-2); font-size: 12.5px; color: var(--muted); }
.dx-res { display: flex; align-items: center; gap: 10px; }
.dx-res span { font-weight: 700; }
.dx-res b { color: var(--text-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.dx-track { width: 90px; height: 4px; border-radius: 999px; background: var(--border); overflow: hidden; }
.dx-track > div { height: 100%; background: var(--text-2); border-radius: 999px; transition: width .5s; }
.dx-host { margin-left: auto; }

.dx-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.dx-sec { min-width: 0; }
.dx-sec-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.dx-sec-head h3 { margin: 0; font-size: 14px; font-weight: 800; }
.dx-sec-head a { display: inline-flex; align-items: center; gap: 2px; font-size: 12.5px; color: var(--muted); text-decoration: none; }
.dx-sec-head a:hover { color: var(--text); }
.dx-sec-head a svg.lucide { width: 14px; height: 14px; }
.dx-empty { padding: 26px 0; color: var(--muted); font-size: 13px; text-align: center; }

.online-list { display: flex; flex-direction: column; max-height: 260px; overflow: auto; }
.online-row { display: flex; align-items: center; gap: 10px; padding: 8px; margin: 0 -8px; border-radius: 10px; cursor: pointer; }
.online-row:hover { background: var(--hover); }
.online-row .head { border-radius: 7px; }
.online-row .nm { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.online-more { padding: 6px 0; font-size: 12.5px; color: var(--muted); }

.dx-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
.dx-quick button { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px; margin: 0 -8px; border: 0; border-radius: 10px; background: none; cursor: pointer; color: var(--text-2); font-weight: 700; text-align: left; }
.dx-quick button:nth-child(even) { margin: 0 -8px 0 0; }
.dx-quick button:hover { background: var(--hover); color: var(--text); }
.dx-quick svg.lucide { width: 16px; height: 16px; color: var(--muted); }

.dx-audit .list-item { padding: 10px 0; }

@media (max-width: 900px) {
  .dx-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dx-m:nth-child(3) { border-left: 0; }
  .dx-m:nth-child(n+3) { border-top: 1px solid var(--border); }
  .dx-cols { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .dx-host { margin-left: 0; width: 100%; }
}
@media (max-width: 640px) {
  .dx-head { align-items: flex-start; }
  .dx-actions { width: 100%; }
  .dx-actions .btn { flex: 1; }
  .dx-m { padding: 16px; }
  .dx-v { font-size: 24px; }
  .dx-chart { padding: 14px 16px 6px; }
  .dx-sys { padding: 12px 16px; gap: 10px 20px; }
  .dx-track { width: 60px; }
}

/* ============ 여기어때 잘난체 (제목·숫자·메뉴) ============ */
:root { --font-display: 'Pretendard Variable', Pretendard, sans-serif; }
h1, h2, .page-head h2, .dx-title h2, .card-head h3, .dx-sec-head h3, .modal h3,
.brand-title, .nav-cat-btn, .dx-v, .stat-value, .profile-name, .xmas-card h1 {
  font-family: var(--font-display); font-weight: normal; letter-spacing: 0;
}
.dx-v small, .stat-value small { font-family: var(--font-display); font-weight: normal; }
.dx-title h2 { font-size: 28px; }
.nav-cat-btn { font-size: 15px; }

/* ============ 대시보드 (벤토) ============ */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 14px; }
.bt { background: var(--panel); border: 1px solid var(--border); border-radius: 22px; padding: 22px; min-width: 0; position: relative; }
.bt-label { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.bt-sub { font-size: 12.5px; color: var(--muted); margin-top: 6px; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.bt-head h3 { margin: 0; font-size: 16px; }
.bt-head a { display: inline-flex; align-items: center; gap: 2px; font-size: 12.5px; color: var(--muted); text-decoration: none; }
.bt-head a:hover { color: var(--text); }
.bt-head a svg.lucide { width: 14px; height: 14px; }

/* 히어로: 반전 타일 */
.bt-hero { grid-column: span 6; grid-row: span 2; background: var(--text); color: var(--bg); border-color: transparent;
  display: flex; flex-direction: column; padding: 26px 28px; overflow: hidden; }
.bh-deco { position: absolute; right: 26px; top: 50%; transform: translateY(-50%) rotate(-8deg); opacity: .07; pointer-events: none; }
.bh-deco svg.lucide { width: 170px; height: 170px; stroke-width: 1.4; }
.bh-motd { margin-top: 10px; font-size: 13px; color: color-mix(in srgb, var(--bg) 60%, transparent); max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bh-motd:empty { display: none; }
.bh-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bh-state, .bh-ver { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  background: color-mix(in srgb, var(--bg) 12%, transparent); }
.bh-state .dot { color: #22c55e; }
.bt-hero.off .bh-state .dot { color: #ef4444; }
.bh-name { margin: 18px 0 6px; font-size: 38px; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bh-addr { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; background: none; cursor: pointer;
  color: color-mix(in srgb, var(--bg) 70%, transparent); font-size: 14px; font-variant-numeric: tabular-nums; }
.bh-addr svg.lucide { width: 14px; height: 14px; }
.bh-addr:hover { color: var(--bg); }
.bh-addr .bh-copy { opacity: 0; transition: opacity .15s; }
.bh-addr:hover .bh-copy { opacity: .8; }
.bh-actions { margin-top: auto; padding-top: 22px; display: flex; gap: 8px; flex-wrap: wrap; position: relative; z-index: 1; }
.bh-btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 12px; border: 0; cursor: pointer; font-weight: 700;
  background: color-mix(in srgb, var(--bg) 12%, transparent); color: var(--bg); transition: background .15s; }
.bh-btn:hover { background: color-mix(in srgb, var(--bg) 22%, transparent); }
.bh-btn svg.lucide { width: 15px; height: 15px; }

/* 접속자 큰 타일 */
.bt-players { grid-column: span 3; grid-row: span 2; display: flex; flex-direction: column; }
.bt-big { font-family: var(--font-display); font-size: 64px; line-height: 1; margin-top: auto; padding-top: 16px; font-variant-numeric: tabular-nums; }
.bt-big small { font-size: 22px; color: var(--muted); margin-left: 4px; }
.bt-heads { display: flex; margin-top: 14px; min-height: 30px; }
.bt-heads > span { margin-right: -8px; border-radius: 9px; box-shadow: 0 0 0 3px var(--panel); overflow: hidden; display: grid; background: var(--panel-2); }
.bt-heads .head { border-radius: 9px; display: block; }
.bt-heads .more { width: 30px; height: 30px; place-items: center; font-size: 11px; font-weight: 700; color: var(--muted); }

/* 작은 숫자 타일 */
.bt-sm { grid-column: span 3; display: flex; flex-direction: column; }
.bt-num { font-family: var(--font-display); font-size: 30px; line-height: 1.15; margin-top: auto; padding-top: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.bt-num small { font-size: 15px; color: var(--muted); margin-left: 3px; }
.bt-sys .bs-row { display: flex; justify-content: space-between; font-size: 12.5px; margin-top: 10px; }
.bt-sys .bs-row span { color: var(--muted); font-weight: 700; }
.bt-sys .bs-row b { font-variant-numeric: tabular-nums; }
.bs-track { height: 6px; border-radius: 999px; background: var(--panel-2); margin-top: 5px; overflow: hidden; }
.bs-track > div { height: 100%; border-radius: 999px; background: var(--text); transition: width .5s; }

/* 그래프 / 접속 중 */
.bt-chart { grid-column: span 8; grid-row: span 2; padding-bottom: 12px; }
.bt-online { grid-column: span 4; grid-row: span 2; display: flex; flex-direction: column; }
.bt-online .online-list { max-height: 250px; }
.bt-online .online-row { margin: 0 -8px; }

/* 빠른 작업 */
.bt-quick { grid-column: span 4; grid-row: span 2; }
.bq { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bq button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; height: 82px; border: 0; border-radius: 16px;
  background: var(--panel-2); cursor: pointer; font-weight: 700; font-size: 12.5px; color: var(--text-2); transition: background .15s, transform .15s; }
.bq button:hover { background: var(--hover); color: var(--text); transform: translateY(-2px); }
.bq svg.lucide { width: 20px; height: 20px; }

/* 최근 활동 */
.bt-audit { grid-column: span 5; grid-row: span 2; }
.bt-audit .list-item { padding: 9px 0; }

@media (max-width: 1100px) {
  .bento { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .bt-hero, .bt-chart, .bt-audit { grid-column: span 6; }
  .bt-players, .bt-online, .bt-quick { grid-column: span 3; }
  .bt-sm { grid-column: span 3; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .bt { padding: 18px; border-radius: 18px; }
  .bt-hero, .bt-players, .bt-chart, .bt-online, .bt-quick, .bt-audit { grid-column: span 2; grid-row: auto; }
  .bt-sm { grid-column: span 1; }
  .bh-name { font-size: 28px; }
  .bh-deco { display: none; }
  .bt-big { font-size: 48px; }
  .bt-num { font-size: 22px; }
  .bh-actions .bh-btn { flex: 1; justify-content: center; }
}

/* ============ 대시보드 (컴팩트 아이콘) ============ */
.cd-wrap { display: flex; flex-direction: column; gap: 12px; }
.cd-wrap .card { border-radius: 14px; }
.cd-bar { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.cd-srv { width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--accent); color: var(--accent-fg); position: relative; }
.cd-srv svg.lucide { width: 22px; height: 22px; }
.cd-srv::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 13px; height: 13px; border-radius: 50%; background: var(--success); border: 3px solid var(--panel); }
.cd-bar.off .cd-srv::after { background: var(--danger); }
.cd-id { flex: 1; min-width: 0; }
.cd-name { font-family: var(--font-display); font-size: 19px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-meta { display: flex; align-items: center; gap: 14px; margin-top: 4px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.cd-meta svg.lucide { width: 13px; height: 13px; }
.cd-state { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--success); }
.cd-bar.off .cd-state { color: var(--danger); }
.cd-addr, .cd-ver { display: inline-flex; align-items: center; gap: 5px; }
.cd-addr { border: 0; background: none; padding: 0; color: inherit; cursor: pointer; font-variant-numeric: tabular-nums; }
.cd-addr:hover { color: var(--text); }
.cd-ctl { display: flex; gap: 6px; }
.ib { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--panel); color: var(--text-2); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.ib:hover { background: var(--hover); color: var(--text); border-color: var(--border-strong); }
.ib svg.lucide { width: 17px; height: 17px; }
.ib.danger:hover { background: var(--danger-bg); color: var(--danger); border-color: transparent; }

.cd-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.cs { display: flex; align-items: center; gap: 11px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; min-width: 0; }
.cs-ic { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--panel-2); color: var(--text-2); }
.cs-ic svg.lucide { width: 18px; height: 18px; }
.cs[data-lv="good"] .cs-ic { color: var(--success); background: var(--success-bg); }
.cs[data-lv="warn"] .cs-ic { color: var(--warn); background: var(--warn-bg); }
.cs[data-lv="bad"] .cs-ic { color: var(--danger); background: var(--danger-bg); }
.cs-tx { min-width: 0; }
.cs-v { font-family: var(--font-display); font-size: 19px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.cs-v small { font-size: 12px; color: var(--muted); margin-left: 2px; }
.cs-l { font-size: 11.5px; color: var(--muted); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-l span { font-weight: 400; }

.cd-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; }
.cd-grid.b { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.cd-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px 6px; font-size: 13px; font-weight: 800; }
.cd-h > span { display: inline-flex; align-items: center; gap: 7px; }
.cd-h svg.lucide { width: 15px; height: 15px; color: var(--muted); }
.cd-h a { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; color: var(--muted); }
.cd-h a:hover { background: var(--hover); color: var(--text); }
.cd-h .chart-legend { font-weight: 400; gap: 10px; font-size: 12px; }
.cd-chart #chartWrap { padding: 0 14px 6px; }
.cd-online, .cd-audit, .cd-quick { display: flex; flex-direction: column; }

.co { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 14px 14px; max-height: 190px; overflow: auto; }
.co-p { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 10px 0 4px; border-radius: 10px; background: var(--panel-2); cursor: pointer; font-weight: 700; font-size: 12.5px; max-width: 100%; }
.co-p:hover { background: var(--hover); }
.co-p .head { border-radius: 7px; }
.co-p span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-p.more { padding: 0 10px; color: var(--muted); cursor: default; }
.dx-empty svg.lucide { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; }
.cd-online .dx-empty { padding: 30px 0 34px; }

.qa { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 4px 14px 14px; }
.qa button, .qa a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; height: 62px; border-radius: 12px; border: 0; background: var(--panel-2);
  color: var(--text-2); cursor: pointer; font-size: 11.5px; font-weight: 700; text-decoration: none; transition: background .15s, color .15s, transform .15s; }
.qa button:hover, .qa a:hover { background: var(--hover); color: var(--text); transform: translateY(-1px); }
.qa svg.lucide { width: 18px; height: 18px; }

.ca { display: flex; align-items: center; gap: 10px; padding: 7px 16px; font-size: 12.5px; min-width: 0; }
.ca:last-child { padding-bottom: 12px; }
.ca-ic { width: 26px; height: 26px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--panel-2); color: var(--muted); }
.ca-ic svg.lucide { width: 14px; height: 14px; }
.ca-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.ca-t { color: var(--text-2); }
.ca-t b { color: var(--text); font-weight: 800; }
.ca-d { color: var(--muted); margin-left: 4px; }
.ca-w { color: var(--muted); font-size: 11.5px; white-space: nowrap; }

@media (max-width: 1100px) {
  .cd-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .qa { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cd-chart, .cd-online { min-height: 0; }
}
@media (max-width: 760px) {
  .cd-grid, .cd-grid.b { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .cd-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .cd-bar { flex-wrap: wrap; }
  .cd-ctl { width: 100%; }
  .cd-ctl .ib { flex: 1; width: auto; }
  .cs { padding: 10px 12px; }
}

/* ============ 상단바 (어두운 반투명 글래스 · 시바 스타일) ============ */
:root { --brand: #f5a23a; }
.topnav, .mega-bg {
  --text: #f1f1f3; --text-2: rgba(241,241,243,.7); --muted: rgba(241,241,243,.55);
  --hover: rgba(255,255,255,.08); --glass-line: rgba(255,255,255,.1); --glass-border: rgba(255,255,255,.1);
  color: var(--text);
  background: rgba(16, 16, 20, 0.62);
  -webkit-backdrop-filter: blur(15px) saturate(1.5); backdrop-filter: blur(15px) saturate(1.5);
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.topnav { position: sticky; }
.topnav.scrolled { box-shadow: none; }
.topnav-inner { max-width: 1280px; padding: 0 32px; gap: 0; }
.brand { width: 160px; }
.brand-mark { background: #fff; color: #111; box-shadow: none; }
.nav-cats { flex: none; justify-content: flex-start; }
.nav-cat { width: 132px; }
.nav-cat-btn { font-family: inherit; font-size: 17px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; transition: box-shadow .15s; }
.nav-cat-btn::after { display: none; }
.nav-cat:hover .nav-cat-btn, .nav-cat.hover .nav-cat-btn, .nav-cat.active .nav-cat-btn { box-shadow: inset 0 -3px 0 var(--brand); color: var(--text); }
.topnav.mega-open .nav-cat:not(.hover) .nav-cat-btn { box-shadow: none; }
.topnav.mega-open .nav-cat.hover .nav-cat-btn { box-shadow: inset 0 -3px 0 var(--brand); }

.nav-col { top: 65px; padding: 20px 0; gap: 2px; align-items: center; text-align: center; border-left: 0; border-right: 1px solid rgba(255,255,255,.1); transform: translateY(-4px); transition: opacity .2s ease-out, transform .2s ease-out, visibility .2s; }
.nav-cat:first-child .nav-col { border-left: 1px solid rgba(255,255,255,.1); }
.nav-cat:last-child .nav-col { border-right: 1px solid rgba(255,255,255,.1); }
.nav-sub { width: auto; min-height: 36px; padding: 0; gap: 4px; justify-content: center; border-radius: 0; font-size: 15px; font-weight: 400; color: rgba(241,241,243,.7); transition: color .15s; }
.nav-sub .sic { display: none; }
.nav-sub .nl { padding: 0; text-decoration-color: var(--brand); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.nav-sub .nl::after { display: none; }
.nav-sub:hover, .nav-sub.active { color: #fff; background: none; }
.nav-sub:hover .nl, .nav-sub.active .nl { text-decoration-line: underline; }
.mega-bg { top: 65px; transition: opacity .2s ease-out, visibility .2s; }

.topnav-right { margin-left: auto; width: auto; }
.user-btn { height: 40px; padding: 0 12px 0 6px; border-radius: 8px; border: 1px solid rgba(255,255,255,.16); background: transparent; color: var(--text); }
.user-btn:hover { background: rgba(255,255,255,.08); }
.user-btn span { font-weight: 700; font-size: 14px; }
.user-btn .avatar { width: 28px; height: 28px; border-radius: 6px; }
.user-btn .chev { color: rgba(241,241,243,.55); }
.topnav .icon-btn { color: var(--text); }
.topnav .icon-btn:hover { background: rgba(255,255,255,.08); }
@media (max-width: 1100px) { .nav-cat { width: 112px; } .brand { width: auto; margin-right: 24px; } }

/* ============ 접속자 그래프 (시바 시세 그래프 스타일) ============ */
.chart.sb { display: block; width: 100%; height: 200px; overflow: visible; font-family: inherit; }
.chart.sb .gl { stroke: var(--border); }
.chart.sb .ax { font-size: 11px; fill: var(--muted); }
.chart.sb .area { fill: url(#cFill); fill-opacity: .6; }
.chart.sb .g0 { stop-color: var(--brand); stop-opacity: .35; }
.chart.sb .g1 { stop-color: var(--brand); stop-opacity: 0; }
.chart.sb .line { fill: none; stroke: var(--brand); stroke-width: 2; }
.chart.sb .cursor { stroke: #ccc; pointer-events: none; }
[data-theme="dark"] .chart.sb .cursor { stroke: #555; }
.chart.sb .adot { fill: var(--brand); stroke: #fff; stroke-width: 2; }
[data-theme="dark"] .chart.sb .adot { stroke: var(--panel); }
.chart.sb.intro .plot { clip-path: inset(0 100% 0 0); animation: sbReveal 1.2s ease forwards; }
@keyframes sbReveal { to { clip-path: inset(0 0 0 0); } }
.sb-tip { position: absolute; pointer-events: none; z-index: 2; white-space: nowrap; padding: 8px 12px; border-radius: 10px; font-size: 12px; line-height: 1.4;
  background: var(--panel); border: 1px solid var(--border); box-shadow: 0 2px 4px -1px rgba(0,0,0,.08), 0 12px 28px -10px rgba(0,0,0,.22); }
.sb-tip p { margin: 0; }
.sb-tip .tt { color: var(--muted); }
.sb-tip .tv { margin-top: 2px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ============ 화면 높이에 맞추기 (스크롤 없이 한 화면) ============ */
.content { padding: 26px 24px 24px; }
.console { height: calc(100vh - var(--console-off, 394px)); min-height: 300px; }
.cfg { height: calc(100vh - var(--cfg-off, 240px)); min-height: 460px; align-items: stretch; }
.cfg-side { position: static; max-height: none; min-height: 0; }
.cfg-list { flex: 1; min-height: 0; }
.cfg-main { min-height: 0; }
.cfg-editor { height: auto; min-height: 0; }
@media (max-width: 900px) {
  .cfg { height: auto; }
  .cfg-side { max-height: 300px; }
  .cfg-main { height: 70vh; }
}
.pager { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 12px; border-top: 1px solid var(--border); }
.pg-btn { min-width: 32px; height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid transparent; background: none; cursor: pointer; font-weight: 700; font-size: 13px; color: var(--text-2); display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.pg-btn:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.pg-btn.on { background: var(--accent); color: var(--accent-fg); }
.pg-btn:disabled { opacity: .35; cursor: default; }
.pg-btn svg.lucide { width: 16px; height: 16px; }
.pg-gap { color: var(--muted); padding: 0 4px; }
/* 상단 카테고리를 바 정중앙에 */
.topnav-inner { position: relative; }
.nav-cats { position: absolute; left: 50%; top: 0; bottom: 0; transform: translateX(-50%); }
@media (max-width: 860px) { .nav-cats { display: none; } }

/* ============ 모바일: 왼쪽에서 나오는 전체 메뉴 (시바 사이트와 동일 수치) ============ */
.menu-left { margin: 0 4px 0 -8px; width: 44px; height: 44px; }
.menu-left svg.lucide { width: 20px; height: 20px; }
.mobile-menu, .mobile-menu.open {
  display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; right: auto; z-index: 80;
  width: 300px; max-width: 100vw; padding: 0; border: 0;
  background: var(--panel); -webkit-backdrop-filter: none; backdrop-filter: none; overflow: hidden;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
  transform: translateX(-100%); visibility: hidden;
  transition: transform .3s cubic-bezier(.4,0,.2,1), visibility .3s;
}
.mobile-menu.open { transform: none; visibility: visible; transition: transform .5s cubic-bezier(.4,0,.2,1), visibility .5s; }
.drawer-bg { position: fixed; inset: 0; z-index: 79; background: rgba(15,15,20,.45); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); opacity: 0; visibility: hidden; transition: opacity .15s, visibility .15s; }
.drawer-bg.open { opacity: 1; visibility: visible; }
body.no-scroll { overflow: hidden; }
.dr-head { position: relative; display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); flex: none; min-height: 61px; }
.dr-brand { display: flex; align-items: center; gap: 8px; min-width: 0; padding-right: 28px; }
.dr-brand span:last-child { font-size: 19px; font-weight: 800; letter-spacing: -0.03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.dr-brand .brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: var(--accent-fg); box-shadow: none; flex: none; }
.dr-brand .brand-mark svg.lucide { width: 15px; height: 15px; }
.dr-logo { height: 28px; max-width: 200px; object-fit: contain; }
.dr-close { position: absolute; top: 16px; right: 16px; width: 16px; height: 16px; padding: 0; border: 0; border-radius: 2px; background: none; cursor: pointer; color: var(--text); opacity: .7; display: grid; place-items: center; transition: opacity .15s; }
.dr-close:hover { opacity: 1; background: none; }
.dr-close:focus { outline: none; box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--brand); }
.dr-close svg.lucide { width: 16px; height: 16px; }
.dr-body { flex: 1; overflow-y: auto; padding: 8px 0; }
.dr-sec { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.dr-sec + .dr-sec { border-top: 0; }
.dr-sec:last-child { border-bottom: 0; }
.dr-sec h4 { margin: 0 0 8px; padding: 0; font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.5; }
.dr-item { display: flex; align-items: center; justify-content: space-between; min-height: 44px; height: auto; padding: 0; font-size: 15px; color: color-mix(in srgb, var(--text) 75%, transparent); background: none; transition: color .15s; }
.dr-item:hover { color: var(--text); background: none; }
.dr-item.active { color: color-mix(in srgb, var(--text) 75%, transparent); font-weight: 400; box-shadow: none; }
@media (min-width: 861px) { .mobile-menu, .drawer-bg { display: none; } }
.topnav .menu-left { border: 0; background: none; border-radius: 8px; color: rgba(241,241,243,.8); }
.topnav .menu-left:hover { background: rgba(255,255,255,.08); color: #fff; }

/* 제목·큰 숫자: 잘난체 대신 Pretendard 굵게 (시바와 동일) */
:root { --font-display: 'Pretendard Variable', Pretendard, -apple-system, sans-serif; }
h1, h2, .page-head h2, .dx-title h2, .card-head h3, .dx-sec-head h3, .modal h3,
.brand-title, .dx-v, .stat-value, .profile-name, .xmas-card h1,
.cd-name, .cs-v, .bt-big, .bt-num, .bh-name { font-weight: 800; letter-spacing: -0.02em; }
.card-head h3, .dx-sec-head h3 { font-weight: 700; letter-spacing: -0.01em; }
.dx-v small, .stat-value small, .cs-v small { font-weight: 600; }
.nav-cat-btn { font-family: inherit; font-size: 17px; font-weight: 600; letter-spacing: 0; }
body { letter-spacing: -0.005em; }

/* ============ 타이포그래피 (시바 사이트 기준) ============ */
:root:not([data-theme='dark']) { --bg: #fbfbfb; --text: #18181b; --text-2: #3f3f46; --muted: #62626b; --border: #e4e4e7; }
body { font-size: 15px; letter-spacing: -0.01em; line-height: 1.55; -webkit-font-smoothing: antialiased; }
.page-head { position: relative; align-items: flex-end; border-bottom: 1px solid var(--border); padding-bottom: 20px; margin-bottom: 24px; }
/* 제목 아래: 크래파스 로고 색 네 칸 (분홍 · 노랑 · 초록 · 파랑) */
.page-head::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 76px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, #f2577e 0 25%, #ffcf3a 25% 50%, #6cc24a 50% 75%, #3aa3f2 75% 100%); }
.page-head h2 { font-size: 40px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; }
.page-head p { margin-top: 10px; font-size: 15px; color: var(--muted); }
.eyebrow { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; letter-spacing: .05em; color: #a35a1d; }
[data-theme='dark'] .eyebrow { color: var(--brand); }
@media (max-width: 640px) { .page-head h2 { font-size: 30px; } }

/* ============ AI 비서 (사이트 색·글꼴 기준) ============ */
body[data-route='assistant'] .content { max-width: none; padding: 0; }
/* 첫 화면 */
/* 입력창 (한 줄) */
/* 대화 */
/* 명령 승인 (콘솔 블록) */
/* AI 비서: 상대가 입력 중일 때 (메신저처럼 점 세 개가 파도치듯) */
/* AI 비서: 내 메시지는 회색 말풍선, 보내기 버튼은 종이비행기 */
/* 보내기 버튼: 엔터(↵) 아이콘만 은은하게 */
/* 응답 정지 버튼: 검은 작은 네모 */
/* AI 답변이 부드럽게 나타남 */

/* 상단 메뉴 간격 넓힘 */
.nav-cat { width: 156px; }
.nav-col { padding: 24px 0 26px; gap: 6px; }
.nav-sub { min-height: 38px; font-size: 15px; letter-spacing: -0.005em; }
@media (max-width: 1100px) { .nav-cat { width: 124px; } }

/* 프로필 버튼: 둥근 알약 + 동그란 사진 */
.user-btn { height: 40px; padding: 0 12px 0 5px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); }
.user-btn:hover { background: rgba(255,255,255,.12); }
.user-btn .avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }

/* ============ 툴팁 (마우스를 올리면 나오는 설명) ============ */
.tip { position: fixed; z-index: 1000; pointer-events: none; max-width: 280px; padding: 7px 11px; border-radius: 9px;
  background: #18181b; color: #fafafa; font-size: 12.5px; font-weight: 600; line-height: 1.4; letter-spacing: -0.005em;
  box-shadow: 0 8px 24px -6px rgba(0,0,0,.35), 0 2px 6px rgba(0,0,0,.15);
  opacity: 0; transform: translateY(4px) scale(.97); transition: opacity .14s ease, transform .14s ease; }
.tip.below { transform: translateY(-4px) scale(.97); }
.tip.on { opacity: 1; transform: none; }
.tip-arrow { position: absolute; left: var(--ax, 50%); bottom: -4px; width: 9px; height: 9px; margin-left: -4.5px; background: inherit; transform: rotate(45deg); border-radius: 1.5px; }
.tip.below .tip-arrow { bottom: auto; top: -4px; }
[data-theme='dark'] .tip { background: #f4f4f5; color: #18181b; box-shadow: 0 8px 24px -6px rgba(0,0,0,.6); }

/* ============ 로그인 직후 환영 화면 ============ */
.hi { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; cursor: default; overflow: hidden;
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  -webkit-backdrop-filter: blur(24px) saturate(1.2); backdrop-filter: blur(24px) saturate(1.2);
  animation: hiIn .5s ease both; transition: opacity .7s cubic-bezier(.4,0,.2,1); }
.hi.out { opacity: 0; pointer-events: none; }
.hi-c { text-align: center; transition: transform .7s cubic-bezier(.4,0,.2,1); }
.hi.out .hi-c { transform: translateY(-8px); }
.hi-t { margin: 0; font-size: clamp(40px, 6vw, 60px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.15; color: var(--text);
  animation: hiUp .7s .1s cubic-bezier(.2,.8,.2,1) both; }
.hi-n { margin: 14px 0 0; font-size: clamp(20px, 2.4vw, 24px); font-weight: 600; color: var(--muted); letter-spacing: -0.01em;
  animation: hiUp .7s .35s cubic-bezier(.2,.8,.2,1) both; }
@keyframes hiIn { from { opacity: 0; } }
@keyframes hiUp { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { .hi, .hi * { animation-duration: .01s !important; animation-delay: 0s !important; } }

/* 상단바 로고 이미지 (정사각형 블록 로고) */
.brand-logo { height: 40px; width: auto; filter: drop-shadow(0 1px 3px rgba(0,0,0,.12)); }

/* ============ 드롭다운 (기본 select 대신) ============ */
.cs { position: relative; display: inline-flex; width: 100%; vertical-align: middle; }
.cs-native { position: absolute !important; inset: 0; width: 100% !important; opacity: 0; pointer-events: none; }
.cs-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; height: 38px; padding: 0 10px 0 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--panel); color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,.03); transition: border-color .15s, box-shadow .15s; }
.cs-btn:hover { border-color: var(--border-strong); }
.cs-btn:focus-visible, .cs-btn.open { outline: none; border-color: var(--border-strong); box-shadow: 0 0 0 4px var(--ring); }
.cs-btn:disabled { opacity: .5; cursor: default; }
.cs-val { overflow: hidden; text-overflow: ellipsis; }
.cs-chev { flex: none; color: var(--muted); transition: transform .2s; }
.cs-btn.open .cs-chev { transform: rotate(180deg); }
.cs-menu { position: fixed; z-index: 1500; padding: 5px; border-radius: 12px; overflow-y: auto; outline: none;
  background: var(--glass-strong, var(--panel)); border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: 0 16px 40px -12px rgba(0,0,0,.28), 0 2px 8px rgba(0,0,0,.08);
  opacity: 0; transform: translateY(-4px) scale(.98); transform-origin: top; transition: opacity .12s ease, transform .14s ease; }
.cs-menu.up { transform-origin: bottom; transform: translateY(4px) scale(.98); }
.cs-menu.in { opacity: 1; transform: none; }
.cs-menu.out { opacity: 0; }
.cs-opt { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; padding: 0 10px 0 12px; border-radius: 8px;
  font-size: 14px; color: var(--text-2); cursor: pointer; white-space: nowrap; user-select: none; }
.cs-opt.act { background: var(--hover); color: var(--text); }
.cs-opt.on { color: var(--text); font-weight: 700; }
.cs-ck { display: grid; place-items: center; color: var(--brand); opacity: 0; }
.cs-opt.on .cs-ck { opacity: 1; }
.cs-opt.off { opacity: .4; cursor: default; }
[data-theme='dark'] .cs-menu { box-shadow: 0 16px 40px -12px rgba(0,0,0,.7); }

/* ============ 처음 로그인: 닉네임 정하기 ============ */
.nk { position: fixed; inset: 0; z-index: 2100; display: grid; place-items: center; padding: 24px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  -webkit-backdrop-filter: blur(24px) saturate(1.2); backdrop-filter: blur(24px) saturate(1.2);
  animation: hiIn .4s ease both; transition: opacity .45s ease; }
.nk.out { opacity: 0; pointer-events: none; }
.nk-c { width: 100%; max-width: 440px; text-align: center; animation: hiUp .6s .05s cubic-bezier(.2,.8,.2,1) both; }
.nk-t { margin: 0; font-size: clamp(30px, 4.6vw, 44px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.2; color: var(--text); }
.nk-s { margin: 12px 0 30px; font-size: 15px; color: var(--muted); }
.nk-field { position: relative; }
.nk-in { width: 100%; height: 58px; padding: 0 70px 0 20px; border-radius: 16px; border: 1px solid var(--border-strong); background: var(--panel); color: var(--text);
  font: inherit; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; text-align: center; outline: none; box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s; }
.nk-in::placeholder { color: var(--muted); font-weight: 600; opacity: .6; }
.nk-in:focus { border-color: var(--text-2); box-shadow: 0 0 0 5px var(--ring); }
.nk-count { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; pointer-events: none; }
.nk-err { margin: 10px 0 0; font-size: 13.5px; color: var(--danger); }
.nk-err[hidden] { display: none; }
.nk-btns { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; margin-top: 16px; }
.nk-skip, .nk-ok { height: 50px; border-radius: 14px; font: inherit; font-size: 15.5px; font-weight: 700; cursor: pointer; transition: background .15s, opacity .15s, transform .15s; }
.nk-skip { border: 1px solid var(--border); background: transparent; color: var(--text-2); }
.nk-skip:hover { background: var(--hover); color: var(--text); }
.nk-ok { border: 0; background: var(--text); color: var(--bg); }
.nk-ok:hover:not(:disabled) { transform: translateY(-1px); }
.nk-ok:disabled { opacity: .3; cursor: default; }
.nk-hint { margin: 18px 0 0; font-size: 13px; color: var(--muted); }
.nk-hint b { color: var(--text-2); font-weight: 700; }
.nk-field.bad .nk-in { border-color: var(--danger); box-shadow: 0 0 0 5px var(--danger-bg); }

/* ============ 자동 재시작 ============ */
.sc-warn { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin-bottom: 16px; border-radius: 14px; background: var(--warn-bg); color: var(--text-2); font-size: 14px; line-height: 1.6; border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }
.sc-warn > svg.lucide { width: 18px; height: 18px; color: var(--warn); flex: none; margin-top: 2px; }
.sc-warn code, .sc-card code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12.5px; padding: 1px 6px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--border); word-break: break-all; }
.sc-live { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-bottom: 16px; border-radius: 16px; border: 1px solid var(--border); background: var(--panel); }
.sc-live > svg.lucide { width: 20px; height: 20px; color: var(--muted); flex: none; }
.sc-live > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sc-live b { font-size: 15px; font-weight: 700; }
.sc-live small { font-size: 13px; color: var(--muted); }
.sc-live.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 7%, var(--panel)); }
.sc-live.on b { font-size: 17px; font-variant-numeric: tabular-nums; }
.sc-pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); flex: none; box-shadow: 0 0 0 0 var(--brand); animation: scPulse 1.6s infinite; }
@keyframes scPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 60%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
.sc-now { display: flex; gap: 6px; }
.sc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.sc-card { border-radius: 16px; overflow: hidden; }
.sc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 20px 16px; border-bottom: 1px solid var(--border); }
.sc-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.sc-head h3 svg.lucide { width: 18px; height: 18px; color: var(--muted); }
.sc-head p { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }
.sc-head .switch { margin-top: 2px; }
.sc-body { padding: 8px 20px 20px; display: flex; flex-direction: column; transition: opacity .2s; }
.sc-body.off { opacity: .45; pointer-events: none; }
.sc-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.sc-row.top { align-items: flex-start; }
.sc-lbl { width: 64px; flex: none; font-size: 13.5px; font-weight: 700; color: var(--text-2); }
.sc-time { width: 140px; }
.sc-days { display: flex; flex-wrap: wrap; gap: 6px; }
.sc-day { min-width: 38px; height: 34px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); color: var(--text-2); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.sc-day:hover { border-color: var(--border-strong); color: var(--text); }
.sc-day.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.sc-day.sun:not(.on) { color: #e5484d; }
.sc-day.sat:not(.on) { color: #3b82f6; }
.sc-warns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: 1; }
.sc-warns span { height: 26px; padding: 0 9px; border-radius: 999px; background: var(--panel-2); font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; color: var(--text-2); }
.sc-warns small, .sc-help { width: 100%; font-size: 12.5px; color: var(--muted); }
.sc-help { margin-left: 78px; }
.sc-next { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--panel-2); font-size: 14px; color: var(--text-2); }
.sc-next svg.lucide { width: 16px; height: 16px; color: var(--muted); }
.sc-next b { color: var(--text); }
.sc-next span { margin-left: auto; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sc-step { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.sc-step button { width: 36px; height: 36px; border: 0; background: var(--panel); color: var(--text-2); display: grid; place-items: center; cursor: pointer; }
.sc-step button:hover { background: var(--hover); color: var(--text); }
.sc-step svg.lucide { width: 15px; height: 15px; }
.sc-step b { min-width: 44px; text-align: center; font-size: 15px; font-variant-numeric: tabular-nums; }
.sc-last { display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.sc-last span { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.sc-last span svg.lucide { width: 15px; height: 15px; }
.sc-last .ok { color: var(--success); }
.sc-last .bad { color: var(--danger); }
.sc-last small { color: var(--muted); font-size: 13px; }
.sc-note { display: flex; gap: 8px; align-items: flex-start; margin: 16px 0 0; font-size: 13px; color: var(--muted); line-height: 1.6; }
.sc-note svg.lucide { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.sc-note b { color: var(--text-2); }
.sc-save { position: sticky; bottom: 20px; z-index: 5; display: flex; align-items: center; gap: 8px; width: max-content; margin: 20px auto 0; padding: 8px 8px 8px 18px; border-radius: 14px;
  background: var(--glass-strong, var(--panel)); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s, transform .2s; }
.sc-save.show { opacity: 1; transform: none; pointer-events: auto; }
.sc-save span { font-size: 14px; font-weight: 600; margin-right: 6px; }
@media (max-width: 900px) { .sc-grid { grid-template-columns: minmax(0, 1fr); } .sc-live { flex-wrap: wrap; } .sc-help { margin-left: 0; } }
.sc-live > div.sc-now { flex: none; flex-direction: row; gap: 6px; }
.sc-live > div > span { font-size: 15px; }
.sc-live.on > div > span { font-size: 16px; }

/* ============ 시간 선택 (기본 time 입력 대신) ============ */
.tp { position: relative; display: inline-flex; vertical-align: middle; }
.tp-native { position: absolute !important; inset: 0; width: 100% !important; opacity: 0; pointer-events: none; }
.tp-btn { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border-radius: 10px; min-width: 132px;
  border: 1px solid var(--border); background: var(--panel); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,.03); transition: border-color .15s, box-shadow .15s; }
.tp-btn:hover { border-color: var(--border-strong); }
.tp-btn:focus-visible, .tp-btn.open { outline: none; border-color: var(--border-strong); box-shadow: 0 0 0 4px var(--ring); }
.tp-btn:disabled { opacity: .5; cursor: default; }
.tp-ic { order: -1; display: grid; place-items: center; color: var(--muted); }
.tp-ic svg { width: 16px; height: 16px; }
.tp-val { display: inline-flex; align-items: center; gap: 6px; }
.tp-val .tp-ap { color: var(--text-2); font-weight: 600; }
.tp-val b { font-weight: 700; font-variant-numeric: tabular-nums; }

.tp-pop { position: fixed; z-index: 1500; width: 264px; padding: 10px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--border);
  box-shadow: 0 16px 40px -12px rgba(0,0,0,.25), 0 2px 8px rgba(0,0,0,.06);
  opacity: 0; transform: translateY(-4px); transition: opacity .12s ease, transform .14s ease; }
.tp-pop.up { transform: translateY(4px); }
.tp-pop.in { opacity: 1; transform: none; }
.tp-pop.out { opacity: 0; }
[data-theme='dark'] .tp-pop { box-shadow: 0 16px 40px -12px rgba(0,0,0,.7); }
.tp-seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 10px; background: var(--panel-2); }
.tp-thumb { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 8px; background: var(--panel);
  box-shadow: 0 1px 3px rgba(0,0,0,.12); transition: transform .2s cubic-bezier(.3,.7,.3,1); }
[data-theme='dark'] .tp-thumb { background: var(--hover); box-shadow: none; }
.tp-seg.pm .tp-thumb { transform: translateX(100%); }
.tp-seg button { position: relative; height: 30px; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; transition: color .15s; }
.tp-seg button.on { color: var(--text); font-weight: 700; }
.tp-lbl { margin: 12px 2px 6px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.tp-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.tp-c { height: 32px; border: 0; border-radius: 8px; background: none; color: var(--text-2); font: inherit; font-size: 13.5px; font-weight: 600;
  font-variant-numeric: tabular-nums; cursor: pointer; transition: background .12s, color .12s; }
.tp-c:hover { background: var(--hover); color: var(--text); }
.tp-c:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ring); }
.tp-c.on { background: var(--text); color: var(--bg); font-weight: 700; }

/* ============ Paper 업데이트 ============ */
.pu-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 24px; border-radius: 16px; margin-bottom: 16px; }
.pu-cur { display: flex; align-items: center; gap: 16px; min-width: 0; }
.pu-logo { width: 52px; height: 52px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--panel-2); color: var(--text); border: 1px solid var(--border); }
.pu-logo svg.lucide { width: 24px; height: 24px; }
.pu-eyebrow { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.pu-ver { display: flex; align-items: baseline; gap: 10px; margin-top: 2px; font-size: 26px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; }
.pu-build { font-size: 16px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.pu-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.pu-meta > svg.lucide { width: 14px; height: 14px; margin-right: -8px; }
.pu-status { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--panel-2); color: var(--text-2); }
.pu-status svg.lucide { width: 14px; height: 14px; }
.pu-status.ok { background: var(--success-bg); color: var(--success); }
.pu-status.new { background: color-mix(in srgb, var(--brand) 14%, transparent); color: color-mix(in srgb, var(--brand) 80%, var(--text)); }
.pu-check { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.pu-check small { font-size: 12.5px; color: var(--muted); }
.pu-err { margin-top: -4px; }
.pu-dl .pu-bar { height: 6px; border-radius: 999px; background: var(--panel-2); overflow: hidden; margin: 8px 0 4px; }
.pu-dl .pu-bar i { display: block; height: 100%; border-radius: inherit; background: var(--text); transition: width .4s ease; }
.pu-staged > svg.lucide { width: 22px; height: 22px; color: var(--brand); flex: none; }
.pu-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.pu-new { padding-top: 16px; gap: 14px; }
.pu-nb { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pu-nb > div { display: flex; align-items: center; gap: 8px; }
.pu-nb b { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pu-nb small { font-size: 12.5px; color: var(--muted); }
.pu-ch { height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 800; display: inline-flex; align-items: center; background: var(--success-bg); color: var(--success); }
.pu-ch.beta, .pu-ch.alpha { background: var(--warn-bg); color: var(--warn); }
.pu-changes { list-style: none; margin: 0; padding: 4px 0; border-radius: 12px; background: var(--panel-2); max-height: 210px; overflow: auto; }
.pu-changes li { display: flex; gap: 10px; padding: 7px 14px; font-size: 13.5px; color: var(--text-2); line-height: 1.5; }
.pu-changes code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; color: var(--muted); flex: none; padding-top: 1px; }
.pu-empty { margin: 0; font-size: 13px; color: var(--muted); }
.pu-act { display: flex; justify-content: flex-end; }
.pu-done { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--success); }
.pu-done svg.lucide { width: 16px; height: 16px; }
.pu-empty-c { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 0 18px; color: var(--muted); text-align: center; font-size: 13.5px; }
.pu-empty-c svg.lucide { width: 26px; height: 26px; opacity: .7; }
.pu-empty-c p { margin: 0; }
.pu-empty-c b { color: var(--text-2); }
.pu-major { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--border-strong); }
.pu-major > svg.lucide { width: 18px; height: 18px; color: var(--muted); flex: none; }
.pu-major > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.pu-major small { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.pu-seg { display: inline-grid; grid-auto-flow: column; padding: 3px; border-radius: 10px; background: var(--panel-2); }
.pu-seg button { height: 30px; padding: 0 14px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.pu-seg button.on { background: var(--panel); color: var(--text); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
[data-theme='dark'] .pu-seg button.on { background: var(--hover); box-shadow: none; }
.pu-hist { flex: 1; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.pu-hist > div { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.pu-hist svg.lucide { width: 14px; height: 14px; color: var(--muted); }
.pu-hist em { font-style: normal; color: var(--muted); }
.pu-hist small { margin-left: auto; color: var(--muted); font-size: 12.5px; }
.pu-roll { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding-top: 14px; }
.pu-roll small { font-size: 12.5px; color: var(--muted); }
.pu-roll code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; }
.pu-warnlist { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.pu-warnlist p { margin: 0; display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.55; }
.pu-warnlist svg.lucide { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--muted); }
@media (max-width: 900px) {
  .pu-grid { grid-template-columns: minmax(0, 1fr); }
  .pu-hero { flex-direction: column; align-items: stretch; }
  .pu-check { flex-direction: row; align-items: center; justify-content: space-between; }
  .pu-staged { flex-wrap: wrap; }
}

.pu-hist > small.muted { margin-left: 0; }
.nt-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; padding-top: 4px; }
.nt-types .nt-type { padding: 10px 0; }
.nt-types .nt-type:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
.nt-tl { font-size: 13.5px; }
@media (max-width: 600px) { .nt-types { grid-template-columns: minmax(0, 1fr); } .nt-types .nt-type:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid var(--border); } }

/* ============ 대시보드 위젯 배치 ============ */
.dw-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.dw { position: relative; min-width: 0; display: flex; flex-direction: column; }
.dw > .card, .dw > .cd-stats { flex: 1; }
.dw .card { border-radius: 14px; }
.dw-full { grid-column: span 6; } .dw-wide { grid-column: span 4; } .dw-half { grid-column: span 3; } .dw-third { grid-column: span 2; }
.cd-stats { grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); }

@media (max-width: 1100px) {
  .dw-third { grid-column: span 3; } .dw-wide { grid-column: span 6; }
  .cd-stats { grid-template-columns: repeat(min(var(--n, 6), 3), minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .dw-grid > .dw { grid-column: span 6; }

}
@media (max-width: 520px) { .cd-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ============ 로그인 기기 ============ */
.dv-sum { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 16px; margin-bottom: 12px; }
.dv-sum-ic { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--success-bg); color: var(--success); }
.dv-sum-ic svg.lucide { width: 22px; height: 22px; }
.dv-sum > div:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.dv-sum small { font-size: 12.5px; color: var(--muted); }
.dv-list { border-radius: 16px; padding: 6px 20px 8px; }
.dv-g { padding: 14px 0 4px; font-size: 12px; font-weight: 800; color: var(--muted); }
.dv { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.dv:last-child { border-bottom: 0; }
.dv-ic { position: relative; width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--panel-2); color: var(--text-2); }
.dv-ic svg.lucide { width: 20px; height: 20px; }
.dv.cur .dv-ic { background: var(--text); color: var(--bg); }
.dv-live { position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%; background: var(--success); border: 2.5px solid var(--panel); }
.dv-tx { flex: 1; min-width: 0; }
.dv-n { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; letter-spacing: -0.01em; }
.dv-n em { font-style: normal; font-size: 11px; font-weight: 800; height: 20px; padding: 0 7px; border-radius: 6px; display: inline-flex; align-items: center; background: var(--success-bg); color: var(--success); }
.dv-m { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.dv-m span { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.dv-m svg.lucide { width: 13px; height: 13px; }
.dv-note { margin-top: 4px; font-size: 12px; color: var(--muted); }
.dv-out:hover { color: var(--danger); background: var(--danger-bg); border-color: transparent; }
.dv-empty { display: flex; align-items: center; gap: 8px; padding: 18px 0 14px; font-size: 13.5px; color: var(--muted); }
.dv-empty svg.lucide { width: 16px; height: 16px; color: var(--success); }
.dv-list + .sc-note a { color: var(--text); font-weight: 700; }
@media (max-width: 640px) {
  .dv-sum { flex-wrap: wrap; } .dv-sum .btn { width: 100%; justify-content: center; }
  .dv { flex-wrap: wrap; } .dv > .btn { margin-left: 56px; }
}

/* ============ 최적화 점검 ============ */
.op-hero { display: flex; align-items: center; gap: 22px; padding: 22px 24px; border-radius: 16px; margin-bottom: 14px; }
.op-score { position: relative; width: 84px; height: 84px; flex: none; display: grid; place-items: center; }
.op-score b { position: absolute; font-family: var(--font-display); font-size: 26px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.op-ring { width: 84px; height: 84px; transform: rotate(-90deg); }
.op-ring circle { fill: none; stroke-width: 7; stroke-linecap: round; }
.op-ring .bg { stroke: var(--panel-2); }
.op-ring .fg { stroke: var(--text); transition: stroke-dashoffset .8s cubic-bezier(.2,.7,.2,1); }
.op-ring.good .fg { stroke: var(--success); } .op-ring.warn .fg { stroke: var(--brand); } .op-ring.bad .fg { stroke: var(--danger); }
.op-sum { flex: 1; min-width: 0; }
.op-sum h3 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.op-sum p { margin: 4px 0 0; font-size: 14px; color: var(--text-2); }
.op-sys { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.op-sys span { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 8px; background: var(--panel-2); font-size: 12px; font-weight: 700; color: var(--text-2); }
.op-sys svg.lucide { width: 13px; height: 13px; color: var(--muted); }
.op-hero-act { display: flex; gap: 8px; flex: none; }
.op-filter { margin-bottom: 12px; }
.op-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.op-cat { border-radius: 16px; padding: 4px 18px 6px; }
.op-cat-h { display: flex; align-items: center; gap: 8px; padding: 14px 0 10px; border-bottom: 1px solid var(--border); }
.op-cat-h svg.lucide { width: 16px; height: 16px; color: var(--muted); }
.op-cat-h b { font-size: 15px; font-weight: 800; }
.op-cat-h small { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--muted); }
.op-it { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.op-it:last-child { border-bottom: 0; }
.op-st { width: 22px; flex: none; display: grid; place-items: start center; padding-top: 1px; }
.op-st svg.lucide { width: 18px; height: 18px; color: var(--success); }
.op-it.info .op-st svg.lucide, .op-it.unknown .op-st svg.lucide { color: var(--muted); }
.op-ck { width: 22px; flex: none; cursor: pointer; padding-top: 1px; }
.op-ck input { position: absolute; opacity: 0; pointer-events: none; }
.op-ck span { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border-strong); display: grid; place-items: center; color: transparent; transition: background .15s, border-color .15s, color .15s; }
.op-ck span svg.lucide { width: 13px; height: 13px; stroke-width: 3; }
.op-ck input:checked + span { background: var(--text); border-color: var(--text); color: var(--bg); }
.op-ck input:focus-visible + span { box-shadow: 0 0 0 3px var(--ring); }
.op-tx { flex: 1; min-width: 0; }
.op-t { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 14.5px; font-weight: 800; letter-spacing: -0.01em; }
.op-imp { height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; background: var(--panel-2); color: var(--muted); }
.op-imp.high { background: color-mix(in srgb, var(--brand) 14%, transparent); color: color-mix(in srgb, var(--brand) 80%, var(--text)); }
.op-risk { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 800; background: var(--warn-bg); color: var(--warn); }
.op-risk svg.lucide { width: 11px; height: 11px; }
.op-tx p { margin: 5px 0 0; font-size: 13px; line-height: 1.6; color: var(--text-2); }
.op-it.ok .op-tx p { color: var(--muted); }
.op-ch { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.op-ch span { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 8px; background: var(--panel-2); font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.op-ch code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11.5px; color: var(--muted); }
.op-ch svg.lucide { width: 12px; height: 12px; color: var(--muted); }
.op-ch b { color: var(--text); }
.op-f { display: inline-flex; align-items: center; gap: 4px; margin-top: 7px; font-size: 11.5px; color: var(--muted); font-family: 'JetBrains Mono', ui-monospace, monospace; }
.op-f svg.lucide { width: 11px; height: 11px; }
.op-confirm { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; text-align: left; }
.op-confirm div { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.op-confirm svg.lucide { width: 15px; height: 15px; color: var(--success); }
@media (max-width: 1000px) { .op-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) { .op-hero { flex-wrap: wrap; } .op-hero-act { width: 100%; } .op-hero-act .btn { flex: 1; justify-content: center; } }
.op-it.ok { padding: 10px 0; }
.op-it.ok .op-tx p, .op-it.ok .op-f { display: none; }
.op-it.ok .op-ch { margin-top: 6px; }
.op-it.ok .op-t { font-weight: 700; color: var(--text-2); }
.dv-n em { white-space: nowrap; flex: none; }
@media (max-width: 640px) {
  .dv { display: grid; grid-template-columns: 42px minmax(0, 1fr); column-gap: 12px; row-gap: 10px; align-items: start; }
  .dv > .btn { grid-column: 2; margin-left: 0; justify-self: start; }
  .dv-n { flex-wrap: wrap; }
}

/* ============ 플러그인 찾기 ============ */
.ps-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.ps-search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 12px 0 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--panel);
  box-shadow: 0 1px 2px rgba(0,0,0,.03); transition: border-color .15s, box-shadow .15s; }
.ps-search:focus-within { border-color: var(--border-strong); box-shadow: 0 0 0 4px var(--ring); }
.ps-search > svg.lucide { width: 18px; height: 18px; color: var(--muted); flex: none; }
.ps-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 15px; }
.ps-search input::placeholder { color: var(--muted); }
.ps-search kbd { font: inherit; font-size: 11px; font-weight: 700; color: var(--muted); padding: 3px 7px; border-radius: 6px; border: 1px solid var(--border); }
.ps-src { flex: none; height: 46px; align-items: center; border-radius: 13px; padding: 4px; }
.ps-src button { height: 38px; padding: 0 16px; border-radius: 10px; }
.ps-bar .cs { width: 150px; flex: none; }
.ps-bar .cs-btn { height: 46px; border-radius: 13px; }
.ps-cats { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 14px; }
.ps-cats::-webkit-scrollbar { display: none; }
.ps-cats button { flex: none; height: 32px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel); color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.ps-cats button:hover { border-color: var(--border-strong); color: var(--text); }
.ps-cats button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.ps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.ps-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--border); cursor: pointer; outline: none;
  transition: border-color .15s, box-shadow .2s, transform .2s; min-width: 0; }
.ps-card:hover, .ps-card:focus-visible { border-color: var(--border-strong); box-shadow: 0 10px 28px -16px rgba(0,0,0,.3); transform: translateY(-2px); }
[data-theme='dark'] .ps-card:hover { box-shadow: 0 10px 28px -16px rgba(0,0,0,.9); }
.ps-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ps-ic { width: 46px; height: 46px; flex: none; border-radius: 12px; object-fit: cover; background: var(--panel-2); image-rendering: auto; }
.ps-ic.lg { width: 64px; height: 64px; border-radius: 16px; }
.ps-ic-none { display: grid; place-items: center; color: var(--muted); }
.ps-ic-none svg.lucide { width: 22px; height: 22px; }
.ps-ttl { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ps-ttl b { font-size: 15.5px; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-ttl small { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-tag { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 7px; font-size: 11.5px; font-weight: 800; }
.ps-tag svg.lucide { width: 12px; height: 12px; stroke-width: 3; }
.ps-tag.inst { background: var(--success-bg); color: var(--success); }
.ps-desc { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.ps-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.ps-meta span { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.ps-meta svg.lucide { width: 13px; height: 13px; }
.ps-meta .ps-ok { color: var(--success); }
.ps-meta .ps-no { color: var(--warn); }
.ps-cat-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; }
.ps-cat-tags span { height: 22px; padding: 0 8px; border-radius: 6px; background: var(--panel-2); font-size: 11.5px; font-weight: 700; color: var(--text-2); display: inline-flex; align-items: center; }
.ps-skel { cursor: default; gap: 12px; }
.ps-skel:hover { transform: none; box-shadow: none; border-color: var(--border); }
.ps-skel i { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--panel-2), var(--hover), var(--panel-2)); background-size: 200% 100%; animation: psShimmer 1.2s infinite; }
.ps-skel i:first-child { height: 46px; width: 46px; border-radius: 12px; }
.ps-skel i:last-child { width: 60%; }
@keyframes psShimmer { to { background-position: -200% 0; } }
.ps-empty { grid-column: 1 / -1; }
.ps-more { display: flex; justify-content: center; padding: 18px 0 8px; }
.ps-more .muted { margin-left: 4px; font-weight: 500; }

/* 자세히 패널 */
.ps-sheet { position: fixed; inset: 0; z-index: 95; }
.ps-sheet-bg { position: absolute; inset: 0; background: rgba(0,0,0,.28); opacity: 0; transition: opacity .2s; }
.ps-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); background: var(--panel); border-left: 1px solid var(--border); box-shadow: -20px 0 50px -20px rgba(0,0,0,.35);
  transform: translateX(24px); opacity: 0; transition: transform .22s cubic-bezier(.2,.7,.2,1), opacity .18s; display: flex; flex-direction: column; }
.ps-sheet.in .ps-sheet-bg { opacity: 1; }
.ps-sheet.in .ps-panel { transform: none; opacity: 1; }
.ps-x { position: absolute; top: 14px; right: 14px; z-index: 2; }
.ps-body { flex: 1; overflow-y: auto; padding: 24px 24px 0; display: flex; flex-direction: column; }
.ps-head { display: flex; align-items: center; gap: 14px; padding-right: 36px; }
.ps-head h3 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; }
.ps-head small { font-size: 13px; color: var(--muted); }
.ps-lead { margin: 14px 0 0; font-size: 14.5px; line-height: 1.65; color: var(--text-2); }
.ps-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 16px; border: 1px solid var(--border); border-radius: 14px; }
.ps-stats > div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 0; }
.ps-stats > div + div { border-left: 1px solid var(--border); }
.ps-stats b { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ps-stats span { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.ps-inst { display: flex; gap: 10px; align-items: center; margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--success-bg); }
.ps-inst > svg.lucide { width: 18px; height: 18px; color: var(--success); flex: none; }
.ps-inst div { display: flex; flex-direction: column; font-size: 13.5px; min-width: 0; }
.ps-inst small { color: var(--text-2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-gal { display: flex; gap: 8px; overflow-x: auto; margin-top: 14px; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.ps-gal img { height: 140px; border-radius: 12px; border: 1px solid var(--border); flex: none; scroll-snap-align: start; object-fit: cover; }
.ps-sec { margin: 20px 0 8px; font-size: 12.5px; font-weight: 800; color: var(--muted); }
.ps-vers { display: flex; flex-direction: column; gap: 4px; }
.ps-ver { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 11px; border: 1px solid transparent; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: background .12s, border-color .12s; }
.ps-ver:hover:not(:disabled) { background: var(--hover); }
.ps-ver.on { border-color: var(--text); background: var(--panel-2); }
.ps-ver:disabled { opacity: .45; cursor: default; }
.ps-radio { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 1.5px solid var(--border-strong); position: relative; }
.ps-ver.on .ps-radio { border-color: var(--text); }
.ps-ver.on .ps-radio::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--text); }
.ps-vn { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ps-vn b { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-vn small { font-size: 12px; color: var(--muted); }
.ps-ver em { flex: none; font-style: normal; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; background: var(--panel-2); color: var(--muted); }
.ps-ver em.ok { background: var(--success-bg); color: var(--success); }
.ps-ver em.t-beta, .ps-ver em.t-alpha { background: var(--warn-bg); color: var(--warn); }
.ps-note { font-size: 13.5px; color: var(--muted); margin: 0; }
.ps-warn { display: flex; gap: 9px; align-items: flex-start; margin-top: 10px; padding: 11px 13px; border-radius: 12px; background: var(--warn-bg); font-size: 13px; line-height: 1.55; color: var(--text-2); }
.ps-warn svg.lucide { width: 16px; height: 16px; color: var(--warn); flex: none; margin-top: 2px; }
.ps-deps { display: flex; flex-direction: column; gap: 6px; }
.ps-dep { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 11px; background: var(--panel-2); font-size: 13.5px; font-weight: 700; }
.ps-dep > svg.lucide { width: 16px; height: 16px; color: var(--muted); }
.ps-dep.ok > svg.lucide { color: var(--success); }
.ps-dep > span { flex: 1; }
.ps-dep small { font-size: 12px; color: var(--muted); }
.ps-dep a { font-size: 12.5px; color: var(--text); }
.ps-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; cursor: pointer; color: var(--text-2); }
.ps-chk input { accent-color: var(--text); width: 15px; height: 15px; }
.ps-links { display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0 0; }
.ps-links a { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); color: var(--text-2); font-size: 12.5px; font-weight: 700; text-decoration: none; }
.ps-links a:hover { color: var(--text); border-color: var(--border-strong); }
.ps-links svg.lucide { width: 13px; height: 13px; }
.ps-foot { position: sticky; bottom: 0; margin: 20px -24px 0; padding: 14px 24px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--panel) 18px); }
.ps-go { width: 100%; height: 48px; justify-content: center; font-size: 15px; border-radius: 13px; }
.ps-go small { font-size: 12px; font-weight: 600; opacity: .65; margin-left: 4px; }
.ps-go .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block; animation: spin .7s linear infinite; }
@media (max-width: 760px) {
  .ps-bar { flex-wrap: wrap; }
  .ps-search { flex-basis: 100%; }
  .ps-search kbd { display: none; }
  .ps-src { flex: 1; } .ps-src button { flex: 1; }
  .ps-grid { grid-template-columns: minmax(0, 1fr); }
  .ps-panel { width: 100vw; border-left: 0; }
}
span.cs { padding: 0; border: 0; background: none; border-radius: 0; gap: 0; box-shadow: none; }

/* ============ 상단바: 라이트 테마 (흰 글래스 + 진한 글씨) ============ */
:root:not([data-theme='dark']) .topnav, :root:not([data-theme='dark']) .mega-bg {
  --text: #111113; --text-2: rgba(17,17,19,.72); --muted: rgba(17,17,19,.5);
  --hover: rgba(0,0,0,.05); --glass-line: rgba(0,0,0,.08); --glass-border: rgba(0,0,0,.08);
  color: var(--text);
  background: rgba(255,255,255,.78);
  border-bottom: 1px solid rgba(0,0,0,.08);
}
:root:not([data-theme='dark']) .topnav.scrolled { box-shadow: 0 6px 20px -14px rgba(0,0,0,.25); }
:root:not([data-theme='dark']) .mega-bg { background: rgba(255,255,255,.9); box-shadow: 0 18px 30px -20px rgba(0,0,0,.18); }
:root:not([data-theme='dark']) .nav-col { border-right-color: rgba(0,0,0,.07); }
:root:not([data-theme='dark']) .nav-cat:first-child .nav-col { border-left-color: rgba(0,0,0,.07); }
:root:not([data-theme='dark']) .nav-cat:last-child .nav-col { border-right-color: rgba(0,0,0,.07); }
:root:not([data-theme='dark']) .nav-sub { color: rgba(17,17,19,.62); }
:root:not([data-theme='dark']) .nav-sub:hover, :root:not([data-theme='dark']) .nav-sub.active { color: #111113; }
:root:not([data-theme='dark']) .user-btn { border-color: rgba(0,0,0,.12); }
:root:not([data-theme='dark']) .user-btn:hover { background: rgba(0,0,0,.04); }
:root:not([data-theme='dark']) .user-btn .chev { color: rgba(17,17,19,.45); }
:root:not([data-theme='dark']) .topnav .icon-btn:hover, :root:not([data-theme='dark']) .topnav .menu-left:hover { background: rgba(0,0,0,.05); color: #111113; }
:root:not([data-theme='dark']) .topnav .menu-left { color: rgba(17,17,19,.75); }
:root:not([data-theme='dark']) .brand-mark { background: #111113; color: #fff; }
.dv-list + .dv-list { margin-top: 12px; }
.dv-who { display: flex; align-items: center; gap: 9px; padding: 16px 0 6px; }
.dv-who img, .dv-av { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex: none; }
.dv-av { display: grid; place-items: center; background: var(--panel-2); font-size: 12px; font-weight: 800; color: var(--text-2); }
.dv-who b { font-size: 15px; font-weight: 800; }
.dv-who > span { font-size: 11px; font-weight: 800; height: 20px; padding: 0 7px; border-radius: 6px; display: inline-flex; align-items: center; background: var(--text); color: var(--bg); }
.dv-who small { margin-left: auto; font-size: 12.5px; color: var(--muted); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.dv-on { width: 7px; height: 7px; border-radius: 50%; background: var(--success); display: inline-block; }
.dv-list + .sc-note { margin-top: 14px; }
.dv-more { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 40px; margin: 2px 0 8px; border: 0; border-radius: 10px; background: var(--panel-2); color: var(--text-2); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.dv-more:hover { background: var(--hover); color: var(--text); }
.dv-more svg.lucide { width: 15px; height: 15px; }

/* ============ 콘솔 입력창 (한 줄 · 한국어는 입력창 안에서 바로 명령으로 바뀜) ============ */
.console { border-bottom: 0; }
.console-input.cx { display: block; position: relative; padding: 4px 14px 14px; background: var(--console-bg); }
.cx-box { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 8px 0 14px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: border-color .15s, box-shadow .15s; }
.cx-box:focus-within { border-color: var(--border-strong); box-shadow: 0 0 0 3px var(--ring); }
.cx.ai .cx-box { border-color: color-mix(in srgb, var(--brand) 55%, var(--border)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.cx.risk .cx-box { border-color: color-mix(in srgb, var(--danger) 60%, var(--border)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 12%, transparent); }

.cx-p { position: relative; width: 14px; height: 18px; flex: none; color: var(--muted); }
.cx-p > span { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity .15s, transform .2s; }
.cx-p-cmd { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 14px; font-weight: 700; }
.cx-p-ai { opacity: 0; transform: scale(.6); color: var(--brand); }
.cx-p-ai svg.lucide { width: 15px; height: 15px; }
.cx.nat .cx-p-cmd, .cx.busy .cx-p-cmd { opacity: 0; transform: scale(.6); }
.cx.nat .cx-p-ai, .cx.busy .cx-p-ai { opacity: 1; transform: none; }
.cx.busy .cx-p-ai svg.lucide { animation: cxSpin 1.2s linear infinite; }
@keyframes cxSpin { to { transform: rotate(360deg); } }
.cx.ai .cx-p { display: none; }
.cx-chip { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px 0 7px; border-radius: 7px; font-size: 11.5px; font-weight: 800; letter-spacing: .02em;
  background: color-mix(in srgb, var(--brand) 15%, transparent); color: color-mix(in srgb, var(--brand) 80%, var(--text)); }
.cx-chip[hidden] { display: none; }
.cx-chip svg.lucide { width: 12px; height: 12px; }
.cx.risk .cx-chip { background: var(--danger-bg); color: var(--danger); }

.cx-box input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--text);
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 14px; }
.cx.nat .cx-box input { font-family: 'Pretendard Variable', Pretendard, -apple-system, sans-serif; font-size: 14.5px; }
.cx-box input::placeholder { color: var(--muted); font-family: 'Pretendard Variable', Pretendard, -apple-system, sans-serif; font-size: 14px; }
.cx-box input:disabled { cursor: progress; }
.cx-go { flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--border); color: var(--panel); transition: background .2s, color .2s, box-shadow .2s, transform .15s; }
.cx-go svg.lucide { width: 16px; height: 16px; stroke-width: 2.4; }
.cx-go.on, .cx.ai .cx-go { background: var(--text); color: var(--bg); }
.cx.nat .cx-go.on { background: var(--brand); color: #fff; }
.cx.risk .cx-go { background: var(--danger); color: #fff; }
.cx-go.armed { box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 28%, transparent); }
.cx.busy .cx-go { background: var(--border); color: var(--panel); }
.cx.busy .cx-go svg.lucide { animation: spin 1s linear infinite; }
.cx-go.on:hover, .cx.ai .cx-go:hover, .cx.risk .cx-go:hover { transform: scale(1.06); }
.cx-go:active { transform: scale(.96); }

/* 입력창 위 한 줄 설명 */
.cx-cap { position: absolute; left: 14px; right: 14px; bottom: 100%; z-index: 4; display: flex; align-items: center; gap: 7px; min-width: 0; padding: 8px 6px 6px; background: linear-gradient(transparent, var(--console-bg) 30%); font-size: 12.5px; color: var(--text-2); animation: cxCap .18s ease; }
.cx-cap[hidden] { display: none; }
@keyframes cxCap { from { opacity: 0; transform: translateY(4px); } }
.cx-cap > svg.lucide { width: 14px; height: 14px; flex: none; color: var(--brand); }
.cx-cap b { font-weight: 800; color: var(--text); white-space: nowrap; }
.cx-from { min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-esc { margin-left: auto; flex: none; color: var(--muted); font-size: 12px; }
.cx-cap.warn > svg.lucide, .cx-cap.warn b { color: var(--danger); }
.cx-cap.muted > svg.lucide { color: var(--muted); }
.cx-dots { display: inline-flex; gap: 3px; margin-left: 2px; }
.cx-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--brand); animation: nlDot 1s infinite ease-in-out; }
.cx-dots i:nth-child(2) { animation-delay: .15s; } .cx-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes nlDot { 0%, 80%, 100% { transform: translateY(0); opacity: .35; } 40% { transform: translateY(-3px); opacity: 1; } }
@media (max-width: 640px) { .cx-esc { display: none; } }
/* ============ AI 비서: 작업 과정 (Claude 앱처럼) ============ */
@keyframes actPulse { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(.6); opacity: .45; } }
@keyframes actShine { from { background-position: 100% 0; } to { background-position: -150% 0; } }
/* ============ AI 비서: 명령 실행 승인 (새 디자인) ============ */
/* 실행한 뒤: 작업 과정처럼 한 줄로 접힘 */
/* ============ AI 비서: 왼쪽 대화 목록 ============ */
/* 사이드바 아래 설정 */
.switch.sm { width: 32px; height: 18px; }
.switch.sm span::before { width: 14px !important; height: 14px !important; }
/* 설정 창 */
/* 바로 실행된 명령 표시 */
.switch.sm span::before { top: 2px; left: 2px; }
.switch.sm input:checked + span::before { transform: translateX(14px); }

/* =====================================================================
 * AI 비서 — Claude 데스크톱 앱 구조를 따라 새로 만든 화면 (사이트 글꼴·색)
 * ===================================================================== */
body[data-route='assistant'] .content { max-width: none; padding: 0; }
body[data-route='assistant'] .footer, body[data-route='assistant'] footer.site-foot { display: none; }
.cai { --ca-side: 272px; --ca-col: 760px; --ca-ink: var(--text); --ca-sub: var(--muted); --ca-line: var(--border);
  --ca-bubble: #f0f0ef; --ca-hover: rgba(0,0,0,.045); --ca-active: rgba(0,0,0,.065); --ca-pop: #fff;
  display: flex; height: calc(100vh - 65px); height: calc(100dvh - 65px); position: relative; overflow: hidden; background: var(--panel); color: var(--ca-ink); font-size: 15px; }
[data-theme='dark'] .cai { --ca-bubble: #232326; --ca-hover: rgba(255,255,255,.05); --ca-active: rgba(255,255,255,.08); --ca-pop: #1a1a1d; }
.cai svg.lucide { width: 18px; height: 18px; stroke-width: 1.75; flex: none; }
.cai kbd, .ca-pop kbd, .ca-sk kbd, .ca-keys kbd { font-family: inherit; font-size: 11.5px; font-weight: 500; color: var(--ca-sub, var(--muted)); background: none; border: 0; padding: 0; }

/* 공통 아이콘 버튼 */
.ca-ib { width: 32px; height: 32px; display: inline-grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--ca-sub); cursor: pointer; transition: background .12s, color .12s; }
.ca-ib:hover, .ca-ib.ca-pop-on { background: var(--ca-hover); color: var(--ca-ink); }
.ca-ib:focus-visible, .ca-ni:focus-visible, .ca-chat:focus-visible, .ca-ab:focus-visible, .ca-sel:focus-visible, .ca-pi:focus-visible { outline: 2px solid color-mix(in srgb, var(--brand) 70%, transparent); outline-offset: -2px; }

/* ---------- 사이드바 ---------- */
.ca-side { width: var(--ca-side); flex: none; display: flex; flex-direction: column; background: var(--bg); border-right: 1px solid var(--ca-line);
  transition: margin-left .22s cubic-bezier(.2,.7,.2,1); }
.cai.side-hidden .ca-side { margin-left: calc(-1 * var(--ca-side)); }
.cai.noside .ca-side { display: none; }
.ca-side-top { display: flex; align-items: center; justify-content: space-between; height: 52px; padding: 0 10px 0 16px; }
.ca-side-name { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; }
.ca-side-name svg.lucide { width: 17px; height: 17px; color: var(--brand); }
.ca-nav { display: flex; flex-direction: column; gap: 1px; padding: 2px 8px 6px; }
.ca-ni { display: flex; align-items: center; gap: 12px; height: 36px; padding: 0 10px; border: 0; border-radius: 9px; background: none; color: var(--ca-ink); font: inherit; font-size: 14.5px; cursor: pointer; text-align: left; transition: background .12s; }
.ca-ni span { flex: 1; }
.ca-ni kbd { opacity: 0; transition: opacity .12s; }
.ca-ni:hover { background: var(--ca-hover); }
.ca-ni:hover kbd { opacity: 1; }
.ca-ni svg.lucide { color: var(--ca-ink); }
.ca-list { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 8px 12px; }
.ca-list-empty { padding: 14px 10px; font-size: 13px; color: var(--ca-sub); }
.ca-sec + .ca-sec { margin-top: 14px; }
.ca-sec-h { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border: 0; background: none; font: inherit; font-size: 12.5px; color: var(--ca-sub); cursor: pointer; border-radius: 7px; }
.ca-sec-h svg.lucide { width: 13px; height: 13px; opacity: 0; transition: opacity .12s, transform .18s; }
.ca-sec-h:hover { color: var(--ca-ink); }
.ca-sec-h:hover svg.lucide, .ca-sec.fold .ca-sec-h svg.lucide { opacity: 1; }
.ca-sec.fold .ca-sec-h svg.lucide { transform: rotate(-90deg); }
.ca-sec.fold .ca-sec-b { display: none; }
.ca-chat { position: relative; display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 4px 0 10px; border-radius: 9px; cursor: pointer; font-size: 14px; color: var(--ca-ink); transition: background .12s; outline: none; }
.ca-chat > svg.lucide { width: 16px; height: 16px; color: var(--ca-sub); }
.ca-chat span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-chat:hover { background: var(--ca-hover); }
.ca-chat.on { background: var(--ca-active); font-weight: 600; }
.ca-chat-more { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border: 0; border-radius: 7px; background: none; color: var(--ca-sub); cursor: pointer; opacity: 0; }
.ca-chat-more svg.lucide { width: 16px; height: 16px; }
.ca-chat:hover .ca-chat-more, .ca-chat.on .ca-chat-more, .ca-chat-more.ca-pop-on { opacity: 1; }
.ca-chat-more:hover, .ca-chat-more.ca-pop-on { color: var(--ca-ink); background: var(--ca-hover); }
.ca-live { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); flex: none; animation: caPulse 1.2s ease-in-out infinite; }
.ca-foot { padding: 8px; border-top: 1px solid var(--ca-line); }
.ca-me { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 10px; background: none; color: var(--ca-ink); font: inherit; cursor: pointer; text-align: left; transition: background .12s; }
.ca-me:hover, .ca-me.ca-pop-on { background: var(--ca-hover); }
.ca-av { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: var(--brand); color: #fff; font-size: 13px; font-weight: 700; }
.ca-av img { width: 100%; height: 100%; object-fit: cover; }
.ca-me-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.ca-me-t b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-me-t small { font-size: 12px; color: var(--ca-sub); }
.ca-me > svg.lucide { width: 15px; height: 15px; color: var(--ca-sub); }

/* ---------- 본문 ---------- */
.ca-main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; background: var(--panel); }
.ca-head { position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; align-items: center; gap: 4px; height: 52px; padding: 0 12px;
  background: linear-gradient(var(--panel) 60%, transparent); pointer-events: none; }
.ca-head > * { pointer-events: auto; }
.ca-head-side { display: none; }
.cai.side-hidden .ca-head-side { display: inline-grid; }
.cai.noside .ca-head-side { display: none !important; }
.ca-title { display: inline-flex; align-items: center; gap: 6px; max-width: min(520px, 70%); height: 34px; padding: 0 10px; border: 0; border-radius: 9px; background: none; color: var(--ca-ink); font: inherit; font-size: 14.5px; cursor: pointer; }
.ca-title[hidden] { display: none; }
.ca-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-title svg.lucide { width: 15px; height: 15px; color: var(--ca-sub); }
.ca-title:hover, .ca-title.ca-pop-on { background: var(--ca-hover); }
.ca-scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-gutter: stable; }
.ca-col { max-width: var(--ca-col); margin: 0 auto; padding: 64px 28px 28px; display: flex; flex-direction: column; gap: 22px; }
.ca-dock { width: 100%; max-width: var(--ca-col); margin: 0 auto; padding: 0 28px 10px; }
.ca-dock { position: relative; }
.ca-dock::before { content: ''; position: absolute; left: 0; right: 0; top: -28px; height: 28px; background: linear-gradient(transparent, var(--panel)); pointer-events: none; }
.ca-dock:empty { display: none; }
.ca-main.home .ca-scroll { display: flex; }
.ca-main.home .ca-col { margin: auto; width: 100%; padding-bottom: 14vh; }
.ca-down { position: absolute; left: 50%; bottom: 128px; z-index: 4; width: 34px; height: 34px; margin-left: -17px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--ca-line); background: var(--panel); color: var(--ca-ink); cursor: pointer; box-shadow: 0 4px 14px -6px rgba(0,0,0,.25); }
.ca-down svg.lucide { width: 16px; height: 16px; }
.ca-down[hidden] { display: none; }

/* 첫 화면 */
.ca-hero { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.ca-hero h1 { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 34px; font-weight: 700; letter-spacing: -.03em; text-align: center; }
.ca-mark { display: inline-grid; place-items: center; color: var(--brand); }
.ca-mark svg.lucide { width: 30px; height: 30px; stroke-width: 1.6; }
.ca-mark.sm svg.lucide { width: 18px; height: 18px; }
.ca-hero .ca-box, .ca-hero .ca-under { width: 100%; }
.ca-hero .ca-under { margin-top: -18px; }
.ca-sug { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ca-chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border: 1px solid var(--ca-line); border-radius: 10px; background: var(--panel); color: var(--text-2); font: inherit; font-size: 13.5px; cursor: pointer; transition: background .12s, color .12s, border-color .12s; }
.ca-chip svg.lucide { width: 15px; height: 15px; color: var(--ca-sub); }
.ca-chip:hover { background: var(--ca-hover); color: var(--ca-ink); }
.ca-setup { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 520px; }
.ca-setup div { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--ca-line); border-radius: 12px; font-size: 14px; line-height: 1.6; }
.ca-setup b { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--ca-ink); color: var(--panel); font-size: 12px; }
.ca-hero-note { margin: 0; font-size: 13px; color: var(--ca-sub); }
.cai code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .88em; }

/* 내 메시지 */
.ca-u { align-self: flex-end; max-width: 82%; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; margin-bottom: -12px; }
.ca-u-b { padding: 11px 16px; border-radius: 18px; background: var(--ca-bubble); font-size: 15px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.ca-u-files { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.ca-u-files img { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; border: 1px solid var(--ca-line); }
.ca-u-acts { height: 28px; display: flex; align-items: center; gap: 2px; opacity: 0; transition: opacity .15s; }
.ca-u:hover .ca-u-acts { opacity: 1; }

/* AI 답 */
.ca-a { display: flex; flex-direction: column; gap: 4px; }
.ca-md { font-size: 15.5px; line-height: 1.75; word-break: break-word; }
.ca-md p { margin: 0 0 12px; }
.ca-md p:last-child, .ca-md ul:last-child, .ca-md ol:last-child { margin-bottom: 0; }
.ca-md ul, .ca-md ol { margin: 0 0 12px; padding-left: 22px; }
.ca-md li { margin: 4px 0; padding-left: 2px; }
.ca-md li::marker { color: var(--ca-sub); }
.ca-md b { font-weight: 700; }
.ca-md .ai-h { font-size: 16.5px; font-weight: 700; margin: 18px 0 8px; }
.ca-md code { padding: 2px 6px; border-radius: 6px; background: var(--ca-bubble); font-size: .86em; }
.ca-md pre.ai-code { position: relative; margin: 6px 0 14px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--ca-line); background: var(--bg); font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 13px; line-height: 1.65; overflow-x: auto; white-space: pre; }
.ca-code-copy { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--ca-line); border-radius: 7px; background: var(--panel); color: var(--ca-sub); cursor: pointer; opacity: 0; transition: opacity .12s; }
.ca-code-copy svg.lucide { width: 14px; height: 14px; }
.ca-md pre.ai-code:hover .ca-code-copy, .ca-code-copy.done { opacity: 1; }
.ca-code-copy:hover { color: var(--ca-ink); }

/* 답 아래 버튼 줄 */
.ca-acts { display: flex; align-items: center; gap: 2px; margin: 6px 0 0 -6px; opacity: 0; transition: opacity .15s; }
.ca-a:hover .ca-acts, .ca-acts.last { opacity: 1; }
.ca-ab { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--ca-sub); cursor: pointer; transition: background .12s, color .12s; }
.ca-ab svg.lucide { width: 16px; height: 16px; }
.ca-ab:hover { background: var(--ca-hover); color: var(--ca-ink); }
.ca-ab.on { color: var(--ca-ink); }
.ca-ab.on svg.lucide { fill: currentColor; fill-opacity: .12; }
.ca-ab.done { color: var(--success); }
.ca-time { margin-left: 6px; font-size: 12.5px; color: var(--ca-sub); white-space: nowrap; }
.ca-u-acts .ca-time { margin: 0 4px 0 0; }

/* 작업 과정 (도구 사용) */
.ca-act { display: flex; flex-direction: column; }
.ca-act-h { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; max-width: 100%; padding: 2px 0; border: 0; background: none; color: var(--ca-sub); font: inherit; font-size: 14.5px; cursor: pointer; text-align: left; transition: color .12s; }
.ca-act-h:hover { color: var(--ca-ink); }
.ca-act-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-act-chev { width: 15px !important; height: 15px !important; transition: transform .18s; }
.ca-act.open .ca-act-chev { transform: rotate(90deg); }
.ca-act-time { font-size: 12.5px; color: var(--ca-sub); font-variant-numeric: tabular-nums; }
.ca-act-code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12.5px; padding: 1px 7px; border-radius: 6px; background: var(--ca-bubble); color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.ca-act.ran.no .ca-act-t, .ca-act.ran.bad .ca-act-t { color: var(--danger); }
.ca-act-b { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .22s ease; }
.ca-act.open .ca-act-b { grid-template-rows: 1fr; }
.ca-steps { overflow: hidden; display: flex; flex-direction: column; }
.ca-act.open .ca-steps { padding: 10px 0 4px; }
.ca-step { position: relative; display: flex; gap: 12px; padding-bottom: 12px; }
.ca-step:last-child { padding-bottom: 0; }
.ca-step:not(:last-child)::before { content: ''; position: absolute; left: 10px; top: 24px; bottom: 2px; width: 1px; background: var(--ca-line); }
.ca-step-ic { width: 21px; height: 21px; flex: none; display: grid; place-items: center; color: var(--ca-sub); margin-top: 1px; }
.ca-step-ic svg.lucide { width: 16px; height: 16px; }
.ca-step.err .ca-step-ic { color: var(--danger); }
.ca-step.done .ca-step-ic { color: var(--ca-sub); }
.ca-step-m { flex: 1; min-width: 0; }
.ca-step-l { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 22px; font-size: 14px; color: var(--text-2); }
.ca-step-l code { font-size: 12.5px; padding: 1px 7px; border-radius: 6px; background: var(--ca-bubble); color: var(--text-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-step-l small { font-size: 12.5px; color: var(--ca-sub); }
.ca-step.say p { margin: 1px 0 0; font-size: 14px; line-height: 1.6; color: var(--ca-sub); }
.ca-step pre { margin: 6px 0 0; padding: 9px 12px; border-radius: 9px; background: var(--bg); border: 1px solid var(--ca-line); font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; line-height: 1.6; color: var(--text-2); white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow: auto; }
.ca-step pre.muted { color: var(--ca-sub); }
.ca-badge { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: color-mix(in srgb, var(--brand) 15%, transparent); color: color-mix(in srgb, var(--brand) 78%, var(--text)); }
.ca-think { display: flex; align-items: center; gap: 10px; font-size: 14.5px; }
.ca-think .ca-mark svg.lucide { animation: caSpin 2.4s cubic-bezier(.5,.1,.5,.9) infinite; }
.ca-shim { background: linear-gradient(90deg, var(--ca-sub) 0%, var(--ca-sub) 35%, var(--ca-ink) 50%, var(--ca-sub) 65%, var(--ca-sub) 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: caShine 1.9s linear infinite; }
.ca-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ca-line); border-top-color: var(--brand); animation: caSpin .8s linear infinite; display: inline-block; }
@keyframes caShine { from { background-position: 100% 0; } to { background-position: -150% 0; } }
@keyframes caSpin { to { transform: rotate(360deg); } }
@keyframes caPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.7); } }

/* 명령 실행 확인 */
.ca-perm { border: 1px solid var(--ca-line); border-radius: 16px; background: var(--panel); box-shadow: 0 12px 32px -24px rgba(0,0,0,.4); overflow: hidden; }
.ca-perm-h { display: flex; align-items: center; gap: 9px; padding: 15px 18px 0; font-size: 15px; }
.ca-perm-h svg.lucide { width: 17px; height: 17px; color: var(--brand); }
.ca-perm-h b { font-weight: 700; }
.ca-perm-why { margin: 6px 18px 0; font-size: 14px; line-height: 1.6; color: var(--ca-sub); }
.ca-perm-code { margin: 12px 18px 0; padding: 10px 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--ca-line); display: flex; flex-direction: column; gap: 4px; }
.ca-perm-code code { font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-all; color: var(--text-2); }
.ca-perm-code .s { color: var(--ca-sub); }
.ca-perm-code .t-cmd { color: var(--ca-ink); font-weight: 700; }
.ca-perm-code .t-sel { color: color-mix(in srgb, var(--brand) 85%, var(--text)); font-weight: 600; }
.ca-perm-code .t-num { color: #2f80ed; }
[data-theme='dark'] .ca-perm-code .t-num { color: #7cb7ff; }
.ca-perm-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px 16px; }
.ca-perm.stale { opacity: .6; }
.ca-perm.stale .ca-perm-code { margin-bottom: 16px; }
.ca-btn { display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px 0 15px; border: 1px solid var(--ca-line); border-radius: 10px; background: var(--panel); color: var(--ca-ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .12s, opacity .12s; }
.ca-btn:hover { background: var(--ca-hover); }
.ca-btn kbd { font-size: 11.5px; color: var(--ca-sub); }
.ca-btn.pri { background: var(--ca-ink); border-color: var(--ca-ink); color: var(--panel); }
.ca-btn.pri:hover { opacity: .88; background: var(--ca-ink); }
.ca-btn.pri kbd { color: color-mix(in srgb, var(--panel) 65%, transparent); }

/* 알림 줄 */
.ca-note { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ca-sub); }
.ca-note svg.lucide { width: 15px; height: 15px; }
.ca-err { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; background: var(--danger-bg); color: var(--danger); font-size: 14px; line-height: 1.5; }
.ca-err span { flex: 1; }
.ca-err button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); border-radius: 8px; background: none; color: inherit; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.ca-err button svg.lucide { width: 14px; height: 14px; }

/* 입력창 */
.ca-box { display: flex; flex-direction: column; border: 1px solid var(--ca-line); border-radius: 20px; background: var(--panel); box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 6px 24px -14px rgba(0,0,0,.18); transition: border-color .15s, box-shadow .15s; }
.ca-box:focus-within { border-color: var(--border-strong); box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 28px -14px rgba(0,0,0,.26); }
[data-theme='dark'] .ca-box { background: var(--panel-2); }
.ca-in { display: flex; align-items: flex-end; gap: 8px; padding: 9px 9px 9px 18px; }
.ca-in textarea { flex: 1; min-width: 0; min-height: 36px; max-height: 220px; padding: 6px 0; display: block; border: 0; outline: 0; resize: none; background: none; color: var(--ca-ink); font: inherit; font-size: 15.5px; line-height: 1.5; }
.ca-in textarea::placeholder { color: var(--ca-sub); }
.ca-in textarea:disabled { cursor: not-allowed; }
.ca-send { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border: 0; border-radius: 10px; background: none; color: var(--ca-sub); cursor: pointer; transition: background .15s, color .15s; }
.ca-send svg.lucide { width: 18px; height: 18px; transform: translate(-.5px, -1px); }
.ca-send:hover:not(:disabled) { background: var(--ca-hover); color: var(--ca-ink); }
.ca-send.ready { background: none; color: var(--ca-ink); }
.ca-send.ready:hover { background: var(--ca-hover); color: var(--ca-ink); }
.ca-send.stop { background: none; color: var(--ca-ink); }
.ca-send.stop:hover { background: var(--ca-hover); }
.ca-send:disabled { opacity: .4; cursor: default; }
.ca-sq { width: 12px; height: 12px; border-radius: 3px; background: currentColor; }
.ca-atts { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 12px 0; }
.ca-atts[hidden] { display: none; }
.ca-att { position: relative; flex: none; border: 1px solid var(--ca-line); border-radius: 12px; background: var(--panel); }
.ca-att.img { width: 72px; height: 72px; overflow: hidden; }
.ca-att.img img { width: 100%; height: 100%; object-fit: cover; }
.ca-att.doc { width: 150px; height: 72px; padding: 9px 11px; display: flex; flex-direction: column; gap: 2px; }
.ca-att.doc b { font-size: 12.5px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-all; }
.ca-att.doc span { font-size: 11.5px; color: var(--ca-sub); margin-top: auto; }
.ca-att.doc em { position: absolute; right: 9px; bottom: 8px; font-style: normal; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--ca-line); color: var(--ca-sub); }
.ca-att.doc.sm { height: auto; min-height: 56px; width: 160px; background: var(--ca-bubble); border-color: transparent; text-align: left; }
.ca-att button { position: absolute; top: -7px; left: -7px; width: 20px; height: 20px; display: grid; place-items: center; border: 1px solid var(--ca-line); border-radius: 50%; background: var(--panel); color: var(--ca-ink); cursor: pointer; opacity: 0; transition: opacity .12s; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.ca-att button svg.lucide { width: 11px; height: 11px; stroke-width: 2.4; }
.ca-att:hover button, .ca-att button:focus-visible { opacity: 1; }
.ca-under { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 8px 2px 0; }
.ca-under-l { display: flex; gap: 2px; }
.ca-under-r { display: flex; justify-content: flex-end; gap: 2px; }
.ca-disc { font-size: 12px; color: var(--ca-sub); text-align: center; white-space: nowrap; }
.ca-sel { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 9px; border: 0; border-radius: 8px; background: none; color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.ca-sel svg.lucide { width: 14px; height: 14px; color: var(--ca-sub); }
.ca-sel:hover, .ca-sel.ca-pop-on { background: var(--ca-hover); color: var(--ca-ink); }
#caMic { position: relative; }
#caMic.rec { color: #fff; background: var(--danger); }
#caMic.rec:hover { background: var(--danger); opacity: .9; }
#caMic.rec::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 45%, transparent); animation: micRing 1.4s ease-out infinite; pointer-events: none; }
@keyframes micRing { to { box-shadow: 0 0 0 9px transparent; } }
.ca-main.home .ca-under .ca-disc { visibility: hidden; }

/* 끌어다 놓기 */
.ca-drop { position: absolute; inset: 10px; z-index: 6; display: none; place-items: center; border: 2px dashed color-mix(in srgb, var(--brand) 60%, transparent); border-radius: 18px; background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: blur(2px); pointer-events: none; }
.ca-drop div { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ca-drop svg.lucide { width: 28px; height: 28px; color: var(--brand); }
.ca-drop b { font-size: 16px; }
.ca-drop span { font-size: 13px; color: var(--ca-sub); }
.ca-main.drag .ca-drop { display: grid; }

/* 나타나는 효과 */
.ca-enter { animation: caIn .35s ease both; }
.ca-a.ca-enter { animation: none; }
.ca-word { opacity: 0; animation: caWord .45s ease forwards; }
@keyframes caIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes caWord { from { opacity: 0; filter: blur(2px); } to { opacity: 1; filter: none; } }

/* ---------- 팝오버 메뉴 ---------- */
.ca-pop { position: fixed; z-index: 90; min-width: 200px; padding: 6px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); box-shadow: 0 12px 36px -10px rgba(0,0,0,.22), 0 2px 6px rgba(0,0,0,.06); animation: caPop .14s ease-out; font-size: 14px; color: var(--text); }
[data-theme='dark'] .ca-pop { background: #1a1a1d; border-color: #2a2a2e; box-shadow: 0 14px 40px -10px rgba(0,0,0,.7); }
.ca-pop.up { transform-origin: bottom left; }
@keyframes caPop { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.ca-pop svg.lucide { width: 17px; height: 17px; stroke-width: 1.75; flex: none; }
.ca-pop-h { padding: 8px 10px 6px; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-pop-scroll { max-height: 320px; overflow-y: auto; }
.ca-pi { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 36px; padding: 7px 10px; border: 0; border-radius: 9px; background: none; color: inherit; font: inherit; font-size: 14px; text-align: left; cursor: pointer; outline: none; }
.ca-pi:hover, .ca-pi:focus-visible { background: var(--hover); }
[data-theme='dark'] .ca-pi:hover, [data-theme='dark'] .ca-pi:focus-visible { background: rgba(255,255,255,.06); }
.ca-pi:disabled { opacity: .4; cursor: default; }
.ca-pi > svg.lucide:first-child { color: var(--text-2); }
.ca-pi-sp { width: 17px; flex: none; }
.ca-pi-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ca-pi-t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-pi-t small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.35; }
.ca-pi kbd { font-family: inherit; font-size: 12px; color: var(--muted); }
.ca-pi-check { color: var(--text) !important; width: 16px !important; height: 16px !important; }
.ca-pi-arrow { color: var(--muted); width: 15px !important; height: 15px !important; }
.ca-pi.danger { color: var(--danger); }
.ca-pi.danger > svg.lucide:first-child { color: var(--danger); }
.ca-sep { height: 1px; margin: 5px 6px; background: var(--border); }
.ca-pop-tip { display: flex; gap: 8px; margin: 4px 4px 2px; padding: 9px 10px; border-radius: 9px; background: var(--panel-2); font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.ca-pop-tip svg.lucide { width: 14px; height: 14px; margin-top: 2px; }
.ca-pop-tip code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11.5px; color: var(--text-2); }

/* ---------- 검색 (Ctrl+K) ---------- */
.ca-sk-bg { position: fixed; inset: 0; z-index: 96; display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; background: rgba(0,0,0,.28); animation: caFade .15s ease; }
[data-theme='dark'] .ca-sk-bg { background: rgba(0,0,0,.55); }
@keyframes caFade { from { opacity: 0; } }
.ca-sk { width: min(680px, calc(100vw - 32px)); height: min(560px, 76vh); display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 18px; background: var(--panel); box-shadow: 0 30px 80px -20px rgba(0,0,0,.35); overflow: hidden; animation: caPop .16s ease-out; color: var(--text); }
.ca-sk svg.lucide { width: 18px; height: 18px; stroke-width: 1.75; flex: none; }
.ca-sk-in { display: flex; align-items: center; gap: 12px; padding: 14px 14px 10px 20px; color: var(--muted); }
.ca-sk-in input { flex: 1; min-width: 0; height: 32px; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 16px; }
.ca-sk-in input::placeholder { color: var(--muted); }
.ca-sk-in .ca-ib { color: var(--muted); }
.ca-sk-in .ca-ib:hover { background: var(--hover); color: var(--text); }
.ca-sk-tabs { display: flex; gap: 6px; padding: 0 18px 12px; border-bottom: 1px solid var(--border); }
.ca-sk-tabs button { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border: 0; border-radius: 9px; background: none; color: var(--text-2); font: inherit; font-size: 14px; cursor: pointer; }
.ca-sk-tabs button svg.lucide { width: 16px; height: 16px; }
.ca-sk-tabs button:hover { background: var(--hover); }
.ca-sk-tabs button.on { background: var(--panel-2); color: var(--text); font-weight: 600; }
[data-theme='dark'] .ca-sk-tabs button.on { background: rgba(255,255,255,.08); }
.ca-sk-list { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 10px 12px; }
.ca-sk-g { padding: 14px 12px 6px; font-size: 12.5px; color: var(--muted); }
.ca-sk-g:first-child { padding-top: 6px; }
.ca-sk-i { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; padding: 8px 12px; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ca-sk-i > svg.lucide { color: var(--muted); width: 17px; height: 17px; }
.ca-sk-i.sel { background: var(--panel-2); }
[data-theme='dark'] .ca-sk-i.sel { background: rgba(255,255,255,.07); }
.ca-sk-i .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ca-sk-i .l { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.ca-sk-i .l b { font-weight: 500; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-sk-i .l small, .ca-sk-i .t > b + small { flex: none; font-size: 12.5px; color: var(--muted); }
.ca-sk-i .t > b { font-weight: 500; font-size: 14.5px; }
.ca-sk-i em { font-style: normal; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-sk-i mark { background: color-mix(in srgb, var(--brand) 28%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.ca-sk-i .r { flex: none; font-size: 12px; color: var(--muted); }
.ca-sk-i kbd { font-family: inherit; font-size: 12px; color: var(--muted); }
.ca-sk-cur { font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: color-mix(in srgb, var(--brand) 15%, transparent); color: color-mix(in srgb, var(--brand) 78%, var(--text)); }
.ca-sk-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 60px 20px; color: var(--muted); font-size: 14px; }
.ca-sk-empty svg.lucide { width: 26px; height: 26px; }
.ca-sk-empty b { font-weight: 500; }
.ca-sk-load { display: grid; place-items: center; padding: 60px; }
.ca-sk-load .ca-spin { width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--brand); border-radius: 50%; animation: caSpin .8s linear infinite; }
.ca-sk-foot { display: flex; gap: 18px; padding: 11px 20px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }
.ca-sk-foot span { display: inline-flex; align-items: center; gap: 6px; }
.ca-sk-foot kbd { min-width: 20px; height: 20px; display: inline-grid; place-items: center; padding: 0 5px; border: 1px solid var(--border); border-radius: 5px; font-family: inherit; font-size: 11px; color: var(--text-2); background: var(--panel); }

/* ---------- 설정 · 사용량 · 단축키 창 ---------- */
.modal.ca-modal { max-width: 500px; border-radius: 18px; }
.modal.ca-modal .modal-foot { border-radius: 0 0 18px 18px; }
.modal.ca-modal-use { max-width: 560px; }
.ca-set { text-align: left; }
.ca-set-sec { margin: 18px 0 4px; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.ca-set-sec:first-child { margin-top: 8px; }
.ca-set-row { display: flex; align-items: flex-start; gap: 16px; padding: 10px 0; }
.ca-set-row + .ca-set-row { border-top: 1px solid var(--border); }
.ca-set-tx { flex: 1; }
.ca-set-tx b { display: block; font-size: 14px; font-weight: 700; }
.ca-set-tx p { margin: 3px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.ca-set-tx code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11.5px; }
.ca-set-val { font-size: 13.5px; font-weight: 600; padding: 4px 10px; border-radius: 8px; background: var(--panel-2); white-space: nowrap; }
.ca-set-row .switch { margin-top: 2px; }
.ca-set-sub { margin-top: 4px; padding: 14px; border-radius: 12px; background: var(--panel-2); transition: opacity .15s; }
.ca-set-sub.off { opacity: .45; pointer-events: none; }
.ca-set-lb { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.ca-set-lb em { font-style: normal; font-size: 11px; padding: 0 6px; border-radius: 99px; background: var(--border); }
.ca-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ca-chips span { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 4px 0 10px; border-radius: 8px; background: var(--panel); border: 1px solid var(--border); font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12.5px; }
.ca-chips button { width: 20px; height: 20px; display: grid; place-items: center; border: 0; border-radius: 5px; background: none; color: var(--muted); cursor: pointer; }
.ca-chips button:hover { background: var(--hover); color: var(--danger); }
.ca-chips svg.lucide { width: 12px; height: 12px; }
.ca-chip-add { display: flex; gap: 6px; margin-top: 12px; }
.ca-chip-add .input { flex: 1; background: var(--panel); }
.ca-set-none { margin: 0; font-size: 12.5px; color: var(--muted); }
.ca-set-note { display: flex; gap: 6px; margin: 12px 0 0; font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.ca-set-note svg.lucide { width: 13px; height: 13px; flex: none; margin-top: 2px; }
.ca-use { text-align: left; }
.ca-use-top { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.ca-use-top div { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 12px; background: var(--panel-2); }
.ca-use-top span { font-size: 12px; color: var(--muted); }
.ca-use-top b { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.ca-use-top small { font-size: 11.5px; color: var(--muted); }
.ca-use-chart { display: flex; align-items: flex-end; gap: 6px; height: 150px; margin-top: 18px; padding: 0 2px; }
.ca-use-bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.ca-use-bar i { width: 100%; max-width: 26px; display: flex; flex-direction: column-reverse; border-radius: 5px 5px 2px 2px; background: color-mix(in srgb, var(--text) 18%, transparent); overflow: hidden; }
.ca-use-bar s { display: block; width: 100%; background: var(--brand); text-decoration: none; }
.ca-use-bar span { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ca-use-bar:last-child span { color: var(--text); font-weight: 700; }
.ca-use-leg { display: flex; align-items: center; gap: 14px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.ca-use-leg span { display: inline-flex; align-items: center; gap: 6px; }
.ca-use-leg i { width: 10px; height: 10px; border-radius: 3px; }
.ca-use-leg i.in { background: color-mix(in srgb, var(--text) 18%, transparent); }
.ca-use-leg i.out { background: var(--brand); }
.ca-use-leg em { margin-left: auto; font-style: normal; }
.ca-use-note { display: flex; gap: 6px; margin: 14px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.ca-use-note svg.lucide { width: 13px; height: 13px; flex: none; margin-top: 2px; }
.ca-keys { display: flex; flex-direction: column; margin-top: 6px; }
.ca-keys > div { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; font-size: 14px; }
.ca-keys > div + div { border-top: 1px solid var(--border); }
.ca-keys > div > span:last-child { display: inline-flex; align-items: center; gap: 4px; }
.ca-keys kbd { min-width: 24px; height: 24px; display: inline-grid; place-items: center; padding: 0 7px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; background: var(--panel); font-family: inherit; font-size: 12px; color: var(--text-2); }
.ca-keys i { font-style: normal; color: var(--muted); padding: 0 2px; }

/* ---------- 좁은 화면 ---------- */
.ca-scrim { display: none; }
@media (max-width: 900px) {
  .ca-side { position: absolute; top: 0; bottom: 0; left: 0; z-index: 20; margin-left: calc(-1 * var(--ca-side)); }
  .cai.side-hidden .ca-side { margin-left: calc(-1 * var(--ca-side)); }
  .cai.side-open .ca-side { margin-left: 0; box-shadow: 12px 0 40px -20px rgba(0,0,0,.45); }
  .ca-scrim { position: absolute; inset: 0; z-index: 19; background: rgba(0,0,0,.3); }
  .cai.side-open .ca-scrim { display: block; }
  .ca-head-side { display: inline-grid; }
  .ca-col { padding: 60px 16px 20px; }
  .ca-dock { padding: 0 12px 8px; }
  .ca-disc { display: none; }
  .ca-under { grid-template-columns: 1fr 1fr; }
  .ca-hero h1 { font-size: 26px; }
  .ca-u { max-width: 90%; }
  .ca-use-top { grid-template-columns: repeat(2, 1fr); }
  .ca-ni kbd { display: none; }
}

/* ============ 스크롤바 (사이트 전체 · 얇고 둥근 막대, 위아래 화살표 없음) ============ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,.16); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; min-height: 40px; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(0,0,0,.3); }
::-webkit-scrollbar-thumb:active { background-color: rgba(0,0,0,.42); }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-corner { background: transparent; }
[data-theme='dark'] ::-webkit-scrollbar-thumb { background-color: rgba(255,255,255,.14); }
[data-theme='dark'] ::-webkit-scrollbar-thumb:hover { background-color: rgba(255,255,255,.26); }
[data-theme='dark'] ::-webkit-scrollbar-thumb:active { background-color: rgba(255,255,255,.36); }
.ca-list::-webkit-scrollbar, .ca-pop-scroll::-webkit-scrollbar, .ca-sk-list::-webkit-scrollbar, .ca-step pre::-webkit-scrollbar { width: 8px; }
.ca-list::-webkit-scrollbar-thumb { background-color: transparent; }
.ca-list:hover::-webkit-scrollbar-thumb { background-color: rgba(0,0,0,.14); }
[data-theme='dark'] .ca-list:hover::-webkit-scrollbar-thumb { background-color: rgba(255,255,255,.12); }
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: rgba(0,0,0,.22) transparent; }
  [data-theme='dark'] * { scrollbar-color: rgba(255,255,255,.18) transparent; }
}
.ca-use-empty { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); font-size: 13px; color: var(--muted); } .ca-use-empty svg.lucide { width: 15px; height: 15px; }

/* 플레이어 한국어 이름 */
.alias-tag { display: inline-flex; align-items: center; height: 20px; margin-left: 7px; padding: 0 7px; border-radius: 6px; background: color-mix(in srgb, var(--brand) 14%, transparent); color: color-mix(in srgb, var(--brand) 72%, var(--text)); font-size: 12px; font-weight: 700; vertical-align: 1px; white-space: nowrap; }
.alias-chip, .alias-add { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 9px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: background .12s, color .12s, border-color .12s; }
.alias-chip { border: 0; background: color-mix(in srgb, var(--brand) 15%, transparent); color: color-mix(in srgb, var(--brand) 75%, var(--text)); }
.alias-chip svg.lucide { width: 13px; height: 13px; opacity: .55; }
.alias-chip:hover svg.lucide { opacity: 1; }
.alias-add { border: 1px dashed var(--border-strong); background: none; color: var(--muted); font-weight: 600; font-size: 13px; }
.alias-add svg.lucide { width: 14px; height: 14px; }
.alias-add:hover { color: var(--text); border-color: var(--text); }

/* AI 비서: 메시지 고쳐서 다시 보내기 */
.ca-u.editing { align-self: stretch; max-width: 100%; margin-bottom: 0; }
.ca-u-edit { width: 100%; padding: 12px 14px 10px 16px; border: 1px solid var(--border-strong); border-radius: 18px; background: var(--ca-bubble); }
.ca-u-edit textarea { display: block; width: 100%; min-height: 26px; max-height: 220px; padding: 0; border: 0; outline: 0; resize: none; background: none; color: var(--ca-ink); font: inherit; font-size: 15px; line-height: 1.6; }
.ca-u-edit-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.ca-u-edit-foot span { flex: 1; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ca-sub); }
.ca-u-edit-foot span svg.lucide { width: 14px; height: 14px; }
.ca-u-edit-foot .ca-btn { height: 32px; padding: 0 14px; font-size: 13.5px; }
.ca-edited { font-size: 12px; color: var(--ca-sub); margin-right: 2px; }
/* AI 비서: 생각 과정 */
.ca-step.think .ca-step-ic { color: color-mix(in srgb, var(--brand) 80%, var(--text)); }
.ca-think-t { margin-top: 4px; padding: 2px 0 0 12px; border-left: 2px solid var(--ca-line); font-size: 13.5px; line-height: 1.7; color: var(--ca-sub); }
.ca-think-t p { margin: 0 0 8px; }
.ca-think-t p:last-child, .ca-think-t ul:last-child, .ca-think-t ol:last-child { margin-bottom: 0; }
.ca-think-t ul, .ca-think-t ol { margin: 0 0 8px; padding-left: 18px; }
.ca-think-t code { font-size: 12px; padding: 1px 5px; border-radius: 5px; background: var(--ca-bubble); }
.ca-think-t pre.ai-code { margin: 4px 0 8px; padding: 8px 10px; border-radius: 8px; background: var(--bg); border: 1px solid var(--ca-line); font-size: 12px; overflow-x: auto; }

/* AI 비서 설정: 소리 내어 읽기 */
.modal.ca-modal .modal-body { max-height: calc(100vh - 170px); overflow-y: auto; }
.ca-set-row.col { flex-direction: column; align-items: stretch; gap: 10px; }
.ca-voice { display: flex; gap: 8px; }
.ca-voice > :first-child { flex: 1; min-width: 0; }
.ca-voice .btn { flex: none; white-space: nowrap; }
.ca-seg { display: inline-flex; flex: none; padding: 3px; gap: 2px; border-radius: 10px; background: var(--panel-2); }
.ca-seg button { height: 28px; padding: 0 11px; border: 0; border-radius: 7px; background: none; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .12s, color .12s; }
.ca-seg button:hover { color: var(--text); }
.ca-seg button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px var(--border); }
[data-theme='dark'] .ca-seg button.on { background: #2a2a2e; box-shadow: none; }
.ca-set-row:has(.ca-seg) { align-items: center; }
.ca-set-warn { display: flex; gap: 6px; margin: 0; font-size: 12px; line-height: 1.5; color: var(--warn); }
.ca-set-warn svg.lucide { width: 13px; height: 13px; flex: none; margin-top: 2px; }
.ca-set-foot { margin: 6px 0 0; font-size: 11.5px; color: var(--muted); }

/* ============ AI 마크 (연한 하늘색 별빛 · 답하는 동안 갈래가 차례로 숨 쉼) ============ */
:root { --ai-sky: #6cc4f2; }
[data-theme='dark'] { --ai-sky: #8fd6fa; }
svg.ai-mark { width: 18px; height: 18px; flex: none; overflow: visible; }
.ai-ray { stroke: var(--ai-sky); stroke-width: 2.7; stroke-linecap: round; transform-box: view-box; transform-origin: 12px 12px; }
svg.ai-mark.spin { animation: aiTurn 6s linear infinite; }
svg.ai-mark.spin .ai-ray { animation: aiRay 1.2s cubic-bezier(.45,.05,.35,1) infinite; animation-delay: calc(var(--k) * -0.15s); }
@keyframes aiRay { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.55); opacity: .55; } }
@keyframes aiTurn { to { transform: rotate(360deg); } }
.ca-hero h1 .ca-mark svg.ai-mark { width: 36px; height: 36px; }
.ca-hero h1 .ca-mark svg.ai-mark { transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.ca-hero h1:hover .ca-mark svg.ai-mark { transform: rotate(45deg); }
.ca-side-name svg.ai-mark { width: 18px; height: 18px; }
.cx-p-ai svg.ai-mark { width: 15px; height: 15px; }
.cx.busy .cx-p-ai svg.ai-mark { animation: aiTurn 6s linear infinite; }
.cx.busy .cx-p-ai svg.ai-mark .ai-ray { animation: aiRay 1.2s cubic-bezier(.45,.05,.35,1) infinite; animation-delay: calc(var(--k) * -0.15s); }
.cx-chip svg.ai-mark { width: 12px; height: 12px; }
.cx-cap > svg.ai-mark { width: 14px; height: 14px; }
/* 답 끝의 마크 */
.ca-tail { display: flex; margin-top: -6px; }
.ca-tail svg.ai-mark { width: 24px; height: 24px; }
.ca-tail:not(.live) svg.ai-mark { animation: aiSettle .55s cubic-bezier(.2,.7,.2,1) both; }
@keyframes aiSettle { from { transform: rotate(-90deg) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.ca-think { gap: 12px; }
.ca-think .ca-mark.sm svg.ai-mark { width: 22px; height: 22px; }
/* 답하는 동안 글자 왼쪽: 하늘색 점 세 개 파도 */
.ca-spark { display: inline-flex; align-items: center; gap: 3px; height: 16px; flex: none; }
.ca-spark i { width: 5px; height: 5px; border-radius: 50%; background: var(--ai-sky); opacity: .35; animation: caWave 1.1s ease-in-out infinite; }
.ca-spark i:nth-child(2) { animation-delay: .16s; }
.ca-spark i:nth-child(3) { animation-delay: .32s; }
@keyframes caWave { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-4px); opacity: 1; } }
.ca-think { gap: 8px; }
.ca-act.live .ca-act-h { gap: 8px; }

/* ============ 2단계 인증 ============ */
.pm-badge { margin-left: auto; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--panel-2); color: var(--muted); }
.pm-badge.on { background: var(--success-bg); color: var(--success); }
.modal.mf { max-width: 480px; border-radius: 18px; }
.modal.mf .modal-foot { border-radius: 0 0 18px 18px; align-items: center; }
.modal.mf .modal-body { max-height: calc(100vh - 160px); overflow-y: auto; }
.modal.mf .grow { flex: 1; }
.mf-load { display: grid; place-items: center; padding: 40px; }
.mf-spin { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--text); animation: caSpin .8s linear infinite; }
.mf-hero { display: flex; align-items: center; gap: 12px; margin: 12px 0 14px; padding: 14px; border-radius: 14px; }
.mf-hero > svg.lucide { width: 26px; height: 26px; flex: none; }
.mf-hero b { display: block; font-size: 15px; }
.mf-hero span { font-size: 13px; color: var(--muted); }
.mf-hero.on { background: var(--success-bg); } .mf-hero.on > svg.lucide { color: var(--success); }
.mf-hero.off { background: var(--warn-bg); } .mf-hero.off > svg.lucide { color: var(--warn); }
.modal-body p.mf-p { margin: 0 0 12px; font-size: 14px; line-height: 1.65; color: var(--text-2); }
.mf-p b { color: var(--text); }
.mf-apps { display: flex; flex-wrap: wrap; gap: 6px; }
.mf-apps span { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; background: var(--panel-2); font-size: 12.5px; color: var(--text-2); }
.mf-apps svg.lucide { width: 13px; height: 13px; }
.mf-steps { margin: 14px 0 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 18px; }
.mf-steps li { position: relative; padding-left: 34px; counter-increment: s; }
.mf-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: var(--bg); font-size: 12px; font-weight: 800; }
.mf-steps li > b { display: block; font-size: 14px; line-height: 22px; }
.mf-steps li > span { font-size: 13px; color: var(--muted); }
.mf-qr { display: flex; align-items: center; gap: 16px; margin-top: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; }
.mf-qr-img { width: 148px; height: 148px; flex: none; padding: 6px; border-radius: 10px; background: #fff; }
.mf-qr-img svg { width: 100%; height: 100%; display: block; }
.mf-key { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mf-key span { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.mf-key code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 13.5px; font-weight: 600; letter-spacing: .04em; word-break: break-all; line-height: 1.6; }
.mf-key .btn { align-self: flex-start; }
.mf-otp { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.mf-otp[hidden] { display: none; }
.mf-otp input { flex: 1; min-width: 0; width: 100%; height: 52px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--panel); color: var(--text); font: inherit; font-size: 22px; font-weight: 700; text-align: center; outline: none; transition: border-color .15s, box-shadow .15s; }
.mf-otp input:focus { border-color: var(--text); box-shadow: 0 0 0 4px var(--ring); }
.mf-otp input.on { border-color: var(--border-strong); }
.mf-otp span { width: 8px; height: 2px; background: var(--border-strong); border-radius: 2px; flex: none; }
.mf-otp.shake { animation: mfShake .4s; }
@keyframes mfShake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.modal-body p.mf-err { margin: 8px 0 0; font-size: 13px; color: var(--danger); }
.mf-err[hidden] { display: none; }
.modal-body p.mf-warn { display: flex; gap: 6px; align-items: center; margin: 0 0 12px; padding: 9px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-size: 13px; }
.mf-warn svg.lucide { width: 15px; height: 15px; flex: none; }
.mf-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 14px; border-radius: 14px; background: var(--panel-2); }
.mf-codes code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 14px; font-weight: 600; letter-spacing: .06em; text-align: center; padding: 6px; border-radius: 8px; background: var(--panel); }
.mf-row { display: flex; gap: 8px; margin-top: 10px; }
.mf-check { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 14px; font-weight: 600; cursor: pointer; }
.mf-check input { width: 17px; height: 17px; accent-color: var(--text); }
.mf-act { margin-top: 4px; }
.mf-act[hidden] { display: none; }
.mf-rc { margin-top: 10px; font-family: 'JetBrains Mono', ui-monospace, monospace; letter-spacing: .1em; text-align: center; }
.mf-rc[hidden] { display: none; }
.mf-link { margin-top: 8px; border: 0; background: none; padding: 0; font: inherit; font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.mf-card { display: flex; align-items: center; gap: 14px; width: 100%; margin-bottom: 18px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.mf-card:hover { border-color: var(--border-strong); background: var(--hover); }
.mf-card > svg.lucide { width: 24px; height: 24px; flex: none; color: var(--warn); }
.mf-card.on > svg.lucide { color: var(--success); }
.mf-card div { flex: 1; min-width: 0; }
.mf-card b { display: block; font-size: 15px; }
.mf-card span { font-size: 13px; color: var(--muted); }
.mf-card em { display: inline-flex; align-items: center; gap: 2px; font-style: normal; font-size: 13.5px; font-weight: 700; color: var(--text-2); white-space: nowrap; }
.mf-card em svg.lucide { width: 15px; height: 15px; }
@media (max-width: 520px) {
  .mf-qr { flex-direction: column; align-items: stretch; }
  .mf-qr-img { align-self: center; width: 180px; height: 180px; }
  .modal.mf .modal-foot { flex-wrap: wrap; }
  .modal.mf .modal-foot .grow { display: none; }
}

/* ============ 휴대폰 화면 다듬기 ============ */
@media (max-width: 640px) {
  .content { padding-left: 14px; padding-right: 14px; }
  /* 제목 영역: 검색창 · 버튼이 한 줄을 꽉 채움 */
  .page-head { gap: 14px; padding-bottom: 16px; margin-bottom: 18px; }
  .page-head > * { min-width: 0; }
  .page-head > div:last-child:not(:first-child) { width: 100%; }
  .page-head .input-group, .page-head .input-group .input, .page-head > .input { width: 100% !important; max-width: none !important; }
  .page-head p { font-size: 14px; }
  /* 카드 여백 살짝 줄임 */
  .card-head { padding-left: 14px; padding-right: 14px; }
  .card-body { padding-left: 14px; padding-right: 14px; }
  /* 플레이어 상세: 머리 · 이름 · 정보가 가운데로 세로 정렬 */
  .profile-card { flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 22px 16px 18px; }
  .profile-card .grow { width: 100%; }
  .profile-card .grow > .row { justify-content: center; }
  .profile-card .hint { display: none; }
  .profile-head { width: 76px; height: 76px; }
  .profile-name { font-size: 22px; }
  .profile-meta { justify-content: center; }
  .profile-meta .mono { word-break: break-all; }
  .grid-4 .stat .stat-value { font-size: 16px !important; word-break: keep-all; }
  /* 활동 기록: 표 → 카드 줄 */
  .au-table thead { display: none; }
  .au-table, .au-table tbody, .au-table tr, .au-table td { display: block; width: 100%; }
  .au-table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
  .au-table td { padding: 0 !important; border: 0 !important; }
  .au-table td:nth-child(1) { grid-column: 2; grid-row: 1; font-size: 11.5px; text-align: right; }
  .au-table td:nth-child(2) { grid-column: 1; grid-row: 1; font-weight: 700; font-size: 13.5px; }
  .au-table td:nth-child(3) { grid-column: 1 / -1; font-size: 13.5px; }
  .au-table td:nth-child(4) { display: block !important; grid-column: 1 / -1; font-size: 12px; color: var(--muted) !important; margin-top: 2px; }
  .au-table td:nth-child(4):empty { display: none !important; }
  /* 아래에 떠 있는 저장 줄: 화면 안에 맞춤 */
  .sc-save { width: auto; max-width: calc(100% - 8px); left: 0; right: 0; flex-wrap: wrap; justify-content: flex-end; bottom: 12px; }
  .sc-save span { flex: 1 1 100%; margin: 0 0 2px; }
  /* 모달: 아래에서 올라오는 시트처럼 */
  .modal-backdrop { place-items: end center !important; padding: 0 !important; }
  .modal { max-width: none !important; width: 100% !important; border-radius: 20px 20px 0 0 !important; animation: sheetUp .26s cubic-bezier(.2,.7,.2,1); }
  .modal .modal-foot { border-radius: 0 !important; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .modal .modal-body { max-height: calc(100vh - 140px); max-height: calc(100dvh - 140px); overflow-y: auto; }
  .modal-foot .btn { flex: 1; justify-content: center; }
  /* 토스트: 화면 폭에 맞춤 */
  #toasts { left: 12px !important; right: 12px !important; }
  #toasts .toast { max-width: none; }
  /* 누르기 쉬운 크기 */
  .btn { min-height: 38px; }
  .more-btn, .icon-btn { min-width: 36px; min-height: 36px; }
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (max-width: 640px) {
  .card .input-group { width: 100% !important; max-width: none !important; }
  .card .input-group .input { width: 100% !important; }
}
/* 2단계 인증 창 업그레이드 */
.mf-hero { border: 1px solid transparent; }
.mf-hero.on { border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.mf-hero.off { border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.mf-bdg { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 14px; color: #fff; }
.mf-bdg svg.lucide { width: 22px; height: 22px; }
.mf-bdg.on { background: linear-gradient(140deg, #4ade80, #16a34a); box-shadow: 0 10px 22px -12px rgba(22,163,74,.8); }
.mf-bdg.off { background: linear-gradient(140deg, #fbbf24, #d97706); box-shadow: 0 10px 22px -12px rgba(217,119,6,.8); }
.mf-qr-img { position: relative; overflow: hidden; box-shadow: 0 0 0 1px var(--border), 0 14px 28px -18px rgba(0,0,0,.4); }
.mf-qr-img::before, .mf-qr-img::after { content: ''; position: absolute; width: 22px; height: 22px; border: 2.5px solid #5865F2; pointer-events: none; }
.mf-qr-img::before { top: 3px; left: 3px; border-right: 0; border-bottom: 0; border-radius: 7px 0 0 0; }
.mf-qr-img::after { bottom: 3px; right: 3px; border-left: 0; border-top: 0; border-radius: 0 0 7px 0; }
.mf-scan { position: absolute; left: 8px; right: 8px; top: 8px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, #5865F2, transparent); box-shadow: 0 0 10px #5865F2; animation: mfScan 2.4s ease-in-out infinite; }
@keyframes mfScan { 0%, 100% { top: 8px; } 50% { top: calc(100% - 10px); } }
.mf-otp input:focus { border-color: #5865F2; box-shadow: 0 0 0 4px rgba(88,101,242,.2); }
.mf-otp input.on { background: color-mix(in srgb, #5865F2 7%, var(--panel)); border-color: color-mix(in srgb, #5865F2 45%, var(--border)); }
.mf-steps li::before { background: #5865F2; color: #fff; }
/* 2단계 인증 창: 로그인 화면과 같은 모노 미니멀 */
.mf-bdg { background: none !important; box-shadow: none !important; border: 1px solid var(--border); color: var(--text) !important; border-radius: 12px; width: 40px; height: 40px; }
.mf-bdg svg.lucide { width: 19px; height: 19px; }
.mf-hero, .mf-hero.on, .mf-hero.off { background: none !important; border: 1px solid var(--border) !important; border-radius: 12px; }
.mf-qr-img::before, .mf-qr-img::after, .mf-scan { display: none !important; }
.mf-qr-img { box-shadow: none !important; border: 1px solid var(--border); border-radius: 10px; }
.mf-otp input { border-width: 1px; border-radius: 10px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-weight: 600; }
.mf-otp input:focus { border-color: var(--text) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 7%, transparent) !important; }
.mf-otp input.on { background: var(--panel) !important; border-color: color-mix(in srgb, var(--text) 30%, var(--border)) !important; }
.mf-steps li::before { background: none !important; color: var(--muted) !important; border: 1px solid var(--border); font-family: 'JetBrains Mono', ui-monospace, monospace; font-weight: 600; }
.mf-codes { background: none; border: 1px solid var(--border); padding: 0; gap: 0; overflow: hidden; }
.mf-codes code { background: none; border-radius: 0; padding: 10px; border-bottom: 1px solid var(--border); }
.mf-codes code:nth-child(odd) { border-right: 1px solid var(--border); }
.mf-codes code:nth-last-child(-n+2) { border-bottom: 0; }
.mf-card > svg.lucide, .mf-card.on > svg.lucide { color: var(--text); }
.mf-card.static { cursor: default; } .mf-card.static:hover { border-color: var(--border); background: var(--panel); }
