/* === Container ===================================================== */
.dex-coinlist { 
  background:#fff; border:1px solid #eee; border-radius:12px; padding:14px;
}

/* === Toolbar: 검색 + 설정(같은 행) ================================= */
.dex-coinlist .toolbar{
  display:flex; align-items:center; gap:8px; margin-bottom:8px;
}
#coin-search{
  flex:1 1 auto; height:36px; border:1px solid #e6e6e6; border-radius:8px;
  padding:0 12px; font-size:14px; outline:none;
}
#coin-search:focus{ border-color:#0ea5e9; box-shadow:0 0 0 3px rgba(14,165,233,.12); }
.gear-btn{
  width:36px; height:36px; border:1px solid #e6e6e6; border-radius:8px; background:#fff; cursor:pointer;
  position:relative;
}
.gear-btn::before{ content:"\2699"; font-size:18px; line-height:36px; display:block; text-align:center; color:#666; }
.gear-btn:hover{ border-color:#d0d0d0; }

/* === Tabs(가로) + 언더라인 ======================================== */
.navtabs{
  display:flex; align-items:center; gap:18px; list-style:none; margin:0; padding:8px 2px 2px; 
  border-bottom:1px solid #f0f0f0; 
}
.navtabs li{
  font-size:14px; color:#696969; padding:8px 2px; cursor:pointer; position:relative;
}
.navtabs li.on{ color:#0ea5e9; font-weight:700; }
.navtabs li.on::after{
  content:""; position:absolute; left:0; right:0; bottom:-3px; height:2px; background:#0ea5e9; border-radius:2px;
}

/* === Header(정렬) ================================================== */
.coinlist-head{
  display:grid; grid-template-columns: 1.5fr 0.9fr 0.9fr 1.1fr; column-gap:16px;
  padding:10px 2px 6px; color:#999; font-size:12px; font-weight:600;
}
.coinlist-head .h{ cursor:pointer; user-select:none; }
.coinlist-head .h.name .sort{ margin-left:6px; font-size:11px; font-weight:700; color:#0ea5e9; } /* KO/EN 표시 */
.coinlist-head .sort{ margin-left:6px; font-size:11px; color:#bbb; }

/* === Rows ========================================================== */
.coinlist-body{ max-height:540px; overflow:auto; padding:2px 0; }
.coinlist-body .row{
  display:grid; grid-template-columns: 1.5fr 0.9fr 0.9fr 1.1fr; column-gap:16px;
  align-items:center; padding:12px 2px; border-bottom:1px dashed #f3f3f3;
}

/* 이름 셀: ★ + 로고 + 텍스트 */
.coinlist-body .col.name{ display:flex; align-items:center; gap:8px; min-width:0; }
#coinlist .fav { color:#ffbf00; cursor:pointer; margin-right:2px; }
#coinlist .fav.off { color:#ddd; }

#coinlist .logo-wrap{ width:24px; height:24px; min-width:24px; border-radius:50%;
  background:#f5f7f9; display:flex; align-items:center; justify-content:center; overflow:hidden; }
#coinlist img.logo{ width:24px; height:24px; display:block; }
#coinlist .logo-fallback{ width:24px; height:24px; display:none; align-items:center; justify-content:center;
  font-weight:700; font-size:12px; color:#333; }

#coinlist .names{ display:block; min-width:0; }
#coinlist .names .nm{ font-weight:700; font-size:14px; color:#222; }
#coinlist .names .pair{ color:#8f8f8f; font-size:12px; }

/* 숫자 정렬/색 */
#coinlist .col.price,
#coinlist .col.chg,
#coinlist .col.vol{ text-align:right; white-space:nowrap; }
#coinlist .col.chg.up{ color:#2ecc71; }
#coinlist .col.chg.down{ color:#e74c3c; }

/* === Settings panel =============================================== */
#coin-settings{
  position:absolute; z-index:20; margin-top:6px; padding:12px; width:260px;
  background:#fff; border:1px solid #eee; border-radius:10px; box-shadow:0 10px 30px rgba(0,0,0,.06);
}
#coin-settings.hidden{ display:none; }
#coin-settings label{ display:flex; align-items:center; gap:8px; font-size:13px; color:#444; margin:6px 0; }

/* === Mobile ======================================================== */
@media (max-width: 991px){
  .navtabs{ gap:14px; }
  .coinlist-head, .coinlist-body .row{ grid-template-columns: 1.6fr 0.8fr 0.8fr 1fr; column-gap:12px; }
}


/* === 가로 스크롤 완전 제거 ============== */
.dex-coinlist { position: relative; }
.coinlist-body{
  max-height:540px;
  overflow-y:auto;
  overflow-x:hidden;   /* ← 추가 */
  padding:2px 0;
}