/* 국내장 탭 — 김프 비교 사이트형 2행 페어 표 */
#tab-domestic{padding-top:14px;font-size:15px;line-height:1.5}
#tab-domestic .dm-top{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin-bottom:16px}
#tab-domestic h1{font-size:24px;color:var(--gold);font-weight:600}
#tab-domestic h2{font-size:17px;margin-bottom:8px}
#tab-domestic a{color:var(--gold)}
#tab-domestic p{margin:6px 0}
#tab-domestic input,#tab-domestic select,#tab-domestic button{background:var(--panel);color:var(--tx);border:1px solid var(--line);border-radius:10px;padding:10px 12px;font:inherit;font-size:14px;min-height:44px}
#tab-domestic button{cursor:pointer}
#tab-domestic :focus-visible{outline:2px solid var(--gold);outline-offset:3px}
#tab-domestic button[aria-pressed=true]{color:var(--gold);border-color:var(--gold-dim)}

/* 기준 거래소 ⇄ 비교 기준 */
#tab-domestic .dm-pair{display:grid;grid-template-columns:1fr auto 1fr;align-items:end;gap:10px}
#tab-domestic .dm-card{display:flex;flex-direction:column;gap:6px;min-width:0;font-size:12px;color:#8d95a6}
#tab-domestic .dm-card select{width:100%;min-width:0;text-overflow:ellipsis}
#tab-domestic .dm-swap{padding-bottom:13px;color:#6f7686}

/* 검색 줄 */
#tab-domestic .dm-find{display:flex;align-items:center;gap:8px;margin:12px 0 14px}
#tab-domestic .dm-find input{flex:1;min-width:0}
#tab-domestic .dm-find button{flex:none;padding:10px 12px}
#tab-domestic #dm-count{flex:none;font-size:12px;color:#8d95a6;white-space:nowrap}

/* 표 */
#tab-domestic .dm-scroll{border-top:1px solid var(--line)}
#tab-domestic table{width:100%;table-layout:auto;border-collapse:collapse;white-space:nowrap;background:var(--panel)}
/* 이름 칸이 남는 폭을 모두 흡수하고 모자라면 말줄임 — 숫자 칸은 항상 온전히 보인다 */
#tab-domestic th:first-child,#tab-domestic td.dm-name{width:100%;max-width:0;overflow:hidden}
#tab-domestic td.dm-name button[data-select]{display:block;width:100%;overflow:hidden;text-overflow:ellipsis}
#tab-domestic thead{position:sticky;top:0;z-index:2}
#tab-domestic th{background:var(--panel2);border-bottom:1px solid var(--line);padding:0}
#tab-domestic th button{width:100%;min-height:0;padding:9px 10px;border:0;border-radius:0;background:transparent;color:#8d95a6;font-size:12px;font-weight:500;display:flex;align-items:center;justify-content:flex-end;gap:5px}
#tab-domestic th:first-child button{justify-content:flex-start}
#tab-domestic th button span{font-size:10px;color:#5f6675}
#tab-domestic th[aria-sort] button,#tab-domestic th[aria-sort] button span{color:var(--gold)}
#tab-domestic td{text-align:right;padding:9px 10px;border-bottom:1px solid rgba(255,255,255,.05);vertical-align:middle;font-variant-numeric:tabular-nums}
#tab-domestic tbody tr:hover td{background:rgba(255,255,255,.03)}
#tab-domestic td b{display:block;font-size:14px;font-weight:600;color:var(--tx)}
#tab-domestic td small{display:block;margin-top:2px;font-size:12px;font-weight:400;color:#6f7686}

/* 이름 칸 */
#tab-domestic td.dm-name{text-align:left}
#tab-domestic td.dm-name button[data-select]{min-height:0;padding:0;border:0;border-radius:0;background:transparent;color:var(--tx);font-size:14px;font-weight:600}
#tab-domestic td.dm-name small{display:flex;align-items:center;gap:5px;min-width:0;color:#8d95a6}
#tab-domestic td.dm-name .dm-sym{flex:none}
#tab-domestic td.dm-name button[data-star]{min-height:0;padding:0;border:0;border-radius:0;background:transparent;color:#5f6675;font-size:14px;line-height:1}
#tab-domestic td.dm-name button[data-star][aria-pressed=true]{color:var(--gold)}
#tab-domestic .dm-badge{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;color:var(--gold);font-size:11px;border:1px solid var(--gold-dim);border-radius:999px;padding:0 6px}

#tab-domestic .dm-up{color:var(--grn)}
#tab-domestic .dm-down{color:var(--red)}
#tab-domestic .dm-muted{color:#6f7686}
#tab-domestic .dm-warn{color:#e5bb66}

/* 상세와 각주 */
/* 선택한 코인 바로 아래에서 펼쳐진다 — 화면이 위로 튀지 않게 */
#tab-domestic tr.dm-sel td{background:var(--panel2)}
#tab-domestic tr.dm-sel td.dm-name button[data-select]{color:var(--gold)}
#tab-domestic tr.dm-open-chart td{border-bottom:0;padding-bottom:0}
#tab-domestic tr.dm-open-chart section{margin-top:10px}
#tab-domestic tr.dm-open td{text-align:left;white-space:normal;background:var(--panel2);border-bottom:2px solid var(--gold-dim);padding:10px 10px 16px;font-size:13px;line-height:1.55;color:#a5adbd}
#tab-domestic tr.dm-open section{margin-top:14px}
#tab-domestic tr.dm-open h3{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:12px;font-weight:500;color:#8d95a6;letter-spacing:.03em;margin-bottom:8px;padding-bottom:6px;border-bottom:1px solid var(--line)}
#tab-domestic tr.dm-open h3 small{font-size:11px;color:#6f7686;font-weight:400}
#tab-domestic .dm-periods{margin-left:auto;display:flex;gap:4px}
#tab-domestic .dm-periods button{min-height:24px;padding:1px 8px;font-size:11px;border-radius:999px;color:#8d95a6}
#tab-domestic .dm-openhead{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
#tab-domestic .dm-openhead b{font-size:16px;color:var(--tx)}
#tab-domestic .dm-openhead b span{font-size:12px;color:#8d95a6;font-weight:500;margin-left:6px}
#tab-domestic .dm-openhead button{min-height:28px;padding:2px 10px;font-size:12px;color:#8d95a6}
/* 값 묶음 — 이름 위, 값 아래 */
#tab-domestic .dm-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(146px,1fr));gap:10px 14px}
#tab-domestic .dm-facts>div{min-width:0}
#tab-domestic .dm-facts span{display:block;font-size:11px;color:#6f7686}
#tab-domestic .dm-facts b{display:block;font-size:14px;font-weight:600;color:var(--tx);font-variant-numeric:tabular-nums;overflow:hidden;text-overflow:ellipsis}
#tab-domestic .dm-facts em{font-style:normal;font-size:12px;font-weight:400;color:#8d95a6}
#tab-domestic .dm-chart{display:block;width:100%;height:340px;border:1px solid var(--line);border-radius:8px;background:#0c0e13;margin:2px 0 6px}
#tab-domestic .dm-note{margin:6px 0;color:#8d95a6}
#tab-domestic tr.dm-open p{margin:5px 0}
#tab-domestic .dm-foot{margin-top:14px;font-size:12px;color:#8d95a6}
#tab-domestic .dm-foot p{margin:4px 0}
#tab-domestic .dm-strip b{color:#b4bbc8;font-weight:500}
#tab-domestic details{margin-top:14px;color:#8d95a6;font-size:13px}
#tab-domestic summary{cursor:pointer;color:#b4bbc8}
#tab-domestic details p{margin:8px 0;line-height:1.6}

@media(max-width:640px){
 #tab-domestic{font-size:14px}
 #tab-domestic .dm-pair{grid-template-columns:1fr auto 1fr;gap:6px}
 #tab-domestic .dm-card select{padding:10px 8px;font-size:13px}
 #tab-domestic td,#tab-domestic th button{padding-left:5px;padding-right:5px}
 #tab-domestic td b{font-size:12px}
 #tab-domestic td small{font-size:10.5px}
 #tab-domestic td.dm-name button[data-select]{font-size:13px}
 #tab-domestic #dm-count{display:none}
}
