/* ─── RESET & CSS VARS ─────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-void:      #020608;
    --bg-panel:     #060d12;
    --bg-card:      #0a1520;
    --border:       rgba(0, 200, 120, 0.12);
    --border-glow:  rgba(0, 200, 120, 0.35);
    --green:        #00e887;
    --green-dim:    rgba(0, 232, 135, 0.15);
    --blue:         #0ea5e9;
    --blue-dim:     rgba(14, 165, 233, 0.15);
    --red:          #ff3b3b;
    --red-dim:      rgba(255, 59, 59, 0.15);
    --orange:       #ff8c00;
    --orange-dim:   rgba(255, 140, 0, 0.15);
    --purple:       #a855f7;
    --purple-dim:   rgba(168, 85, 247, 0.15);
    --text-1:       #e8f4f0;
    --text-2:       #8fa8a0;
    --text-3:       #445850;
    --font-mono:    'Monaco', 'Cascadia Code', 'Fira Code', 'Courier New', monospace;
}

html, body { height: 100%; overflow: hidden; background: var(--bg-void); }

body {
    font-family: var(--font-mono);
    color: var(--text-1);
    font-size: 12px;
    line-height: 1.5;
}

/* ─── SCANLINE OVERLAY (사이버펑크) ─────────────────────────────────── */
body::after {
    content: '';
    position: fixed; inset: 0;
    background:
        repeating-linear-gradient(0deg,
            transparent, transparent 3px,
            rgba(0,0,0,0.045) 3px, rgba(0,0,0,0.045) 4px),
        repeating-linear-gradient(90deg,
            transparent, transparent 3px,
            rgba(0,255,180,0.008) 3px, rgba(0,255,180,0.008) 4px);
    pointer-events: none; z-index: 9999;
    animation: scanFlicker 8s ease-in-out infinite;
}
@keyframes scanFlicker {
    0%,100% { opacity: 1; }
    48%     { opacity: 0.92; }
    50%     { opacity: 1; }
    85%     { opacity: 0.96; }
}

/* ─── LAYOUT ───────────────────────────────────────────────────────── */
.app-shell {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* ─── TOP BAR ──────────────────────────────────────────────────────── */
.top-bar {
    height: 52px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 24px;
    flex-shrink: 0;
    position: relative;
}

.top-bar::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--green), transparent);
    animation: topline 4s ease-in-out infinite;
}
@keyframes topline {
    0%,100% { opacity: 0.3; } 50% { opacity: 1; }
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.brand-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--green-dim), var(--blue-dim));
    border: 1px solid var(--border-glow);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
}
.brand-name {
    font-size: 15px; font-weight: 700;
    letter-spacing: 4px;
    background: linear-gradient(90deg, #00ff9d, #00e5ff, #7c3aed);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 6px rgba(0,255,160,0.4));
    animation: brandPulse 3s ease-in-out infinite;
}
@keyframes brandPulse {
    0%,100% { filter: drop-shadow(0 0 6px rgba(0,255,160,0.4)); }
    50%      { filter: drop-shadow(0 0 12px rgba(0,229,255,0.6)); }
}
.brand-sub {
    font-size: 9px; color: var(--text-3);
    letter-spacing: 2px; text-transform: uppercase;
}

.top-bar-stats {
    display: flex; gap: 8px; flex: 1;
}
.stat-chip {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 12px;
    display: flex; flex-direction: column; align-items: center;
    min-width: 100px;
}
.stat-chip .label { font-size: 9px; color: var(--text-3); text-transform: uppercase; letter-spacing: 1px; }
.stat-chip .value { font-size: 13px; font-weight: 700; }
.stat-chip.eth .value  { color: #627eea; }
.stat-chip.btc .value  { color: #f7931a; }
.stat-chip.alert .value { color: var(--red); }
.stat-chip.node .value  { color: var(--green); }

.top-bar-right {
    display: flex; align-items: center; gap: 16px;
}

.live-indicator {
    display: flex; align-items: center; gap: 6px;
    font-size: 10px; font-weight: 700; letter-spacing: 2px;
    color: var(--green);
}
.live-dot {
    width: 8px; height: 8px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--green);
    animation: pulse-dot 1.5s infinite;
}
@keyframes pulse-dot {
    0%,100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.6; transform: scale(0.85); }
}

#liveClock {
    font-size: 13px; font-weight: 600;
    color: var(--text-2);
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
}

.operator-chip {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 10px; color: var(--text-2);
    letter-spacing: 1px;
}

/* ─── MAIN LAYOUT ──────────────────────────────────────────────────── */
.main-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;   /* flex 자식에 높이 전파 — 없으면 column 방향 flex가 min-content 크기로 고정 */
}

/* ─── LEFT: WHALE FEED ─────────────────────────────────────────────── */
.feed-panel {
    width: 340px;
    flex-shrink: 0;
    background: var(--bg-panel);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
}

.panel-header {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    flex-shrink: 0;
}
.panel-title {
    font-size: 10px; font-weight: 700;
    letter-spacing: 2px; color: var(--text-2);
    text-transform: uppercase;
}
.panel-badge {
    background: var(--red-dim);
    border: 1px solid var(--red);
    color: var(--red);
    border-radius: 3px;
    padding: 1px 6px;
    font-size: 9px; font-weight: 700;
}

.feed-list {
    flex: 1; overflow-y: auto;
    padding: 8px;
}
.feed-list::-webkit-scrollbar { width: 3px; }
.feed-list::-webkit-scrollbar-thumb { background: var(--border-glow); border-radius: 2px; }

/* ─── WHALE FEED CARD ──────────────────────────────────────────────── */
.whale-card {
    background: var(--bg-card);
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 6px;
    border-left: 3px solid;
    position: relative;
    animation: cardIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
    transition: background 0.2s;
}
.whale-card:hover { background: #0d1e2c; }
@keyframes cardIn {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}
.whale-card.critical { border-color: var(--red); }
.whale-card.high     { border-color: var(--orange); }
.whale-card.medium   { border-color: #fbbf24; }
.whale-card.info     { border-color: var(--green); }

.whale-card-top {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 6px;
}
.whale-amount {
    font-size: 16px; font-weight: 800;
    letter-spacing: -0.5px;
}
.whale-card.critical .whale-amount { color: var(--red); text-shadow: 0 0 12px rgba(255,59,59,0.5); }
.whale-card.high     .whale-amount { color: var(--orange); text-shadow: 0 0 12px rgba(255,140,0,0.5); }
.whale-card.medium   .whale-amount { color: #fbbf24; }
.whale-card.info     .whale-amount { color: var(--green); text-shadow: 0 0 12px rgba(0,232,135,0.4); }

.whale-card-meta {
    display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
}
.risk-badge {
    font-size: 9px; font-weight: 700; letter-spacing: 1px;
    padding: 2px 6px; border-radius: 3px;
}
.risk-badge.critical { background: var(--red-dim); color: var(--red); border: 1px solid var(--red); }
.risk-badge.high     { background: var(--orange-dim); color: var(--orange); border: 1px solid var(--orange); }
.risk-badge.medium   { background: rgba(251,191,36,0.15); color: #fbbf24; border: 1px solid #fbbf24; }
.risk-badge.info     { background: var(--green-dim); color: var(--green); border: 1px solid var(--green); }

.whale-time { font-size: 9px; color: var(--text-3); }

.whale-flow {
    display: flex; align-items: center; gap: 4px;
    font-size: 10px; margin-bottom: 6px;
}
.addr-wrap { display: inline-flex; align-items: center; gap: 3px; }
.addr {
    font-size: 10px; color: var(--text-2); font-family: var(--font-mono);
    text-decoration: none; transition: color 0.15s;
}
.addr:hover { color: var(--cyan); text-decoration: underline; }
.addr-arkham {
    font-size: 9px; color: var(--text-3); text-decoration: none;
    opacity: 0; transition: opacity 0.15s, color 0.15s;
    line-height: 1; padding: 0 1px;
}
.whale-card:hover .addr-arkham { opacity: 1; }
.addr-arkham:hover { color: var(--orange); }
.arrow { color: var(--text-3); font-size: 10px; }

.label-pills {
    display: flex; gap: 4px; flex-wrap: wrap;
}
.label-pill {
    font-size: 9px; padding: 1px 6px; border-radius: 3px; font-weight: 600;
}
.label-pill.exchange { background: var(--blue-dim); color: var(--blue); border: 1px solid rgba(14,165,233,0.3); }
.label-pill.hacker   { background: var(--red-dim);  color: var(--red);  border: 1px solid rgba(255,59,59,0.3); }
.label-pill.coldwallet { background: var(--purple-dim); color: var(--purple); border: 1px solid rgba(168,85,247,0.3); }
.label-pill.defi     { background: var(--green-dim); color: var(--green); border: 1px solid rgba(0,232,135,0.3); }
.label-pill.whale    { background: rgba(251,191,36,0.15); color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }
.label-pill.unknown  { background: rgba(100,116,139,0.15); color: #64748b; border: 1px solid rgba(100,116,139,0.3); }
.label-pill.identified { background: rgba(100,116,139,0.12); color: #94a3b8; border: 1px solid rgba(100,116,139,0.25); }
.label-pill.chain-eth { background: rgba(98,126,234,0.15); color: #627eea; border: 1px solid rgba(98,126,234,0.3); }
.label-pill.chain-btc { background: rgba(247,147,26,0.15); color: #f7931a; border: 1px solid rgba(247,147,26,0.3); }

.usd-val { font-size: 9px; color: var(--text-3); margin-top: 4px; text-align: right; }

/* ─── CENTER: MAP PANEL ────────────────────────────────────────────── */
.map-panel {
    flex: 1;
    min-width: 0;    /* 수평 flex에서 width 전파 */
    min-height: 0;   /* column 내부 flex 높이 전파 */
    display: flex; flex-direction: column;
    overflow: hidden;
    position: relative;
}

.map-container {
    flex: 1;
    position: relative;
    background: #020a0e;
    overflow: hidden;
    min-height: 0;
}

#threatMap {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: block;
}

/* Map overlay labels */
.hub-label {
    position: absolute;
    font-size: 9px; font-weight: 700;
    color: rgba(0,255,150,0.7);
    letter-spacing: 1.5px;
    pointer-events: none;
    text-shadow: 0 0 10px rgba(0,255,150,0.6), 0 0 4px rgba(0,0,0,1);
    transform: translate(-50%, -100%);
    margin-top: -6px;
    white-space: nowrap;
    text-transform: uppercase;
}

/* Map corner info */
.map-corner {
    position: absolute;
    font-size: 9px; color: var(--text-3);
    letter-spacing: 1.5px; text-transform: uppercase;
}
.map-corner.tl {
    top: 12px; left: 14px;
    color: rgba(0,255,180,0.45);
    font-size: 10px; font-weight: 700;
    text-shadow: 0 0 8px rgba(0,255,180,0.3);
}
.map-corner.tr { top: 12px; right: 14px; color: var(--green); }
.map-corner.bl { bottom: 12px; left: 14px; }
.map-corner.br { bottom: 12px; right: 14px; color: var(--green); }

/* Threat alert flash overlay — CRITICAL 시 전체 테두리 폭발 */
.threat-flash {
    position: absolute; inset: 0;
    border: 3px solid var(--red);
    pointer-events: none;
    opacity: 0;
    box-shadow:
        inset 0 0 80px rgba(255,0,60,0.25),
        inset 0 0 20px rgba(255,0,60,0.4),
        0 0 40px rgba(255,0,60,0.3);
}
.threat-flash.active {
    animation: flashBorder 1.2s ease-out;
}
@keyframes flashBorder {
    0%   { opacity: 1; box-shadow: inset 0 0 120px rgba(255,0,60,0.5), 0 0 80px rgba(255,0,60,0.4); }
    30%  { opacity: 0.8; }
    100% { opacity: 0; }
}

/* ─── BOTTOM STATS BAR ─────────────────────────────────────────────── */
.bottom-bar {
    height: 42px;
    background: var(--bg-panel);
    border-top: 1px solid var(--border);
    display: flex; align-items: center;
    padding: 0 16px; gap: 24px;
    flex-shrink: 0;
}

.bottom-stat {
    display: flex; align-items: center; gap: 8px;
    font-size: 11px;
}
.bottom-stat .key  { color: var(--text-3); }
.bottom-stat .val  { font-weight: 700; }
.bottom-stat.green .val { color: var(--green); }
.bottom-stat.red   .val { color: var(--red); }
.bottom-stat.blue  .val { color: var(--blue); }
.bottom-stat.eth   .val { color: #627eea; }
.bottom-stat.btc   .val { color: #f7931a; }

.separator { color: var(--text-3); }

/* ─── RIGHT: TOOLS PANEL ────────────────────────────────────────────── */
.tools-panel {
    width: 280px;
    flex-shrink: 0;
    background: var(--bg-panel);
    border-left: 1px solid var(--border);
    display: flex; flex-direction: column;
    overflow-y: auto;
}
.tools-panel::-webkit-scrollbar { width: 3px; }
.tools-panel::-webkit-scrollbar-thumb { background: var(--border-glow); }

.tool-section {
    border-bottom: 1px solid var(--border);
    padding: 12px;
}
.tool-section-title {
    font-size: 9px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 2px;
    color: var(--text-3); margin-bottom: 10px;
}

/* Address Lookup */
.lookup-input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 11px; color: var(--text-1);
    font-family: var(--font-mono);
    outline: none;
    transition: border-color 0.2s;
}
.lookup-input:focus { border-color: var(--border-glow); }
.lookup-input::placeholder { color: var(--text-3); }

.lookup-chain-row {
    display: flex; gap: 6px; margin: 8px 0;
}
.chain-btn {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 5px;
    font-size: 10px; font-weight: 700;
    color: var(--text-2); font-family: var(--font-mono);
    cursor: pointer; transition: all 0.2s;
}
.chain-btn.active.eth { border-color: #627eea; color: #627eea; background: rgba(98,126,234,0.1); }
.chain-btn.active.btc { border-color: #f7931a; color: #f7931a; background: rgba(247,147,26,0.1); }
.chain-btn:hover      { border-color: var(--border-glow); }

.lookup-btn {
    width: 100%;
    background: linear-gradient(90deg, rgba(0,232,135,0.15), rgba(14,165,233,0.15));
    border: 1px solid var(--border-glow);
    border-radius: 6px;
    padding: 8px;
    font-size: 11px; font-weight: 700;
    color: var(--green); font-family: var(--font-mono);
    cursor: pointer; transition: all 0.2s;
    letter-spacing: 1px;
}
.lookup-btn:hover { background: linear-gradient(90deg, var(--green-dim), var(--blue-dim)); }

.lookup-result {
    margin-top: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px;
    font-size: 11px;
    display: none;
}
.lookup-result.show { display: block; animation: fadeIn 0.3s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.lr-addr { font-size: 10px; color: var(--text-3); word-break: break-all; margin-bottom: 8px; }
.lr-label { font-size: 16px; font-weight: 700; color: var(--text-1); margin-bottom: 4px; }
.lr-type  { font-size: 10px; margin-bottom: 8px; }
.lr-risk  { font-size: 10px; }

/* Volume Chart */
.mini-chart-wrap {
    height: 90px;
    position: relative;
}

/* Chain Stats */
.chain-stat-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.chain-stat-row:last-child { border-bottom: none; }
.chain-name { font-size: 11px; font-weight: 600; }
.chain-vol  { font-size: 11px; color: var(--text-2); }

/* Threat Level Meter */
.threat-meter {
    height: 8px;
    background: var(--bg-card);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 6px;
}
.threat-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Recent Activity Heatmap */
.activity-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2px;
    margin-top: 4px;
}
.activity-cell {
    height: 14px;
    border-radius: 2px;
    background: var(--bg-card);
    transition: background 0.3s;
}
.activity-cell.l1 { background: rgba(0,232,135,0.2); }
.activity-cell.l2 { background: rgba(0,232,135,0.4); }
.activity-cell.l3 { background: rgba(0,232,135,0.7); }
.activity-cell.l4 { background: var(--green); box-shadow: 0 0 4px var(--green); }

/* Pulse number display */
.big-num {
    font-size: 28px; font-weight: 800;
    letter-spacing: -1px;
}
.big-num.green  { color: var(--green); text-shadow: 0 0 20px rgba(0,232,135,0.3); }
.big-num.red    { color: var(--red);   text-shadow: 0 0 20px rgba(255,59,59,0.3); }
.big-num.orange { color: var(--orange); }

/* Scrolling ticker */
.ticker-wrap {
    overflow: hidden; height: 22px;
}
.ticker-inner {
    display: flex; gap: 32px;
    animation: tickerScroll 30s linear infinite;
    white-space: nowrap;
}
@keyframes tickerScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.ticker-item { font-size: 10px; color: var(--text-2); }
.ticker-item .t-up   { color: var(--green); }
.ticker-item .t-down { color: var(--red); }
.ticker-item .t-warn { color: var(--orange); }

/* Toast — 사이버펑크 알림 */
.toast-container {
    position: fixed; bottom: 20px; right: 300px;
    z-index: 9000; display: flex; flex-direction: column-reverse; gap: 8px;
}
.toast {
    background: rgba(6, 16, 24, 0.96);
    border: 1px solid rgba(0,255,160,0.35);
    border-left: 3px solid var(--green);
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 11px; color: var(--text-1);
    box-shadow: 0 4px 28px rgba(0,0,0,0.7), 0 0 12px rgba(0,255,160,0.08);
    animation: toastIn 0.4s cubic-bezier(0.22,1,0.36,1);
    max-width: 340px;
    backdrop-filter: blur(4px);
}
.toast.critical {
    border-color: rgba(255,0,60,0.5);
    border-left-color: var(--red);
    box-shadow: 0 4px 28px rgba(255,0,60,0.3), 0 0 20px rgba(255,0,60,0.15);
    animation: toastInCritical 0.4s cubic-bezier(0.22,1,0.36,1);
}
@keyframes toastIn {
    from { opacity: 0; transform: translateX(24px) scale(0.96); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastInCritical {
    0%   { opacity: 0; transform: translateX(24px) scale(0.94); }
    60%  { transform: translateX(-4px) scale(1.02); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}

/* ═══════════════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE  ≤ 768px
   홍콩 Web3 네트워킹 — 폰에서 바로 보여줄 수 있도록
═══════════════════════════════════════════════════════════════════════ */

/* 모바일 전용 요소: 데스크톱에서 숨김 */
.mobile-kpi-bar { display: none; }
.mobile-tabs    { display: none; }

@media (max-width: 768px) {

  /* ── 루트 레이아웃 ─────────────────────────────────────────────── */
  html, body { overflow: hidden; height: 100%; height: 100dvh; }

  .app-shell {
    height: 100vh;
    height: 100dvh; /* dynamic viewport height — iOS Safari 주소창 대응 */
    overflow: hidden;
  }

  /* ── 상단 바 compact ──────────────────────────────────────────── */
  .top-bar {
    height: auto;
    min-height: 44px;
    padding: 6px 12px;
    gap: 0;
    flex-wrap: nowrap;
    justify-content: space-between;
  }
  .top-bar-stats  { display: none; } /* KPI bar로 대체 */
  .operator-chip  { display: none; }
  .brand-sub      { display: none; }
  #liveClock      { display: none; }
  .brand-name     { font-size: 12px; letter-spacing: 2px; }
  .brand-icon     { width: 28px; height: 28px; font-size: 14px; }
  .top-bar-right  { gap: 10px; }
  .top-bar-right a { padding: 4px 8px; font-size: 10px; }

  /* ── 모바일 KPI 바 ──────────────────────────────────────────────
     ticker 자리 대신 핵심 지표 4개를 한 줄로 표시             */
  .mobile-kpi-bar {
    display: flex !important;
    height: 34px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    overflow: hidden;
  }
  .mkpi {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    border-right: 1px solid var(--border);
  }
  .mkpi:last-child { border-right: none; }
  .mkpi-v {
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    color: var(--text-1);
  }
  .mkpi-v.eth-c  { color: #627eea; }
  .mkpi-v.red-c  { color: var(--red); }
  .mkpi-v.ora-c  { color: var(--orange); }
  .mkpi-v.grn-c  { color: var(--green); }
  .mkpi-l {
    font-size: 7px;
    color: var(--text-3);
    letter-spacing: 0.8px;
    text-transform: uppercase;
  }

  /* ── 티커 숨김 (모바일에서 KPI 바로 대체) ────────────────────── */
  .ticker-bar-mobile-hide { display: none !important; }

  /* ── 모바일 탭 바 ────────────────────────────────────────────── */
  .mobile-tabs {
    display: flex !important;
    height: 40px;
    background: var(--bg-void);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }
  .mobile-tab {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-3);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    padding: 0 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
  }
  .mobile-tab .tab-icon { font-size: 14px; line-height: 1; }
  .mobile-tab .tab-lbl  { font-size: 8px; }
  .mobile-tab.active {
    color: var(--green);
    border-bottom-color: var(--green);
  }

  /* ── 패널 — 탭 전환 제어 ─────────────────────────────────────── */
  .main-layout {
    flex-direction: column;
    overflow: hidden;
    position: relative;
  }

  .feed-panel,
  .map-panel,
  .tools-panel {
    display: none;
    width: 100% !important;
    border: none !important;
    flex-shrink: 0;
    min-height: 0;
  }

  .feed-panel.m-active,
  .map-panel.m-active,
  .tools-panel.m-active {
    display: flex;
    flex: 1;
    min-height: 0;
  }

  .tools-panel.m-active {
    flex-direction: column;
    overflow-y: auto;
  }

  /* ── 하단 바 compact ─────────────────────────────────────────── */
  .bottom-bar {
    height: auto;
    min-height: 32px;
    padding: 4px 10px;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 9px;
  }
  .separator { display: none; }
  .bottom-stat .key { display: none; } /* 모바일에선 값만 */
  .bottom-stat .val { font-size: 10px; }
  .bottom-stat::before {
    font-size: 8px;
    color: var(--text-3);
    letter-spacing: 0.5px;
  }
  .bottom-stat.green::before { content: 'FLOWS '; }
  .bottom-stat.eth::before   { content: 'ETH '; }
  .bottom-stat.red::before   { content: 'CRIT '; }
  .bottom-stat.blue::before  { content: 'WS '; }

  /* ── 카드 터치 최적화 ────────────────────────────────────────── */
  .whale-card  { padding: 12px 14px; margin-bottom: 8px; }
  .whale-amount { font-size: 18px; }
  .whale-flow   { font-size: 11px; }
  .addr         { font-size: 11px; }

  /* ── 툴 패널 터치 최적화 ──────────────────────────────────────── */
  .tool-section  { padding: 14px 16px; }
  .lookup-input  { font-size: 15px; padding: 10px 12px; }
  .lookup-btn    { padding: 12px; font-size: 12px; }
  .chain-btn     { padding: 9px; font-size: 12px; }
  .chain-name    { font-size: 12px; }
  .chain-vol     { font-size: 12px; }
  .big-num       { font-size: 32px; }

  /* ── 토스트 — 화면 하단 전체 폭 ─────────────────────────────── */
  .toast-container {
    right: 12px;
    left: 12px;
    bottom: 52px;
  }
  .toast { max-width: 100%; font-size: 12px; }
}

