.view-live-chart {
    /* ══ style.css 에메랄드 테마 매핑 ══ */
    --emerald-main:  #10b981;
    --emerald-dark:  #059669;
    --emerald-deep:  #0f172a;
    --emerald-neon:  #34d399;
    --emerald-soft:  #10b981;
    --emerald-glow:  rgba(52, 211, 153, 0.25);
  
    --bg-deep:   #0f172a;
    --bg-card:   rgba(30, 41, 59, 0.85);
    --bg-input:  #1e293b;
    --bg-glass:  rgba(15, 23, 42, 0.82);
    --bg-color: #0f1116;
  
    --text-primary:   #e2e8f0;
    --text-dim:       #34d399;
    --text-mint-gray: #94a3b8;
    --text-emerald:   #34d399;
    --border-line:    rgba(52, 211, 153, 0.15);
  
    /* 차트 변수 매핑 */
    --ink:     #0f172a;
    --surface: #1e293b;
    --card:    rgba(30,41,59,0.9);
    --card2:   rgba(15,23,42,0.95);
    --border:  rgba(52,211,153,0.15);
    --text:    #e2e8f0;
    --muted:   #64748b;
    --gold:    #34d399;
    --gold2:   #059669;
    --up:      #10b981;
    --down:    #f43f5e;
    --radius:  12px;
    --topbar-h: 56px;
    --tabbar-h: 54px;
    --sidebar-l-w: 220px;
    --safe-top:    env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left:   env(safe-area-inset-left, 0px);
    --safe-right:  env(safe-area-inset-right, 0px);

    height: 100%;
    color: var(--text);
    font-family: 'DM Sans', -apple-system, sans-serif;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;

    /* 딥 에메랄드 배경 설정 */
    background: radial-gradient(circle at 50% -20%, #0f172a 0%, #0f1116 80%);   
    position: relative;
    width: 100%;
  }

.view-live-chart *, 
.view-live-chart *::before, 
.view-live-chart *::after { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

/* 3. 미세 노이즈 효과 (body::before -> .view-live-chart::before) */
.view-live-chart::before {
  content: "";
  /* position: absolute; */
  position: fixed; bottom: 0; left: 0; right: 0;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}

/* 4. 배경 글로우 효과 (body::after -> .view-live-chart::after) */
.view-live-chart::after {
  content: "";
  /* position: absolute; */
  position: fixed; bottom: 0; left: 0; right: 0;
  top: -10%; left: -10%;
  width: 40%; height: 40%;
  background: radial-gradient(circle at 50% -20%, #0f172a 0%, #0f1116 80%);   
  /* var(--emerald-glow); */
  filter: blur(150px);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}
  
  /* ── LAYOUT ── */
  #app {
    display: grid;
    /* 1행: 탑바 높이 / 2행: 남은 공간 전체(1fr) */
    grid-template-rows: var(--topbar-h) 1fr;
    /* 1열: 사이드바 너비 / 2열: 남은 공간 전체(1fr) */
    grid-template-columns: var(--sidebar-l-w) 1fr;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    gap: 0;
    position: relative;
    z-index: 1;
  }
  
  /* ── TOPBAR ── */
  #topbar {
    grid-column: 1 / -1;
    grid-row: 1;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 20px;
    padding-left: calc(20px + var(--safe-left));
    padding-right: calc(20px + var(--safe-right));
    /* style.css 글래스모피즘 */
    background: var(--bg-color);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-line);
    z-index: 10;
    min-width: 0;
    min-height: 80px;
  }
  
 
  /* Left Sidebar는 2행의 왼쪽 칸을 통째로 차지 */
  #sidebar-left {
    grid-column: 1;
    grid-row: 2;
    background: var(--bg-color);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-right: 1px solid var(--border-line);
    display: flex;
    flex-direction: column;
    overflow: auto;  /* 내용이 길면 내부 스크롤 */
  }

  #chart-content-wrap {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #chart-wrap { 
    flex: 1; /* 남은 공간을 차트가 다 먹음 */
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--bg-deep);
    overflow: hidden; 
  }

  #bottom-trade-panel {
    height: 200px; /* 고정 높이 부여 */
    flex-shrink: 0;
    background: var(--bg-color);
    backdrop-filter: blur(15px);
    border-top: 1px solid var(--border-line);
    display: flex;
    flex-direction: column;
    padding: 8px 16px;
    overflow: hidden;
  }

  .topbar-pair { 
    display: flex; 
    flex-direction: column;      /* 세로 방향으로 쌓음 → 두 줄로 만듦 */
    align-items: flex-start;     /* 왼쪽 정렬 (가운데 정렬은 center) */
    gap: 4px;                    /* 두 줄 사이의 간격 */
    margin-left: 8px; 
    min-width: 0; 
    flex-shrink: 0; 
  }
  .pair-label { font-family: 'Space Mono', monospace; font-size: 14px; font-weight: 700; color: var(--text-primary); }
  .pair-price {
    font-family: 'Space Mono', monospace;
    font-size: 16px; font-weight: 700;
    color: var(--emerald-neon);
    text-shadow: 0 0 8px rgba(52,211,153,0.4);
    transition: color 0.3s;
  }
  .pair-change { font-family: 'Space Mono', monospace; font-size: 12px; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
  .pair-change.up   { background: rgba(16,185,129,.15); color: #10b981; }
  .pair-change.down { background: rgba(244,63,94,.12);  color: #f43f5e; }
  .topbar-stats { display: flex; gap: 20px; margin-left: auto; margin-right: 50px; flex-shrink: 0; }
  /* 탑바 모바일 통계 - 새로 추가 */
#topbar-stats-mobile {
  display: none;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
}

.mobile-order-buttons {
  display: none;
  gap: 10px;
  width: 100%;
  padding: 8px 0;
}



  .ts-item { display: flex; flex-direction: column; align-items: flex-end; }
  .ts-label { font-size: 10px; color: var(--text-mint-gray); letter-spacing: 1px; text-transform: uppercase; }
  .ts-val   { font-family: 'Space Mono', monospace; font-size: 13px; font-weight: 700; margin-top: 1px; }
  

  .sidebar-pc { padding: 14px 16px 0; }
  .sidebar-title {
    font-family: 'Space Mono', monospace;
    font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
    color: var(--emerald-neon);
    text-shadow: 0 0 6px rgba(52,211,153,0.3);
    margin-bottom: 10px;
    margin-top:20px;
    display: flex; align-items: center; gap: 8px;    
  }
  .sidebar-title::after { content: ''; flex: 1; height: 1px; background: rgba(52,211,153,0.2); }
  
  /* Timeframe pills */
  .tf-group { display: flex; gap: 6px; margin-bottom: 20px; }
  .tf-btn {
    padding: 5px 10px; border-radius: 6px;
    margin-right: 5px;
    background: var(--bg-input);
    border: 1px solid var(--border-line);
    color: var(--text-mint-gray);
    font-family: 'Space Mono', monospace; font-size: 11px;
    cursor: pointer; transition: all .2s;
  }
  .tf-btn:hover { border-color: var(--emerald-neon); color: var(--emerald-neon); }
  .tf-btn.active {
    background: rgba(52,211,153,0.12);
    border-color: var(--emerald-neon);
    color: var(--emerald-neon);
    box-shadow: 0 0 8px rgba(52,211,153,0.2);
  }
  
  /* Indicators */
  .ind-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border-line); }
  .ind-row:last-child { border-bottom: none; }
  .ind-name { font-size: 12px; color: var(--text-primary); }
  .ind-val  { font-family: 'Space Mono', monospace; font-size: 11px; }
  
  /* Toggle (style.css .theme-switch 참고) */
  .tog {
    width: 34px; height: 18px; border-radius: 9px;
    background: var(--bg-input);
    border: 1px solid var(--border-line);
    position: relative; cursor: pointer; transition: all .2s; flex-shrink: 0;
  }
  .tog.on { background: rgba(52,211,153,0.25); border-color: var(--emerald-neon); box-shadow: 0 0 6px rgba(52,211,153,0.2); }
  .tog::after { content: ''; position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--text-mint-gray); top: 2px; left: 2px; transition: all .2s; }
  .tog.on::after { background: var(--emerald-neon); left: 18px; box-shadow: 0 0 4px rgba(52,211,153,0.5); }
  
  
 
  #chart-container { 
    flex: 1; position: relative; 
    touch-action: none; /* 브라우저의 기본 모바일 제스처(스크롤 등)를 차단하고 차트 내부 터치 이벤트(십자선 드래그 등)를 우선 허용 */
  }

  .mobile-only-stats-section {
      display: none ;
  }

  .pc-only-trade-section {
      display: flex;
      flex-direction: column;
      height: 100%;
  }

  #btn-back{
    cursor: pointer;
  }

  
  /* ══ MOBILE TAB BAR ══ */
  #mob-tabbar {
    display: none;
    position: fixed; bottom: 0; left: 0; right: 0;
    height: calc(var(--tabbar-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: var(--bg-color);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid var(--border-line);
    z-index: 300;
  }
  .mob-tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    background: none; border: none; color: var(--text-mint-gray);
    font-size: 9px; letter-spacing: .5px; text-transform: uppercase;
    cursor: pointer; transition: color .2s; min-height: 44px;
  }
  .mob-tab i { font-size: 20px; }
  .mob-tab.active { color: var(--emerald-neon); text-shadow: 0 0 6px rgba(52,211,153,0.4); }
   
  #chart-loading {
    display:none; 
    position:absolute; inset:0; 
    background:rgba(15,23,42,0.7); 
    backdrop-filter:blur(4px); 
    z-index:20; 
    display:flex; 
    flex-direction:column; 
    align-items:center; 
    justify-content:center; 
    gap:10px;
    pointer-events: none;
  }

  .topbar-stats-mobile{
    display:none;
    gap: 12px;
    margin-left: auto;
    flex-shrink: 0;
  }

  /* ══ MOBILE (≤768px) ══ */  
  @media (max-width: 768px) {
    #app {
      display: grid;
      grid-template-columns: 1fr;
      grid-template-rows: var(--topbar-h) 1fr auto auto calc(var(--tabbar-h) + var(--safe-bottom)) ;
      height: 100vh;
      height: 100dvh;
      overflow: hidden;
    }

    /* 2. 탑바는 전체 행/열 통과 */
    #topbar {
        grid-column: 1;
        grid-row: 1;
    }

    /* 3. PC용 레프트 사이드바는 모바일에서 숨김 (모바일은 바텀시트/드로어 사용) */
    #sidebar-left {
        display: none !important;
    }

    /* 4. 차트 영역이 2행을 바로 차지하도록 격자 재배치 */
    #chart-content-wrap {
        display: contents; /* 래퍼의 태그 영향력을 없애고 내부 요소들이 바로 #app 그리드에 참여하게 함 */
    }

    #chart-wrap {
        grid-column: 1;
        grid-row: 2;
        margin-top: 0;
        height: 100%;
    }

    #bottom-trade-panel {
        grid-column: 1;
        grid-row: 3;
        height: 100% !important;
        /* margin-bottom: 100px !important;
        padding-bottom: 100px !important; */
    }

    #sub-chart-container-m {
      grid-column: 1;
      /* 만약 시장 통계 아래에 위치한다면 알맞은 행 번호 지정 */
      background: var(--bg-deep);
      height: 100px !important; /* 기존보다 높이를 대폭 줄임 */
      min-height: 100px;
      max-height: 100px;
    }

    #chart-container {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    .quick-order-buttons {
      display: flex;
      gap: 10px;
      width: 100%;
    }

    .btn-back{
      display:none;
    }
  
    .btn-order {
      flex: 1;
      height: 42px;
      border-radius: 8px;
      border: none;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      transition: filter 0.15s, transform 0.1s;
    }
  
    .btn-order:active {
      transform: scale(0.97);
    }
  
    /* SELL 버튼 (강렬한 레드/핑크 계열톤) */
    .btn-sell {
      background: #f43f5e; 
      color: #ffffff;
      box-shadow: 0 2px 6px rgba(244, 63, 94, 0.3);
    }
  
    /* BUY 버튼 (민트/초록 계열톤 - 플랫폼 메인 컬러와 깔맞춤) */
    .btn-buy {
      background: #34d399; 
      color: #0b0f19;
      box-shadow: 0 2px 6px rgba(52, 211, 153, 0.3);
    }
  
    .order-text {
      font-size: 14px;
      font-weight: 700;
      letter-spacing: 0.5px;
      line-height: 1.1;
    }
  
    .order-sub {
      font-size: 9px;
      opacity: 0.8;
    }

    .topbar-stats { display: none; } 

    .pair-price { font-size: 14px; }

    .pc-nav-menu { display: none !important; } 


    /* 모바일에서는 PC 거래내역을 숨기고 스탯 영역을 활성화 */
    .pc-only-trade-section {
        display: none !important;
    }
    .mobile-only-stats-section {
        display: flex !important;
        flex-direction: column;
        width: 100%;
    }

    .topbar-stats-mobile {
        display: flex; justify-content: space-between; align-items: center;
        width: 100%;
        padding: 5px 8px 8px 6px;
        border:none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05); 
    }

    #mob-tabbar { display: flex; }  
    #crosshair-info { 
      position: absolute; top: 30px; left: 1px;
      font-size: 0.7rem; gap: 4px; padding: 5px 2px; 
    }

    #live-change {
      display: block;
      /* margin-top: 0; */
      font-size: 10px;
    }

    #topbar-stats {
      display: none !important;
    }
    #topbar-stats-mobile {
      display: flex !important;
    }
    
    /* 모바일 버튼 표시 */
    .mobile-order-buttons {
      display: flex !important;
    }

  }
  
  /* Trade list */
  /* 4줄 높이 고정 및 스크롤 설정 */
  .trade-list { 
    flex: 1; 
    overflow-y: auto; 
    max-height: 120px; /* 대략 4줄 정도가 보이는 높이 */
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .trade-list::-webkit-scrollbar { width: 3px; }
  .trade-list::-webkit-scrollbar-thumb { background: var(--border-line); border-radius: 2px; }
  
  /* 개별 거래 아이템 높이를 컴팩트하게 압축 */
  .trade-item { 
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-line);
    border-radius: 6px;
    font-size: 11px; 
  }
  .trade-item:hover { background: rgba(52,211,153,0.03); }
  .trade-item.selected { background: rgba(52,211,153,0.06); border-left: 2px solid var(--emerald-neon); padding-left: 14px; box-shadow: inset 2px 0 8px rgba(52,211,153,0.1); }
  .ti-top { display: flex; justify-content: space-between; align-items: center; }
  .ti-dir { font-family: 'Space Mono', monospace; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 4px; letter-spacing: 1px; }
  .ti-dir.buy  { background: rgba(16,185,129,.15); color: var(--up); }
  .ti-dir.sell { background: rgba(244,63,94,.12);  color: var(--down); }
  .ti-pnl { font-family: 'Space Mono', monospace; font-size: 13px; font-weight: 700; }
  .ti-pnl.pos { color: var(--up); }
  .ti-pnl.neg { color: var(--down); }
  .ti-mid { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-mint-gray); }
  .ti-bot { font-size: 10px; color: var(--text-mint-gray); display: flex; justify-content: space-between; }
  
  

  .spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(52,211,153,0.2);
    border-top-color: var(--emerald-neon);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

  /* Stats panel */
  .stats-panel {
    padding: 12px 8px; 
    /* border-top: 1px solid var(--border-line); */
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; flex-shrink: 0;
    background: var(--bg-color);
  }
  .sp-item { width:85px; background: var(--bg-input); border: 1px solid var(--border-line); border-radius: 8px; padding: 8px 8px; }
  .sp-label { font-size: 9px; color: var(--text-mint-gray); text-transform: uppercase; letter-spacing: 1px; }
  .sp-val   { font-family: 'Space Mono', monospace; font-size: 14px; font-weight: 700; margin-top: 3px; }
  
  /* Crosshair tooltip */
  #crosshair-info {
    position: absolute; top: 30px; left: 12px;
    background: rgba(30,41,59,0.92);
    border: 1px solid var(--border-line);
    border-radius: 8px; padding: 8px 12px;
    font-family: 'Space Mono', monospace; font-size: 11px;
    pointer-events: none; 
    z-index: 5; 
    display: none;
    gap: 12px;
    backdrop-filter: blur(8px);
  }

  #crosshair-info.visible { display: flex; }
  .ci-item { display: flex; flex-direction: column; gap: 2px; }
  .ci-label { font-size: 9px; color: var(--text-mint-gray); }
  .ci-val   { font-size: 12px; font-weight: 700; }
  
  /* ── PC NAV MENU ── */
  .pc-nav-menu { display: block; }
  .pc-nav-item {
    display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px;
    cursor: pointer; transition: all .18s; color: var(--text-mint-gray); font-size: 13px;
    border: none; background: none; width: 100%; text-align: left; margin-bottom: 2px;
  }
  .pc-nav-item:hover { background: rgba(52,211,153,0.06); color: var(--text-primary); }
  .pc-nav-item.active { background: rgba(52,211,153,0.1); color: var(--emerald-neon); box-shadow: inset 0 0 8px rgba(52,211,153,0.1); }
  .pc-nav-item i { font-size: 17px; color: var(--emerald-neon); flex-shrink: 0; }
  .pc-nav-item.danger { color: var(--down); }
  .pc-nav-item.danger i { color: var(--down); }
  .pc-nav-item.danger:hover { background: rgba(239,83,80,.08); }
  .pc-nav-sep { height: 1px; background: var(--border-line); margin: 8px 0; }
  
  /* ══ TABLET (769px ~ 1024px) ══ */
  @media (min-width: 769px) and (max-width: 1024px) {
    :root { --sidebar-l-w: 180px; }
    #app { grid-template-columns: var(--sidebar-l-w) 1fr }
    .ts-val { font-size: 12px; }    
    .pair-price { font-size: 14px; }
    .pair-change { font-size: 11px; padding: 2px 6px; }
    #topbar { gap: 12px; padding: 0 14px; }
    .ws-badge { display: none; }
    .tf-btn { padding: 4px 7px; font-size: 10px; }
    .chart-sep { display: none; }
    .sidebar-section { padding: 12px 12px 0; }
    .sp-val { font-size: 12px; }
    .stats-panel { gap: 6px; padding: 10px 12px; }
  }
  
    
  @media (max-width: 360px) {
    .pair-label { font-size: 12px; }
    .pair-price { font-size: 13px; }
    .mob-tab { font-size: 8px; }
    .mob-tab i { font-size: 18px; }
  }
  
  @media (min-width: 769px) {
    #mob-tabbar { display: none !important; }
  }
  
  /* ── HAMBURGER ── */
  .ham-btn {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    background: none; border: none; color: var(--text-mint-gray); cursor: pointer; transition: color .2s; padding: 6px 4px;
  }
  .ham-btn.open { color: var(--emerald-neon); text-shadow: 0 0 6px rgba(52,211,153,0.4); }
  .ham-icon { display: flex; flex-direction: column; gap: 3.5px; width: 18px; }
  .ham-line { height: 1.8px; border-radius: 1px; background: currentColor; transition: all .28s ease; transform-origin: center; }
  .ham-line.l1 { width: 18px; }
  .ham-line.l2 { width: 13px; }
  .ham-line.l3 { width: 16px; }
  .ham-btn.open .ham-line.l1 { transform: translateY(5.3px) rotate(45deg); width: 18px; }
  .ham-btn.open .ham-line.l2 { opacity: 0; transform: scaleX(0); }
  .ham-btn.open .ham-line.l3 { transform: translateY(-5.3px) rotate(-45deg); width: 18px; }
  .ham-label { font-size: 9px; letter-spacing: .5px; text-transform: uppercase; }
  
  /* ── DRAWER OVERLAY ── */
  .drawer-overlay {
    display: none;
    position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 290;
    opacity: 0; pointer-events: none; transition: opacity .28s;
    backdrop-filter: blur(4px);
  }
  .drawer-overlay.open { display: block; opacity: 1; pointer-events: all; }
  
  /* ── DRAWER PANEL (style.css 글래스모피즘) ── */
  .drawer {
    display: none;
    position: fixed;
    bottom: calc(var(--tabbar-h) + var(--safe-bottom));
    left: 0; right: 0; z-index: 295;
    padding: 12px 18px 16px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top-left-radius: 20px; border-top-right-radius: 20px;
    border-top: 1px solid rgba(52,211,153,0.25);
    padding: 14px 18px 20px;
    transform: translateY(100%);
    transition: transform .32s cubic-bezier(.32,.72,0,1);
  }

  .drawer.open { transform: translateY(0); }
  .drawer-pill { width: 36px; height: 4px; border-radius: 2px; background: var(--border-line); margin: 0 auto 18px; }
  .drawer-title {
    font-family: 'Space Mono', monospace; font-size: 9px; letter-spacing: 2px;
    text-transform: uppercase; color: var(--emerald-neon);
    text-shadow: 0 0 6px rgba(52,211,153,0.3); 
    margin-top: 8px;   /* 위쪽 간격 축소 */
    margin-bottom: 8px;  /* 아래쪽 간격 축소 */
  }

  .drawer > .drawer-title:first-of-type {
      margin-top: 0;
  }

  .drawer-item {
    display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 14px 6px;
    border-radius: 12px; background: var(--bg-input); border: 1px solid var(--border-line);
    cursor: pointer; transition: all .2s;
  }
  .drawer-item:hover { border-color: var(--emerald-neon); background: rgba(52,211,153,0.06); box-shadow: 0 0 12px rgba(52,211,153,0.1); }
  .drawer-item i { font-size: 22px; color: var(--emerald-neon); }
  .drawer-item span { font-size: 10px; color: var(--text-mint-gray); text-align: center; line-height: 1.3; }

  .drawer .stats-panel {
    margin-bottom: 12px; /* 인디케이터 세팅과의 간격 조절 */
}

.history-sheet-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  max-height: 75vh;
  background: var(--bg-color);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-top: 1px solid var(--border-line);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  display: flex;
  flex-direction: column;
  z-index: 999;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
  animation: sheetSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  overflow: hidden;
}

@keyframes sheetSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* 상단 드래그 핸들 바 */
.history-handle {
  width: 40px;
  height: 4px;
  background: var(--border-line);
  border-radius: 2px;
  margin: 10px auto 4px auto;
}

/* 헤더 영역 */
.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-line);
}

.history-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: #f8fafc;
  margin: 0;
  letter-spacing: 0.3px;
}

/* 닫기 버튼 */
.history-btn-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.history-btn-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.history-btn-close:active {
  transform: scale(0.95);
}

/* 본체 내용 영역 (스크롤 가능) */
.history-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
  max-height: calc(75vh - 60px);
}
  