  :root {
    /* ── Safe Area ── */
    --safe-top:    env(safe-area-inset-top, 0px);
    --safe-right:  env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left:   env(safe-area-inset-left, 0px);

    /* ── Surface ── */
    --surface-base:    #0d1117;
    --surface-raised:  #161b27;
    --surface-overlay: #1c2235;
    --surface-sunken:  #0a0d14;

    /* ── Border ── */
    --border-subtle: #2a3347;
    --border-muted:  #3d4f6b;

    /* ── Text ── */
    --text-primary:   #e6edf3;
    --text-secondary: #b0bec5;
    --text-muted:     #7a8fa8;
    --text-dim:       #4a5568;
    --text-soft:      #96a8bb;
    --text-bright:    #f0f6fc;

    /* ── Success ── */
    --color-success:        #3dba70;
    --color-success-light:  #5dd68d;
    --color-success-bg:     rgba(61, 186, 112, 0.1);
    --color-success-btn:    #1d5c38;
    --color-success-btn-bg: rgba(61, 186, 112, 0.14);

    /* ── Danger ── */
    --color-danger-soft:   #f87171;
    --color-danger:        #ef4444;
    --color-danger-strong: #dc2626;
    --color-danger-bg:     rgba(239, 68, 68, 0.1);
    --color-danger-btn:    #5c1a1a;
    --color-danger-btn-bg: rgba(239, 68, 68, 0.14);

    /* ── Info / Primary ── */
    --color-info:         #60a5fa;
    --color-info-light:   #93c5fd;
    --color-info-alt:     #3b82f6;
    --color-primary:      #6366f1;
    --color-primary-dark: #4338ca;
    --color-info-bg:      rgba(96, 165, 250, 0.1);
    --color-info-btn:     #1e3a5f;
    --color-info-btn-bg:  rgba(96, 165, 250, 0.14);

    /* ── Warning ── */
    --color-warning:        #f59e0b;
    --color-warning-bright: #fbbf24;

    /* ── Brand / Group ── */
    --group-gmc:        #3b82f6;
    --group-aegis:      #f59e0b;
    --group-airdropper: #0ea5e9;
    --group-maestro:    #a78bfa;
    --group-scutum:     #3dba70;
    --group-viguard:    #d97706;
    --group-web3:       #ef4444;
    --group-infra:      #7a8fa8;

    /* ── Accent ── */
    --color-maestro-light:   #ddd6fe;
    --color-pink:            #e879f9;
    --color-gmc-tab:         #1e3a5f;
    --color-airdropper-tab:  #0c3d5c;
    --color-airdropper-text: #7dd3fc;
    --color-viguard-tab:     #3d2a00;

    /* ── White ── */
    --white: #f0f6fc;

    /* ── Radius ── */
    --radius-sm:     6px;
    --radius-md:     8px;
    --radius-lg:     12px;
    --radius-xl:     16px;
    --radius-pill:   999px;
    --radius-circle: 50%;

    /* ── Shadow ── */
    --shadow-card:     0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-elevated: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-panel:    0 20px 60px rgba(0, 0, 0, 0.7);

    /* ── Typography ── */
    --text-xs:      10px;
    --text-sm:      11px;
    --text-caption: 12px;
    --text-base:    13px;
    --text-md:      14px;
    --text-lg:      16px;
    --text-xl:      20px;
    --text-2xl:     24px;
    --text-count:   28px;
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  html, body { width: 100%; max-width: 100%; overflow-x: hidden; overscroll-behavior-x: none; }
  body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--surface-base); color: var(--text-primary); min-height: 100vh; padding-bottom: var(--safe-bottom); }

  header { background: var(--surface-raised); border-bottom: 1px solid var(--border-subtle); padding: calc(18px + var(--safe-top)) calc(32px + var(--safe-right)) 18px calc(32px + var(--safe-left)); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 100; backdrop-filter: blur(12px); }
  header h1 { font-size: var(--text-xl); font-weight: 700; color: var(--white); letter-spacing: -0.3px; }
  .timestamp { font-size: var(--text-base); color: var(--text-muted); }

  .main { padding: 24px calc(32px + var(--safe-right)) calc(24px + var(--safe-bottom)) calc(32px + var(--safe-left)); }

  /* 서버 카드 */
  .server-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 28px; }
  .server-card { 
    position: relative; 
    background: var(--surface-raised); 
    border: 1px solid var(--border-subtle); 
    border-radius: var(--radius-lg); 
    padding: 20px; 
    min-height: 300px;
    cursor: pointer; 
    transition: all 0.2s; 
    user-select: none; 
    box-shadow: var(--shadow-card);
  }
  .server-card:hover { border-color: var(--border-muted); transform: translateY(-3px); box-shadow: var(--shadow-elevated); }
  .server-card.running { border-top: 3px solid var(--color-success); }
  .server-card.stopped { border-top: 3px solid var(--color-danger-soft); }
  .server-card.active { border-color: var(--color-info); box-shadow: 0 0 0 2px rgba(99,179,237,0.3); transform: translateY(-3px); }
  
  /* OS 재부팅 버튼 (전원 버튼 스타일) */
  .btn-os-reboot { 
    position: absolute; top: 16px; right: 16px; 
    width: 32px; height: 32px; padding: 0; 
    background: rgba(255,129,129,0.1); border: 1px solid rgba(252,129,129,0.2); 
    color: var(--color-danger-soft); border-radius: var(--radius-circle); 
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s; z-index: 10;
  }
  .btn-os-reboot:hover { background: var(--color-danger-soft); color: var(--white); transform: rotate(90deg); }
  .btn-os-reboot svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
  .btn-card-history {
    position: absolute; top: 16px; right: 56px;
    min-width: 40px; height: 32px; padding: 0 9px;
    background: rgba(99,179,237,0.1); border: 1px solid rgba(99,179,237,0.22);
    color: var(--color-info-light); border-radius: var(--radius-pill);
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s; z-index: 10; font-size: var(--text-sm); font-weight: 700;
  }
  .btn-card-history:hover { background: rgba(99,179,237,0.18); color: var(--white); }

  .server-card .click-hint { font-size: var(--text-sm); color: var(--border-muted); margin-top: 10px; }
  .server-name { font-size: var(--text-md); font-weight: 600; margin-bottom: 6px; color: var(--text-bright); }
  .server-role { font-size: var(--text-caption); color: var(--text-muted); margin-bottom: 12px; }
  .server-status { display: inline-block; font-size: var(--text-sm); font-weight: 600; padding: 3px 10px; border-radius: var(--radius-pill); }
  .server-status.on { background: var(--color-success-bg); color: var(--color-success); }
  .server-status.off { background: var(--color-danger-bg); color: var(--color-danger-soft); }
  .server-ip { font-size: var(--text-caption); color: var(--text-muted); margin-top: 8px; font-family: monospace; }
  .server-count { display: flex; align-items: baseline; gap: 12px; margin-top: 12px; }
  .count-item { display: flex; flex-direction: column; }
  .count-num { font-size: 26px; font-weight: 700; line-height: 1; }
  .count-num.green { color: var(--color-success); }
  .count-num.red   { color: var(--color-danger-soft); }
  .count-label { font-size: var(--text-sm); color: var(--text-muted); margin-top: 3px; }
  
  /* 리소스 스펙 디자인 */
  .resource-box { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border-subtle); }
  .resource-item { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; font-size: var(--text-sm); }
  .r-label { color: var(--text-secondary); width: 36px; }
  .r-val { color: var(--text-primary); font-family: monospace; font-size: var(--text-sm); flex: 1; text-align: right; }
  .r-val.app-ok { color: var(--text-dim); }
  .r-val.app-alert { color: var(--color-danger-soft); font-weight: 700; }
  
  /* 기존 버튼 스타일 제거 */


  /* 필터 탭 */
  .section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
  .section-title { font-size: var(--text-lg); font-weight: 600; }
  .filter-tabs { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; margin-bottom: 12px; padding-bottom: 4px; scrollbar-width: none; }
  .filter-tabs::-webkit-scrollbar { display: none; }
  .tab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: var(--radius-pill); font-size: var(--text-caption); font-weight: 500; cursor: pointer; border: 1px solid var(--border-subtle); background: transparent; color: var(--text-muted); transition: all 0.15s; flex-shrink: 0; white-space: nowrap; }
  .tab:hover, .tab.active { background: var(--tab-bg, var(--border-subtle)); color: var(--tab-fg, var(--white)); border-color: var(--tab-border, var(--border-subtle)); }
  .tab.gmc.active { background: var(--color-gmc-tab); color: var(--color-info-light); border-color: var(--color-info-alt); }
  .tab.aegis.active { background: var(--border-subtle); color: var(--color-warning); border-color: var(--group-aegis); }
  .tab.airdropper.active { background: var(--color-airdropper-tab); color: var(--color-airdropper-text); border-color: var(--group-airdropper); }
  .tab.maestro.active { background: var(--border-subtle); color: var(--color-maestro-light); border-color: var(--group-maestro); }
  .tab.scutum.active { background: var(--border-subtle); color: var(--color-success-light); border-color: var(--color-success); }
  .tab.viguard.active { background: var(--color-viguard-tab); color: var(--color-warning-bright); border-color: var(--group-viguard); }
  .tab.web3.active { background: var(--border-subtle); color: var(--color-danger-soft); border-color: var(--color-danger); }
  .tab.infra.active { background: var(--border-subtle); color: var(--text-secondary); border-color: var(--text-muted); }
  .tab-label { white-space: nowrap; }
  .tab-count { min-width: 20px; padding: 2px 7px; border-radius: var(--radius-pill); background: rgba(148, 163, 184, 0.12); color: var(--text-soft); font-size: var(--text-sm); font-weight: 700; line-height: 1.2; text-align: center; }
  .tab.active .tab-count { background: rgba(255,255,255,0.12); color: inherit; }
  .tab:disabled { opacity: 0.42; cursor: not-allowed; }
  .tab:disabled:hover { background: transparent; color: var(--text-muted); }
  .tab:disabled .tab-count { background: rgba(113, 128, 150, 0.14); color: var(--text-muted); }

  /* 테이블 */
  .server-section { background: var(--surface-raised); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); margin-bottom: 20px; overflow: hidden; }
  .server-section-header { padding: 12px 20px; background: var(--surface-overlay); border-bottom: 1px solid var(--border-subtle); display: flex; align-items: center; gap: 10px; }
  .server-section-header h3 { font-size: var(--text-md); font-weight: 600; display: flex; align-items: baseline; gap: 0; }
  .server-section-name { font-size: var(--text-md); font-weight: 600; color: var(--text-bright); }
  .server-section-role { font-size: var(--text-caption); color: var(--text-muted); font-weight: 400; margin-left: 8px; }
  .server-status-dot { font-size: 9px; line-height: 1; flex-shrink: 0; }
  .table-container { 
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch; 
    background: rgba(0,0,0,0.1); 
    border-radius: var(--radius-md); 
    margin-bottom: 20px; 
    border: 1px solid var(--border-subtle);
    scrollbar-width: none; /* Firefox */
  }
  .table-container::-webkit-scrollbar { display: none; /* Chrome, Safari */ }
  table { width: 100%; border-collapse: collapse; min-width: 540px; table-layout: fixed; }
  th { padding: 10px 16px; text-align: left; font-size: var(--text-xs); font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; border-bottom: 1px solid var(--border-subtle); background: var(--surface-overlay); }
  th:nth-child(1) { width: 32%; }  /* 컨테이너 */
  th:nth-child(2) { width: 14%; }  /* 상태 */
  th:nth-child(3) { width: 11%; }  /* CPU */
  th:nth-child(4) { width: 20%; }  /* 가동 시간 */
  th:nth-child(5) { width: 23%; }  /* 제어 */
  td { padding: 10px 16px; font-size: var(--text-base); border-bottom: 1px solid var(--border-subtle); color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  tr:last-child td { border-bottom: none; }
  tr:hover td { background: rgba(255,255,255,0.02); }

  .dot-running { display: inline-block; width: 6px; height: 6px; background: var(--color-success); border-radius: var(--radius-circle); margin-right: 8px; animation: pulse 2s infinite; }
  .dot-stopped { display: inline-block; width: 6px; height: 6px; background: var(--color-danger-soft); border-radius: var(--radius-circle); margin-right: 8px; }
  @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

  .badge { display: inline-block; padding: 2px 10px; border-radius: var(--radius-pill); font-size: var(--text-sm); font-weight: 600; }
  .badge.healthy { background: var(--color-success-bg); color: var(--color-success); }
  .badge.running { background: var(--color-info-bg); color: var(--color-info); }
  .badge.stopped { background: var(--color-danger-bg); color: var(--color-danger-soft); }

  .cpu-cell { font-family: 'SF Mono', 'Fira Code', monospace; font-size: var(--text-sm); font-weight: 600; }
  .uptime { color: var(--text-muted); font-size: var(--text-caption); }

  /* 액션 버튼 */
  .actions { white-space: nowrap; }
  .btn-action { padding: 5px 12px; border-radius: var(--radius-sm); font-size: var(--text-sm); font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: all 0.15s; margin-right: 4px; }
  .btn-label { pointer-events: none; }
  .btn-restart { background: var(--color-info-btn-bg); color: var(--color-info); border-color: var(--color-info-btn); }
  .btn-restart:hover { background: var(--color-info-btn); }
  .btn-stop    { background: var(--color-danger-btn-bg); color: var(--color-danger-soft); border-color: var(--color-danger-btn); }
  .btn-stop:hover    { background: var(--color-danger-btn); }
  .btn-start   { background: var(--color-success-btn-bg); color: var(--color-success-light); border-color: var(--color-success-btn); }
  .btn-start:hover   { background: var(--color-success-btn); }
  .btn-action:disabled { opacity: 0.4; cursor: not-allowed; }
  .btn-action.loading { opacity: 0.6; }

  /* 선택 프로젝트 제어 */
  .group-control-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 16px; background: var(--surface-sunken); border-bottom: 1px solid var(--border-subtle); }
  .group-control-meta { display: flex; align-items: center; gap: 6px; min-width: 0; }
  .group-control-label { font-size: var(--text-xs); color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
  .group-control-sep { color: var(--border-muted); font-size: var(--text-xs); }
  .group-control-target { font-size: var(--text-sm); color: var(--text-secondary); font-weight: 600; }
  .group-control-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-left: auto; }
  .group-control-actions .btn-action { margin-right: 0; }
  .group-control-bar.empty .group-control-target { color: var(--text-dim); }

  @media (max-width: 900px) {
    .group-control-bar { flex-direction: column; align-items: stretch; }
    .group-control-actions { width: 100%; }
    .group-control-actions .btn-action { flex: 1; }
  }

  /* 헤더 통합 상태 표시기 */
  .header-status { font-size: var(--text-base); font-weight: 600; padding: 4px 12px; border-radius: 4px; transition: all 0.3s; }
  .header-status.ready { color: var(--text-muted); background: rgba(113, 128, 150, 0.1); }
  .header-status.loading { color: var(--color-info); background: rgba(99, 179, 237, 0.1); animation: status-pulse 1.5s infinite; }
  .header-status.success { color: var(--color-success); background: rgba(72, 187, 120, 0.1); }
  .header-status.error { color: var(--color-danger); background: rgba(245, 101, 101, 0.1); }
  @keyframes status-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

  /* 기존 토스트 스타일 제거 */
  #toast-container { display: none; }

  /* 확인 모달 */
  #modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 2000; align-items: center; justify-content: center; }
  #modal-overlay.show { display: flex; }
  .modal { background: var(--surface-raised); border: 1px solid var(--border-muted); border-radius: var(--radius-lg); padding: 28px; min-width: 320px; }
  .modal h3 { font-size: var(--text-lg); margin-bottom: 10px; }
  .modal p { color: var(--text-secondary); font-size: var(--text-base); margin-bottom: 20px; }
  .modal-btns { display: flex; gap: 10px; justify-content: flex-end; }
  .modal-cancel { padding: 8px 18px; border-radius: var(--radius-sm); border: 1px solid var(--border-muted); background: transparent; color: var(--text-secondary); cursor: pointer; font-size: var(--text-base); }
  .modal-confirm { padding: 8px 18px; border-radius: var(--radius-sm); border: none; background: var(--color-danger-strong); color: var(--white); cursor: pointer; font-size: var(--text-base); font-weight: 600; }
  .modal-confirm.safe { background: var(--color-primary); }

  /* ── 파일 브라우저 모달 ── */
  #fb-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.65); z-index: 3000; align-items: center; justify-content: center; padding: 20px; }
  #fb-overlay.show { display: flex; }
  #fb-modal {
    background: var(--surface-raised);
    border: 1px solid var(--border-muted);
    border-radius: var(--radius-lg);
    width: 82vw; max-width: 1100px;
    height: 80vh;
    display: flex; flex-direction: column;
    box-shadow: var(--shadow-panel);
    overflow: hidden;
  }
  #fb-header {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 18px;
    background: var(--surface-overlay);
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
  }
  #fb-header h3 { font-size: var(--text-md); font-weight: 700; color: var(--white); white-space: nowrap; }
  #fb-breadcrumb {
    display: flex; align-items: center; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none;
    font-size: var(--text-sm); color: var(--text-secondary);
  }
  #fb-breadcrumb::-webkit-scrollbar { display: none; }
  .fb-crumb {
    cursor: pointer; color: var(--color-info); white-space: nowrap;
    padding: 2px 5px; border-radius: var(--radius-sm);
  }
  .fb-crumb:hover { background: var(--color-info-btn-bg); }
  .fb-crumb-sep { color: var(--text-dim); font-size: var(--text-xs); }
  .fb-crumb.current { color: var(--text-primary); cursor: default; font-weight: 600; }
  .fb-crumb.current:hover { background: none; }
  #fb-header-btns { display: flex; align-items: center; gap: 6px; margin-left: 8px; flex-shrink: 0; }
  .fb-btn {
    padding: 5px 11px; border-radius: var(--radius-sm); font-size: var(--text-sm); font-weight: 600;
    cursor: pointer; border: 1px solid var(--border-muted);
    background: transparent; color: var(--text-secondary);
    transition: all 0.15s; display: inline-flex; align-items: center; gap: 5px;
  }
  .fb-btn:hover { background: var(--surface-overlay); color: var(--white); }
  .fb-btn.fb-close { color: var(--color-danger-soft); border-color: var(--color-danger-btn); background: var(--color-danger-btn-bg); }
  .fb-btn.fb-close:hover { background: var(--color-danger-btn); color: var(--white); }
  #fb-body { flex: 1; overflow-y: auto; padding: 0; }
  #fb-status { padding: 8px 18px; font-size: var(--text-sm); color: var(--text-muted); background: var(--surface-sunken); border-bottom: 1px solid var(--border-subtle); flex-shrink: 0; min-height: 32px; display: flex; align-items: center; }
  #fb-table-wrap { overflow-x: auto; }
  #fb-table { width: 100%; border-collapse: collapse; }
  #fb-table th { padding: 9px 16px; text-align: left; font-size: var(--text-xs); font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; border-bottom: 1px solid var(--border-subtle); background: var(--surface-overlay); position: sticky; top: 0; }
  #fb-table td { padding: 8px 16px; font-size: var(--text-base); border-bottom: 1px solid rgba(42,51,71,0.5); color: var(--text-soft); white-space: nowrap; }
  #fb-table tr:last-child td { border-bottom: none; }
  #fb-table tr:hover td { background: rgba(255,255,255,0.025); }
  .fb-name-cell { display: flex; align-items: center; gap: 8px; }
  .fb-icon { font-size: 15px; flex-shrink: 0; }
  .fb-name { color: var(--text-primary); }
  .fb-entry-dir .fb-name { color: var(--color-info); cursor: pointer; }
  .fb-entry-dir .fb-name:hover { text-decoration: underline; }
  .fb-entry-link .fb-name { color: var(--color-warning); cursor: pointer; }
  .fb-entry-link .fb-name:hover { text-decoration: underline; }
  .fb-link-target { font-size: var(--text-xs); color: var(--text-dim); margin-left: 4px; }
  .fb-size { font-family: 'SF Mono', 'Fira Code', monospace; font-size: var(--text-sm); }
  .fb-mtime { font-family: 'SF Mono', 'Fira Code', monospace; font-size: var(--text-sm); }
  .fb-perms { font-family: 'SF Mono', 'Fira Code', monospace; font-size: var(--text-xs); color: var(--text-dim); }
  #fb-empty { padding: 40px 24px; text-align: center; color: var(--text-dim); font-size: var(--text-md); }
  #fb-loading { padding: 40px 24px; text-align: center; color: var(--text-muted); font-size: var(--text-md); animation: status-pulse 1.5s infinite; }
  #fb-error { padding: 16px 18px; color: var(--color-danger-soft); font-size: var(--text-sm); background: var(--color-danger-bg); border-bottom: 1px solid var(--color-danger-btn); }
  .btn-fb-open {
    display: inline-flex; align-items: center; gap: 5px;
    margin-top: 10px; padding: 5px 11px;
    border-radius: var(--radius-sm); font-size: var(--text-sm); font-weight: 600;
    cursor: pointer; border: 1px solid rgba(96,165,250,0.25);
    background: rgba(96,165,250,0.08); color: var(--color-info);
    transition: all 0.15s; user-select: none;
  }
  .btn-fb-open:hover { background: var(--color-info-btn-bg); border-color: var(--color-info-alt); }
  @media (max-width: 768px) {
    #fb-modal { width: calc(100vw - 24px); height: calc(100dvh - 60px); }
    #fb-breadcrumb { max-width: calc(100vw - 220px); }
    #fb-table td { font-size: var(--text-sm); padding: 7px 10px; }
    #fb-table th { padding: 7px 10px; }
  }

  /* 그룹 컬러 사이드바 */
  tr.group-gmc td:first-child { border-left: 2px solid var(--color-info-alt); }
  tr.group-aegis td:first-child { border-left: 2px solid var(--group-aegis); }
  tr.group-airdropper td:first-child { border-left: 2px solid var(--group-airdropper); }
  tr.group-maestro td:first-child { border-left: 2px solid var(--group-maestro); }
  tr.group-scutum td:first-child { border-left: 2px solid var(--color-success); }
  tr.group-viguard td:first-child { border-left: 2px solid var(--group-viguard); }
  tr.group-web3 td:first-child { border-left: 2px solid var(--color-danger); }
  tr.group-infra td:first-child { border-left: 2px solid var(--text-muted); }

  /* 범례 */
  .legend { display: none; } /* 탭과 중복 — 필요시 다시 활성화 */
  .legend-item { display: flex; align-items: center; gap: 6px; font-size: var(--text-caption); color: var(--text-secondary); }
  .legend-dot { width: 8px; height: 8px; border-radius: var(--radius-circle); }
  .l-gmc { background: var(--color-info-alt); }
  .l-aegis { background: var(--group-aegis); }
  .l-airdropper { background: var(--group-airdropper); }
  .l-maestro { background: var(--group-maestro); }
  .l-scutum { background: var(--color-success); }
  .l-viguard { background: var(--group-viguard); }
  .l-web3 { background: var(--color-danger); }
  .l-infra { background: var(--text-muted); }

  /* 오버레이 공통 */
  .full-overlay { position: fixed; inset: 0; background: rgba(15, 17, 23, 0.4); z-index: 3000; display: none; align-items: center; justify-content: center; }
  .full-overlay.show { display: flex; }
  .blur-bg { backdrop-filter: blur(8px); background: rgba(15, 17, 23, 0.85); }
  
  /* 로그인 폼 */
  .login-card { background: rgba(22, 27, 39, 0.85); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-xl); padding: 40px; width: 360px; box-shadow: var(--shadow-panel); backdrop-filter: blur(16px); text-align: center; }
  .login-card h2 { font-size: var(--text-2xl); margin-bottom: 8px; font-weight: 700; background: linear-gradient(90deg, var(--color-info), var(--color-maestro-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
  .login-desc { font-size: var(--text-caption); color: var(--text-muted); margin-bottom: 24px; line-height: 1.5; }
  .login-remember { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: var(--text-base); color: var(--text-secondary); cursor: pointer; user-select: none; justify-content: center; }
  .login-remember-chk { width: 16px; height: 16px; accent-color: var(--color-primary); cursor: pointer; }
  .login-password-wrap { position: relative; margin-bottom: 16px; }
  .login-password-input { padding-right: 48px; margin-bottom: 0; }
  .login-password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  .login-password-toggle:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }
  .login-password-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .input-styled { width: 100%; background: var(--surface-raised); border: 1px solid var(--border-subtle); padding: 12px 16px; border-radius: var(--radius-md); color: var(--white); margin-bottom: 16px; outline: none; transition: 0.2s; font-size: var(--text-md); }
  .login-password-wrap .input-styled { padding-right: 48px; margin-bottom: 0; }
  .input-styled:focus { border-color: var(--color-info); box-shadow: 0 0 0 2px rgba(99,179,237,0.3); }
  .btn-primary { width: 100%; background: var(--color-primary); color: var(--white); border: none; padding: 12px; border-radius: var(--radius-md); font-weight: 600; cursor: pointer; transition: 0.2s; font-size: var(--text-md); }
  .btn-primary:hover { background: var(--color-primary-dark); }
  
  /* 설정 패널 */
  .settings-panel {
    background: var(--surface-raised);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 0;
    width: 520px;
    max-width: calc(100vw - 32px);
    box-shadow: var(--shadow-panel);
    overflow: hidden;
  }
  .settings-panel-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 28px;
    background: var(--surface-overlay);
    border-bottom: 1px solid var(--border-subtle);
  }
  .settings-panel-header h2 {
    font-size: var(--text-lg); font-weight: 700;
    color: var(--text-bright); margin: 0;
    display: flex; align-items: center; gap: 10px;
  }
  .settings-panel-header h2::before {
    content: '⚙';
    font-size: 16px; opacity: 0.7;
  }
  .settings-panel-body { padding: 24px 28px; max-height: calc(100dvh - 160px); overflow-y: auto; }
  .btn-close { cursor: pointer; color: var(--text-muted); transition: 0.2s; font-size: var(--text-2xl); line-height: 1; background: none; border: none; padding: 4px; border-radius: var(--radius-sm); }
  .btn-close:hover { color: var(--text-bright); background: rgba(255,255,255,0.08); }
  .setting-group { margin-bottom: 18px; text-align: left; }
  .setting-group label {
    display: block; font-size: var(--text-sm); color: var(--text-secondary);
    margin-bottom: 7px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  }
  .setting-group input {
    width: 100%;
    background: var(--surface-sunken);
    border: 1px solid var(--border-subtle);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: var(--text-base);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
  }
  .setting-group input:focus {
    border-color: var(--color-info);
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
  }
  .setting-group input::placeholder { color: var(--text-dim); }
  .setting-help { margin-top: 7px; font-size: var(--text-caption); color: var(--text-muted); line-height: 1.6; }
  .push-settings-card {
    background: var(--surface-sunken);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 16px;
  }
  .push-settings-status { font-size: var(--text-base); color: var(--text-secondary); margin-bottom: 8px; line-height: 1.6; }
  .push-settings-status strong { color: var(--text-bright); }
  .push-settings-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
  .push-settings-actions .btn-primary,
  .push-settings-actions .btn-secondary { width: auto; flex: none; }
  /* ── 버튼 공통 베이스 ── */
  .btn-primary, .btn-secondary, .btn-settings, .btn-guide-copy, .btn-action {
    cursor: pointer; font-weight: 600; transition: all 0.15s;
    border: 1px solid transparent;
  }
  .btn-primary:disabled, .btn-secondary:disabled, .btn-action:disabled { opacity: 0.45; cursor: not-allowed; }

  /* ghost — 반투명 배경 */
  .btn-secondary { background: rgba(255,255,255,0.04); border-color: rgba(148, 163, 184, 0.2); padding: 10px 14px; border-radius: var(--radius-md); color: var(--text-primary); font-size: var(--text-base); }
  .btn-secondary:hover { background: rgba(255,255,255,0.08); }

  /* glass — 헤더/설정 버튼 */
  .btn-settings { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); padding: 8px 16px; border-radius: var(--radius-lg); color: var(--white); font-size: var(--text-base); }
  .btn-settings:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
  
  /* 가이드 패널 */
  /* ── 공통 오버레이 패널 ── */
  .overlay-panel { background: var(--surface-raised); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); max-width: 95vw; max-height: 85vh; overflow-y: auto; overflow-x: hidden; box-shadow: var(--shadow-panel); }
  .overlay-panel h2 { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: var(--text-xl); margin-bottom: 16px; color: var(--white); border-bottom: 1px solid var(--border-subtle); padding-bottom: 12px; }
  .guide-panel   { padding: 32px; width: min(860px, calc(100vw - 48px)); }
  .history-panel { padding: 28px; width: min(760px, calc(100vw - 48px)); }
  .guide-title-group { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .guide-title-text { min-width: 0; }
  .guide-title-tab { display: inline-flex; align-items: center; justify-content: center; padding: 5px 10px; border-radius: var(--radius-pill); background: rgba(99, 179, 237, 0.14); border: 1px solid rgba(99, 179, 237, 0.24); color: var(--color-info-light); font-size: var(--text-sm); font-weight: 700; white-space: nowrap; }
  .guide-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
  .btn-guide-copy { background: rgba(99, 179, 237, 0.12); color: var(--color-info-light); border: 1px solid rgba(99, 179, 237, 0.28); border-radius: var(--radius-pill); padding: 7px 12px; font-size: var(--text-caption); font-weight: 700; cursor: pointer; transition: 0.2s; white-space: nowrap; }
  .btn-guide-copy:hover { background: rgba(99, 179, 237, 0.2); border-color: rgba(99, 179, 237, 0.4); }
  .guide-capture-wrap { position: relative; }
  .guide-capture-menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 132px; display: none; flex-direction: column; gap: 6px; padding: 8px; border-radius: var(--radius-lg); background: rgba(15, 23, 42, 0.96); border: 1px solid rgba(99, 179, 237, 0.18); box-shadow: 0 12px 32px rgba(0,0,0,0.4); z-index: 10; }
  .guide-capture-menu.show { display: flex; }
  .guide-capture-option { background: rgba(255,255,255,0.04); border: 1px solid rgba(148, 163, 184, 0.16); border-radius: 10px; color: var(--text-primary); font-size: var(--text-caption); font-weight: 700; padding: 8px 10px; cursor: pointer; text-align: left; transition: 0.2s; }
  .guide-capture-option:hover { background: rgba(255,255,255,0.08); border-color: rgba(148, 163, 184, 0.3); }
  .guide-tabs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
  .guide-tab { background: rgba(255,255,255,0.03); border: 1px solid var(--border-subtle); border-radius: var(--radius-pill); color: var(--text-secondary); padding: 8px 14px; font-size: var(--text-caption); font-weight: 700; cursor: pointer; transition: 0.2s; }
  .guide-tab:hover { color: var(--text-primary); border-color: var(--border-muted); }
  .guide-tab.active { background: rgba(99, 179, 237, 0.14); border-color: rgba(99, 179, 237, 0.32); color: var(--color-info-light); }
  .guide-tab-panel { display: none; }
  .guide-tab-panel.active { display: block; }
  .guide-ip-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid rgba(66, 153, 225, 0.34);
    border-radius: var(--radius-md);
    background: rgba(30, 64, 175, 0.14);
  }
  .guide-ip-label { color: var(--text-soft); font-size: var(--text-sm); font-weight: 700; }
  .guide-ip-code {
    font-size: var(--text-base);
    color: #93c5fd;
    background: rgba(2, 6, 23, 0.55);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: var(--radius-sm);
    padding: 2px 8px;
  }
  .guide-section { margin-bottom: 24px; }
  .guide-section h3 { font-size: var(--text-md); color: var(--color-info); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
  .history-meta { color: var(--text-secondary); font-size: var(--text-caption); margin-bottom: 16px; }
  .history-list { display: flex; flex-direction: column; gap: 10px; }
  .history-item { border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 14px 16px; background: rgba(255,255,255,0.02); }
  .history-item-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
  .history-item-title { color: var(--text-bright); font-size: var(--text-md); font-weight: 700; }
  .history-item-time { color: var(--text-muted); font-size: var(--text-caption); white-space: nowrap; }
  .history-item-detail { color: var(--text-soft); font-size: var(--text-base); line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
  .history-item-meta { color: var(--text-muted); font-size: var(--text-sm); margin-top: 8px; }
  .history-badge { display: inline-flex; align-items: center; border-radius: var(--radius-pill); padding: 3px 8px; font-size: var(--text-xs); font-weight: 700; margin-right: 6px; }
  .history-badge.info { color: var(--color-info-light); background: rgba(99,179,237,0.14); }
  .history-badge.success { color: var(--color-success-light); background: rgba(72,187,120,0.14); }
  .history-badge.warning { color: var(--color-warning); background: rgba(246,173,85,0.14); }
  .history-badge.error { color: var(--color-danger-soft); background: rgba(245,101,101,0.14); }
  .history-empty { color: var(--text-muted); text-align: center; padding: 24px 12px; }
  .guide-intro { margin: 0 0 20px; color: var(--text-soft); font-size: var(--text-base); line-height: 1.6; }
  .guide-table { width: 100%; max-width: 100%; min-width: 0; border-collapse: collapse; font-size: var(--text-base); table-layout: fixed; }
  .guide-table td { padding: 8px 0; border-bottom: 1px solid var(--border-subtle); vertical-align: top; white-space: normal; overflow: visible; text-overflow: clip; }
  .guide-table td:first-child { width: 108px; color: var(--text-muted); font-weight: 600; padding-right: 14px; }
  .guide-table td:last-child { min-width: 0; color: var(--text-primary); line-height: 1.55; overflow-wrap: anywhere; word-break: break-word; }
  .guide-tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: var(--text-sm); font-weight: 600; margin-right: 4px; background: var(--border-subtle); color: var(--text-secondary); }
  .guide-tag.blue { background: rgba(66, 153, 225, 0.15); color: var(--color-info); }
  .guide-tag.green { background: rgba(72, 187, 120, 0.15); color: var(--color-success); }
  .guide-note { border: 1px solid rgba(99, 179, 237, 0.18); background: rgba(15, 23, 42, 0.55); border-radius: var(--radius-lg); padding: 14px 16px; color: var(--text-soft); font-size: var(--text-base); line-height: 1.7; }
  .guide-note strong { color: var(--white); }
  .guide-list { margin: 0; padding-left: 18px; color: var(--text-soft); line-height: 1.8; font-size: var(--text-base); }
  .guide-list li + li { margin-top: 4px; }

  /* ── 디자인 가이드 탭 ── */
  .ds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 8px; }
  .ds-swatch {
    display: flex; flex-direction: column; gap: 6px;
    padding: 10px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--surface-sunken);
    cursor: default;
    transition: border-color 0.15s;
  }
  .ds-swatch:hover { border-color: var(--border-muted); }
  .ds-swatch-color {
    width: 100%; height: 32px;
    border-radius: var(--radius-sm);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
  }
  .ds-swatch-name { font-size: var(--text-sm); color: var(--text-secondary); font-weight: 600; font-family: 'SF Mono','Fira Code',monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ds-swatch-val  { font-size: var(--text-xs); color: var(--text-muted); font-family: 'SF Mono','Fira Code',monospace; }

  .ds-type-row { display: flex; align-items: baseline; gap: 20px; padding: 10px 14px; border-bottom: 1px solid var(--border-subtle); }
  .ds-type-row:last-child { border-bottom: none; }
  .ds-type-label { width: 80px; font-size: var(--text-xs); color: var(--text-muted); font-family: 'SF Mono','Fira Code',monospace; flex-shrink: 0; }
  .ds-type-sample { color: var(--text-primary); }
  .ds-type-meta   { margin-left: auto; font-size: var(--text-xs); color: var(--text-dim); font-family: 'SF Mono','Fira Code',monospace; }

  .ds-radius-row { display: flex; align-items: center; gap: 16px; padding: 10px 14px; border-bottom: 1px solid var(--border-subtle); }
  .ds-radius-row:last-child { border-bottom: none; }
  .ds-radius-box { width: 48px; height: 32px; background: rgba(96,165,250,0.2); border: 1px solid rgba(96,165,250,0.4); flex-shrink: 0; }
  .ds-radius-label { font-size: var(--text-sm); color: var(--text-secondary); font-family: 'SF Mono','Fira Code',monospace; }
  .ds-radius-val   { margin-left: auto; font-size: var(--text-xs); color: var(--text-muted); font-family: 'SF Mono','Fira Code',monospace; }

  .ds-shadow-row { padding: 14px; margin-bottom: 10px; border-radius: var(--radius-md); background: var(--surface-overlay); }
  .ds-shadow-label { font-size: var(--text-sm); color: var(--text-secondary); font-family: 'SF Mono','Fira Code',monospace; margin-bottom: 4px; }
  .ds-shadow-val { font-size: var(--text-xs); color: var(--text-dim); font-family: 'SF Mono','Fira Code',monospace; }
  /* 알림 패널 */
  .alerts-panel { position: fixed; top: 0; right: 0; width: 380px; max-width: 100vw; height: 100dvh; background: var(--surface-raised); border-left: 1px solid var(--border-subtle); z-index: 4000; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); padding: calc(24px + var(--safe-top)) calc(24px + var(--safe-right)) calc(24px + var(--safe-bottom)) 24px; box-shadow: -8px 0 32px rgba(0,0,0,0.5); display: flex; flex-direction: column; overflow-x: hidden; }
  .alerts-panel.show { transform: translateX(0); }
  .alerts-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; border-bottom: 1px solid var(--border-subtle); padding-bottom: 16px; }
  .alerts-summary { font-size: var(--text-caption); color: var(--text-dim); margin: -8px 0 16px; }
  .alerts-list { flex: 1; overflow-y: auto; padding-right: 4px; }
  .alert-item { background: var(--border-subtle); border: 1px solid rgba(148, 163, 184, 0.12); border-radius: 10px; padding: 16px; margin-bottom: 12px; font-size: var(--text-md); position: relative; animation: slideIn 0.3s; transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease; }
  .alert-item.unread { border-left: 4px solid var(--color-info); background: linear-gradient(180deg, rgba(45, 55, 72, 0.98), rgba(30, 41, 59, 0.98)); box-shadow: inset 0 0 0 1px rgba(99, 179, 237, 0.15); }
  .alert-item.read { opacity: 0.68; }
  .alert-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
  .alert-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
  .alert-source { font-size: var(--text-sm); color: var(--text-dim); margin-bottom: 10px; }
  .alert-pill { display: inline-flex; align-items: center; justify-content: center; padding: 3px 8px; border-radius: var(--radius-pill); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
  .alert-pill.new { background: rgba(99, 179, 237, 0.16); color: var(--color-info-light); }
  .alert-pill.repeat { background: rgba(246, 173, 85, 0.18); color: var(--color-warning); }
  .alert-pill.ack { background: rgba(72, 187, 120, 0.16); color: var(--color-success-light); }
  .alert-pill.muted { background: rgba(148, 163, 184, 0.18); color: var(--text-soft); }
  .alert-pill.warning { background: rgba(246, 173, 85, 0.18); color: var(--color-warning); }
  .alert-pill.error { background: rgba(245, 101, 101, 0.18); color: var(--color-danger-soft); }
  .alert-pill.recovery { background: rgba(72, 187, 120, 0.16); color: var(--color-success-light); }
  .alert-time { font-size: var(--text-sm); color: var(--text-secondary); margin-bottom: 6px; display: block; }
  .alert-msg { line-height: 1.5; color: var(--text-primary); }
  .alert-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
  .alert-note { font-size: var(--text-sm); color: var(--text-dim); }
  .alert-actions-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .alert-action-btn { background: rgba(15, 23, 42, 0.65); border: 1px solid rgba(148, 163, 184, 0.18); color: var(--text-primary); border-radius: var(--radius-pill); padding: 6px 10px; font-size: var(--text-sm); font-weight: 600; cursor: pointer; transition: 0.2s; }
  .alert-action-btn:hover { background: rgba(30, 41, 59, 0.85); border-color: rgba(148, 163, 184, 0.3); }
  .alert-action-btn:disabled { opacity: 0.5; cursor: not-allowed; }
  .alerts-empty { border: 1px dashed rgba(148, 163, 184, 0.25); border-radius: var(--radius-lg); padding: 18px; color: var(--text-dim); text-align: center; font-size: var(--text-base); }
  .alerts-actions { margin-top: 16px; }
  @keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
  
  /* 알림 버튼 */
  #alerts-overlay { background: transparent; backdrop-filter: none; z-index: 3900; }
  .btn-alerts { position: relative; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); padding: 8px; border-radius: var(--radius-lg); color: var(--white); cursor: pointer; transition: 0.2s; display: flex; align-items: center; }
  .btn-alerts:hover { background: rgba(255,255,255,0.1); }
  .badge-alert { position: absolute; top: -5px; right: -5px; background: var(--color-danger); color: var(--white); font-size: var(--text-xs); font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--surface-raised); }
  .btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

  .hidden { display: none !important; }

  footer { text-align: center; padding: 24px; color: var(--border-muted); font-size: var(--text-caption); }

  /* Responsive Design */
  @media (max-width: 1024px) {
    .main { padding: 20px calc(24px + var(--safe-right)) calc(20px + var(--safe-bottom)) calc(24px + var(--safe-left)); }
  }
  @media (max-width: 960px) {
    .server-grid { grid-template-columns: repeat(2, 1fr); }
  }
  @media (max-width: 860px) {
    .server-grid { grid-template-columns: 1fr 1fr; }
    .section-title { font-size: var(--text-md); }
  }

  @media (max-width: 768px) {
    header { padding: calc(14px + var(--safe-top)) calc(16px + var(--safe-right)) 14px calc(16px + var(--safe-left)); flex-direction: column; align-items: flex-start; gap: 12px; }
    header .header-left { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; min-width: 0; }
    header .header-right { width: 100%; display: grid; grid-template-columns: 44px 1fr 1fr; gap: 8px; }
    header h1 { flex: 1; min-width: 0; font-size: var(--text-lg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .timestamp { display: none; }
    .header-status { flex-shrink: 0; font-size: var(--text-sm); padding: 2px 8px; max-width: 44vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    
    .main { padding: 16px calc(16px + var(--safe-right)) calc(16px + var(--safe-bottom)) calc(16px + var(--safe-left)); }
    .server-grid { grid-template-columns: 1fr; gap: 12px; }
    .server-card { padding: 18px; border-radius: var(--radius-xl); }
    .count-num { font-size: 24px; }
    .server-count { justify-content: space-between; gap: 8px; }
    .resource-item { font-size: var(--text-caption); }
    
    .alerts-panel { width: 100%; border-left: none; padding: calc(16px + var(--safe-top)) calc(16px + var(--safe-right)) calc(16px + var(--safe-bottom)) calc(16px + var(--safe-left)); }
    .settings-panel, .overlay-panel { width: calc(100vw - 24px - var(--safe-left) - var(--safe-right)); margin: 12px; padding: 16px 14px calc(16px + var(--safe-bottom)); }
    .overlay-panel { height: calc(100dvh - 16px - var(--safe-top) - var(--safe-bottom)); max-height: none; border-radius: var(--radius-xl); box-shadow: 0 0 40px rgba(0,0,0,0.8); }
    .overlay-panel h2 { font-size: 18px; margin-bottom: 12px; align-items: flex-start; }
    .guide-actions { flex-shrink: 0; }
    .btn-guide-copy { padding: 7px 10px; font-size: var(--text-sm); }
    .guide-title-group { flex-wrap: wrap; }
    .guide-title-tab { font-size: var(--text-xs); padding: 4px 8px; }
    .guide-capture-menu { min-width: 112px; }
    .guide-capture-option { font-size: var(--text-sm); padding: 8px 9px; }
    .guide-tabs { gap: 6px; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 6px; }
    .guide-tab { flex: 0 0 auto; padding: 7px 12px; font-size: var(--text-sm); }
    .guide-ip-banner { gap: 8px; padding: 9px 10px; }
    .guide-ip-code { font-size: var(--text-sm); }
    .guide-table td:first-child { width: 72px; font-size: var(--text-caption); padding-right: 10px; }
    .guide-table td:last-child { font-size: var(--text-caption); }
    .modal { min-width: 90%; margin: 20px; padding: 20px; }
    .login-card { width: calc(100% - 40px); padding: 30px 20px; }

    /* Touch Optimizations */
    .btn-settings { padding: 10px 14px; font-size: var(--text-caption); justify-content: center; min-height: 44px; }
    .btn-alerts { min-width: 44px; min-height: 44px; justify-content: center; }
    .btn-action, .group-btn { padding: 9px 14px; font-size: var(--text-caption); min-height: 44px; }
    .tab { padding: 9px 14px; font-size: var(--text-base); flex-shrink: 0; min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; scroll-snap-align: start; }
    .filter-tabs { overflow-x: auto; display: flex; flex-wrap: nowrap; padding-bottom: 8px; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
    .btn-os-reboot { width: 44px; height: 44px; top: 10px; right: 10px; }
    .btn-card-history { top: 10px; right: 62px; min-width: 44px; height: 36px; padding: 0 10px; font-size: var(--text-xs); }
    .push-settings-actions { flex-direction: column; }
    .push-settings-actions .btn-secondary,
    .push-settings-actions .btn-primary { width: 100%; }
    .count-num { font-size: var(--text-2xl); }
    /* 서버 섹션 헤더 모바일 */
    .server-section-header { padding: 10px 14px; }
    .group-control-bar { padding: 8px 14px; }
    .group-control-actions .btn-action { min-height: 44px; }
    /* 테이블 → 카드 변환 */
    .table-container { overflow-x: visible; background: transparent; border: none; margin-bottom: 16px; }
    .table-container table { min-width: 0; table-layout: auto; }
    .table-container thead { display: none; }
    .table-container tbody { display: grid; gap: 10px; }
    .table-container tr { display: grid; grid-template-columns: 1fr; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); overflow: hidden; background: rgba(255,255,255,0.02); }
    .table-container tr:hover td { background: transparent; }
    .table-container td { display: flex; align-items: center; justify-content: space-between; gap: 12px; white-space: normal; overflow: visible; text-overflow: clip; padding: 10px 14px; border-bottom: 1px solid var(--border-subtle); min-height: 44px; }
    .table-container td:last-child { border-bottom: none; }
    /* data-label 기반 모바일 레이블 — JS가 td[data-label] 설정 */
    .table-container td::before { content: attr(data-label); flex: 0 0 76px; color: var(--text-muted); font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; align-self: center; }
    .actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; white-space: normal; }
    .actions .btn-action { margin-right: 0; }
    .uptime { text-align: right; }
  }

/* ========== Markdown 문서 스타일 (Workers system_prompt) ========== */
.markdown-body { font-size: 14px; line-height: 1.65; color: #d4d4dc; }
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 {
  margin: 24px 0 12px; font-weight: 700; color: #e8e8ee; line-height: 1.3;
}
.markdown-body h1:first-child, .markdown-body h2:first-child, .markdown-body h3:first-child { margin-top: 0; }
.markdown-body h1 { font-size: 22px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.markdown-body h2 { font-size: 18px; padding-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.markdown-body h3 { font-size: 16px; color: #c9c9d3; }
.markdown-body h4 { font-size: 14px; color: #b0b0bc; }
.markdown-body p { margin: 10px 0; }
.markdown-body ul, .markdown-body ol { margin: 10px 0; padding-left: 24px; }
.markdown-body li { margin: 4px 0; }
.markdown-body li > p { margin: 4px 0; }
.markdown-body strong { color: #e8e8ee; font-weight: 700; }
.markdown-body em { color: #c9c9d3; }
.markdown-body code {
  background: rgba(99,179,237,0.12); color: #90cdf4;
  padding: 2px 6px; border-radius: 4px;
  font-family: 'SF Mono', Menlo, Consolas, monospace; font-size: 0.9em;
}
.markdown-body pre {
  background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.06);
  padding: 14px 16px; border-radius: 8px; overflow: auto; margin: 12px 0;
  font-size: 12.5px; line-height: 1.5;
}
.markdown-body pre code { background: transparent; padding: 0; color: #d4d4dc; font-size: inherit; }
.markdown-body blockquote {
  margin: 12px 0; padding: 8px 14px; border-left: 3px solid #63b3ed;
  background: rgba(99,179,237,0.05); color: #c9c9d3;
}
.markdown-body a { color: #63b3ed; text-decoration: none; }
.markdown-body a:hover { text-decoration: underline; }
.markdown-body hr { border: none; border-top: 1px solid rgba(255,255,255,0.08); margin: 20px 0; }
.markdown-body table { border-collapse: collapse; margin: 12px 0; font-size: 13px; width: 100%; }
.markdown-body th, .markdown-body td { border: 1px solid rgba(255,255,255,0.08); padding: 8px 12px; text-align: left; }
.markdown-body th { background: rgba(255,255,255,0.03); font-weight: 600; }

/* Workers 좌측 목록 카드 (active 상태) */
.worker-list-item.active {
  border-color: rgba(99,179,237,0.6) !important;
  background: rgba(99,179,237,0.08) !important;
}
