/* ===========================================================
   BanG Dream! Song Sorter — desktop.css (PC 레이아웃)
   App 그리드 · 밴드셀렉터 · 곡리스트 · 유튜브/음원맵 · 우패널 · 하단바. 기본(넓은 화면) 레이아웃.
   ⚠ 로드 순서 고정: common.css → desktop.css → mobile.css
   (원본 style.css를 섹션 경계로 3분할 · 캐스케이드 순서 보존)
=========================================================== */

/* ===========================
   3. App Layout
=========================== */
.app {
  display: grid;
  grid-template-columns: 56px 1fr 280px;
  grid-template-rows: 1fr auto;
  flex: 1 1 auto;
  height: calc(100vh - var(--header-h));
  overflow: hidden;
}
.band-selector { grid-column: 1; grid-row: 1; }
.center        { grid-column: 2; grid-row: 1; }
.right-panel   { grid-column: 3; grid-row: 1; }
.bottom-bar    { grid-column: 1 / 4; grid-row: 2; }

/* ===========================
   4. A. Band Selector
=========================== */
.band-selector {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
  gap: 6px;
  overflow-y: auto;
}
.band-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: var(--surface2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--text-sub);
  transition: all 0.15s;
  flex-shrink: 0;
  overflow: hidden;
  font-family: 'M PLUS Rounded 1c', sans-serif;
}
.band-btn:hover { border-color: var(--accent); color: var(--text); }
.band-btn.active { border-color: var(--tier-1); background: rgba(255,107,157,0.14); }
.band-btn.all { font-size: 0.6rem; }
.band-btn.all.active { border-color: var(--accent); color: var(--accent); background: rgba(192,132,252,0.14); }
.band-btn-icon, .band-btn-fallback {
  position: relative;
  z-index: 1;
}
.band-btn-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}

/* 진행률 링 — 아이콘 둘레를 평가율(밴드 평가곡/전체곡)로 채움.
   0~30% Red / 31~69% Yellow / 70%~ Green. SVG stroke 링 → 벡터 AA(계단현상 없음). */
.band-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.band-ring circle {
  fill: none;
  stroke-width: 3;
}
.ring-track { stroke: rgba(255,255,255,0.08); }
.ring-fill {
  stroke: var(--ring-color, transparent);
  stroke-linecap: butt;
  stroke-dasharray: 100;                              /* pathLength=100 정규화 → pct가 곧 길이 */
  stroke-dashoffset: calc(100 - var(--ring-pct, 0)); /* pct만큼만 채움 */
  transform: rotate(-90deg);                          /* 12시 시작·시계방향 */
  transform-box: fill-box;
  transform-origin: center;
  transition: stroke-dashoffset 0.4s ease;            /* 길이 속성이라 @property 없이 네이티브 보간 */
}
.band-ring.low  .ring-fill { --ring-color: #ff5a6a; }
.band-ring.mid  .ring-fill { --ring-color: #ffcf5c; }
.band-ring.high .ring-fill { --ring-color: #46d39a; }

.band-divider { width: 26px; height: 1px; background: var(--border); flex-shrink: 0; }

/* ===========================
   5. B. Song List
=========================== */
.center {
  display: grid;
  grid-template-columns: 0.7fr 1.8fr;   /* 곡리스트 30%↓(1fr→0.7fr) → 유튜브+음원맵/워드클라우드로 이전(1.5fr→1.8fr) */
  overflow: hidden;
}
.song-list-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.song-list-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.band-label {
  font-family: 'M PLUS Rounded 1c', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--tier-1);
}
.filter-pills {
  display: flex;
  gap: 4px;
  margin-left: auto;
  flex-wrap: wrap;
}
.pill {
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.12s;
}
.pill:hover { color: var(--text); }
.pill.active { font-weight: 700; }
.copy-btn {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-sub);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: all 0.12s;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }

.song-type-tabs {
  display: flex;
  gap: 6px;
  padding: 6px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.type-tab {
  padding: 3px 16px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.12s;
}
.type-tab:hover { color: var(--text); }
.type-tab.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--surface2);
}

.song-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
  -webkit-touch-callout: none;
  user-select: none;
}
.song-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-sub);
  font-size: 0.8rem;
}
.song-item {
  position: relative;
  display: flex;
  align-items: center;
  padding: 8px 14px;
  gap: 10px;
  cursor: pointer;
  border-bottom: 1px solid rgba(42,42,58,0.5);
  border-left: 3px solid transparent;
  transition: background 0.1s;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}
.song-item:hover { background: var(--surface2); }
.song-item.ranked { border-left-color: var(--row-tier, transparent); }

/* 현재 재생 중인 곡 — 배경 강조 + 은은한 박스(accent 보라, 티어색과 구분) */
.song-item.playing,
.song-item.playing:hover {
  background: rgba(192, 132, 252, 0.14);
  box-shadow: inset 0 0 0 1px rgba(192, 132, 252, 0.45);
}
.song-item.playing .song-title { color: var(--text); font-weight: 600; }

/* 롱프레스 진행 피드백 (좌→우 채움, CSS transition) */
.song-item::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  right: 100%;
  background: rgba(192,132,252,0.16);
  pointer-events: none;
  transition: right 0s;
}
.song-item.pressing::after {
  right: 0;
  transition: right 350ms linear;
}
.song-num {
  font-size: 0.65rem;
  color: var(--text-sub);
  width: 24px;
  text-align: right;
  flex-shrink: 0;
}
.song-title {
  font-size: 0.8rem;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
/* 곡 이름 텍스트: 평상 시 말줄임(...), 넘칠 때만 .is-overflow 부여(JS 측정) */
.song-title .st-text {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}
/* 호버 또는 재생/선택 중 + 실제로 넘칠 때만 마퀴로 전체 이름 표시 */
.song-item:hover .song-title.is-overflow .st-text,
.song-item.playing .song-title.is-overflow .st-text {
  max-width: none;
  text-overflow: clip;
  animation: st-marquee var(--st-dur, 6s) ease-in-out infinite alternate;
}
@keyframes st-marquee {
  0%, 12%   { transform: translateX(0); }
  88%, 100% { transform: translateX(var(--st-shift, 0)); }
}
@media (prefers-reduced-motion: reduce) {
  .song-item:hover .song-title.is-overflow .st-text,
  .song-item.playing .song-title.is-overflow .st-text { animation: none; }
}
.song-item.ranked .song-title { color: var(--text); }
.song-item:not(.ranked) .song-title { color: var(--text-sub); }
.song-band-tag {
  font-size: 0.6rem;
  color: var(--text-sub);
  background: var(--surface2);
  padding: 1px 7px;
  border-radius: 10px;
  flex-shrink: 0;
  max-width: 90px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.song-noyt { font-size: 0.7rem; color: var(--border); flex-shrink: 0; }
.rank-badge {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}
.rb-1 { background: rgba(255,107,157,0.2); border: 1px solid var(--tier-1); }
.rb-2 { background: rgba(255,159,107,0.2); border: 1px solid var(--tier-2); }
.rb-3 { background: rgba(255,208,107,0.2); border: 1px solid var(--tier-3); }
.rb-4 { background: rgba(107,207,255,0.2); border: 1px solid var(--tier-4); }
.rb-5 { background: rgba(157,157,189,0.2); border: 1px solid var(--tier-5); }
.rb-empty { background: var(--surface2); border: 1px dashed var(--border); }

/* 코멘트 말풍선 — 티어뱃지 옆. 탭/클릭으로 메모 표시(호버는 행 전체에서도 동작) */
.comment-badge {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.66rem;
  cursor: pointer;
  background: rgba(192,132,252,0.14);
  border: 1px solid rgba(192,132,252,0.4);
  transition: transform 0.12s, background 0.12s;
}
.comment-badge:hover { transform: scale(1.12); background: rgba(192,132,252,0.24); }

/* ===========================
   6. C. YouTube
=========================== */
.youtube-panel {
  display: flex;
  flex-direction: column;
  background: #000;
  overflow: hidden;
}
/* 유튜브 컬럼 세로 2분할: 위=유튜브(yt-top) / 아래=음원맵(audiomap-area), 각 ~50% */
.yt-top {
  position: relative;
  flex: none;              /* 유튜브 영역은 16:9 스테이지 높이에 맞춤(남는 높이는 음원맵/워드클라우드) */
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.yt-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;    /* 유튜브 표준 비율 — 넓은 슬롯을 꽉 채우고 좌우 검은 여백 제거 */
  max-height: 52vh;        /* 초대형/저높이 화면에서 하단(음원맵·워드클라우드) 공간 보호 */
  background: #000;
}
.audiomap-area {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 8px 10px 10px;
  overflow: hidden;
}
/* ===== YT 하단 슬롯 좌우 분할: 음원맵 | 워드클라우드 (대안 B) ===== */
.yt-bottom-split {
  display: flex; flex: 1 1 0; min-height: 0; overflow: hidden;
  background: var(--surface); border-top: 1px solid var(--border);
}
.yt-bottom-split .audiomap-area { flex: 1.2 1 0; min-width: 0; border-top: none; }
.yt-bottom-split .bandinfo-panel.dock-wc {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column;
  padding: 8px 10px 10px; border-left: 1px solid var(--border); overflow: hidden;
}
.am-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; flex-shrink: 0; }
.am-title { font-size: 0.78rem; font-weight: 700; color: var(--text); }
.am-sub { font-size: 0.6rem; color: var(--text-sub); }
/* 범례 칩: ★ 밝기·크기 = 곡 에너지 (헤더 우측 정렬, _clBuildEnergyLegend 가 주입) */
.am-legend { margin-left: auto; font-size: 0.56rem; color: var(--text-sub);
  white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; }
.am-legend-star { color: #ffe14d; text-shadow: 0 0 5px rgba(255,225,77,0.6); }
.audiomap-area .cluster-wrap { min-height: 0; }
.audiomap-area #cluster-chart { min-height: 0; }
/* 음원맵 축 +/- 방향 의미 라벨(4모서리, 화면 고정) */
.am-axis {
  position: absolute; z-index: 12; pointer-events: none; white-space: nowrap;
  font-family: 'Consolas','SF Mono',ui-monospace,monospace;
  font-size: 0.68rem; color: var(--hud, #66e0e6); opacity: 0.85; letter-spacing: 0.5px;
  text-shadow: 0 0 4px #000, 0 0 6px rgba(102,224,230,0.4);
}
.am-axis-top { top: 4px; left: 50%; transform: translateX(-50%); }
.am-axis-bottom { bottom: 4px; left: 50%; transform: translateX(-50%); }
.am-axis-left { left: 6px; top: 50%; transform: translateY(-50%); }
.am-axis-right { right: 6px; top: 50%; transform: translateY(-50%); }

/* ── 음원맵 HUD (우주선/비행기 스타일 오버레이) — JS _clUpdateHud 가 채움 ── */
:root { --hud: #66e0e6; --hud-dim: rgba(102,224,230,0.55); --hud-glow: rgba(102,224,230,0.5); --hud-warn: #ffe14d; }
.cluster-wrap .hud {
  position: absolute; z-index: 14; pointer-events: none; max-width: 46%;
  font-family: 'Consolas','SF Mono',ui-monospace,monospace;
  color: var(--hud); text-shadow: 0 0 6px var(--hud-glow); letter-spacing: 0.3px;
}
.hud[hidden] { display: none; }
.hud-corner { padding: 7px 10px; }
.hud-corner::before, .hud-corner::after {           /* 코너 브래킷(⌐ ¬) */
  content: ''; position: absolute; width: 11px; height: 11px; border: 1.5px solid var(--hud-dim);
}
.hud-band { top: 6px; left: 8px; }
.hud-band::before { top: 0; left: 0; border-right: none; border-bottom: none; }
.hud-band::after  { bottom: 0; right: 0; border-left: none; border-top: none; }
.hud-band .hud-name { font-size: 1.55rem; font-weight: 800; line-height: 1.05; color: #fff; text-shadow: 0 0 10px var(--hud-glow); }
.hud-readout { top: 6px; right: 8px; text-align: right; font-size: 0.66rem; line-height: 1.6; }
.hud-readout::before { top: 0; right: 0; border-left: none; border-bottom: none; }
.hud-readout::after  { bottom: 0; left: 0; border-right: none; border-top: none; }
.hud-readout .hud-val { color: #fff; }
.hud-track { bottom: 6px; left: 8px; font-size: 0.6rem; line-height: 1.5; display: flex; align-items: flex-end; gap: 7px; }
.hud-track::before { bottom: 0; left: 0; border-right: none; border-top: none; }
.hud-track::after  { top: 0; right: 0; border-left: none; border-bottom: none; }
.hud-track .hud-hd { color: #fff; font-weight: 700; margin-bottom: 2px; }
.hud-track .hud-track-txt { white-space: nowrap; }
.hud-arrow { width: 38px; height: 38px; flex: 0 0 auto; fill: var(--hud-warn);
  filter: drop-shadow(0 0 4px rgba(255,225,77,0.6)); transition: transform 0.45s ease; }
.hud-meta { bottom: 6px; right: 8px; text-align: right; font-size: 0.62rem; line-height: 1.55; }
.hud-meta::before { top: 0; left: 0; border-right: none; border-bottom: none; }
.hud-meta::after  { bottom: 0; right: 0; border-left: none; border-top: none; }
.hud-meta .hud-song { color: #fff; font-weight: 700; }
#youtube-player, #youtube-player iframe {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
}
.yt-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-sub);
  background: #000;
  z-index: 2;
}
.yt-placeholder[hidden] { display: none; }
.yt-icon {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
.yt-label { font-size: 0.75rem; }
.yt-hint { font-size: 0.65rem; color: var(--border); }
.yt-now-playing {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.85);
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.yt-now-playing[hidden] { display: none; }
.yt-now-playing.muted { color: var(--text-sub); }
.yt-now-playing #yt-song-name { overflow: hidden; text-overflow: ellipsis; }
.yt-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--tier-1); animation: pulse 1.5s infinite; flex-shrink: 0; }
.yt-now-playing.muted .yt-dot { animation: none; background: var(--text-sub); }
.yt-fallback-link {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--tier-1);
  text-decoration: underline;
  font-size: 0.7rem;
  white-space: nowrap;
}
.yt-fallback-link[hidden] { display: none; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ===========================
   7. D/E. Right Panel
=========================== */
.right-panel {
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.panel-tab {
  display: flex;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.tab-btn {
  flex: 1;
  padding: 9px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-sub);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.12s;
  letter-spacing: 0.03em;
}
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.histogram-panel, .heatmap-panel, .bandinfo-panel, .cluster-panel {
  padding: 14px;
  flex: 1;
  overflow-y: auto;
}
/* 우패널: 탭 제거 → 히스토그램(위, 내용 높이만) · 히트맵(아래, 남는 세로 전부 → 스크롤 최소화) */
.histogram-panel, .heatmap-panel { display: block; min-height: 0; }
.histogram-panel { flex: 0 0 auto; }
.heatmap-panel { flex: 1 1 0; border-top: 1px solid var(--border); }
.bandinfo-panel { display: none; }
.bandinfo-panel.active { display: flex; flex-direction: column; }
.cluster-panel { display: none; }
.cluster-panel.active { display: flex; flex-direction: column; }

.hist-title, .hm-title, .bi-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-sub);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* 밴드 워드클라우드 (F) */
.bi-title { margin-bottom: 4px; }
.bi-sub {
  font-size: 0.62rem;
  color: var(--text-sub);
  margin-bottom: 10px;
}
.wordcloud-wrap, .cluster-wrap {
  position: relative;
  flex: 1;
  min-height: 240px;
  border-radius: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  overflow: hidden;
}
#wordcloud-canvas { display: block; width: 100%; height: 100%; }
#cluster-chart { width: 100%; height: 100%; min-height: 240px; position: relative; z-index: 1; }
/* ── 음원맵 딥스페이스: 곡 점=별 · 뒤 canvas(#cl-starfield)에 별밭·성운(JS 생성) ── */
.cluster-wrap {
  isolation: isolate;   /* 별밭 캔버스(z-index:0) < 차트(z-index:1) 스태킹 컨텍스트 */
  background: radial-gradient(125% 95% at 50% 12%, #10141f 0%, #0a0b13 48%, #05050a 100%);
}
#cl-starfield { position: absolute; inset: 0; z-index: 0; display: block; pointer-events: none; }
/* 음원맵 유사곡 목록(곡 클릭 시 CLAP 유사곡) */
/* 음원맵 하단 유사곡/힌트 목록 — 표시 숨김(요소·JS는 보존, 되돌리려면 이 display만 제거) */
.cl-similar { display: none; margin-top: 6px; font-size: 0.64rem; height: 58px; overflow-y: auto; flex-shrink: 0; }
.cl-similar .cl-hint { color: var(--text-sub); opacity: 0.75; }
.cl-similar .cl-q { color: var(--text); margin-bottom: 4px; }
.cl-similar .cl-q .cl-bd { color: var(--text-sub); }
.cl-similar ul { list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
.cl-similar li { display: flex; align-items: center; gap: 5px;
  color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-similar .cl-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.cl-similar .cl-bd { color: var(--text-sub); font-size: 0.58rem; }
.wc-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 18px;
  font-size: 0.7rem;
  color: var(--text-sub);
}
/* hidden 속성이 author display:flex를 덮도록 — 클라우드 렌더 시 빈 메시지 숨김 */
.wc-empty[hidden] { display: none; }
.hist-row { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.hist-label {
  font-size: 0.65rem;
  font-weight: 700;
  width: 28px;
  text-align: right;
  flex-shrink: 0;
  font-family: 'M PLUS Rounded 1c', sans-serif;
}
.hist-bar-bg {
  flex: 1;
  height: 18px;
  background: var(--surface2);
  border-radius: 4px;
  overflow: hidden;
}
.hist-bar {
  height: 100%;
  border-radius: 4px;
  min-width: 2px;
  transition: width 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.hist-count { font-size: 0.65rem; color: var(--text-sub); width: 18px; text-align: right; flex-shrink: 0; }

.hm-grid { display: grid; grid-template-columns: 36px repeat(5, 1fr); gap: 3px; }
.hm-head {
  font-size: 0.55rem;
  font-weight: 700;
  text-align: center;
  color: var(--text-sub);
  padding: 2px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hm-band {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  color: var(--text-sub);
  overflow: hidden;
}
.hm-band-icon { width: 22px; height: 22px; object-fit: contain; }
.hm-cell {
  height: 22px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 700;
  background: var(--surface2);
  transition: background 0.3s ease;
}

/* ===========================
   8. Bottom Bar
=========================== */
.bottom-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.stat-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.stat-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.68rem;
  color: var(--text);
}
.stat-chip-muted { color: var(--text-sub); }
.stat-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.bottom-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.bp-label {
  font-size: 0.7rem;
  color: var(--text-sub);
  white-space: nowrap;
  flex-shrink: 0;
}
.bp-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  min-width: 60px;
}
.bp-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #c084fc, #ff6b9d);
  border-radius: 3px;
  transition: width 0.4s ease;
}
.bp-pct {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 38px;
  text-align: right;
}
.bottom-actions { margin-left: auto; display: flex; gap: 8px; }
.btn-download, .btn-reset {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
  border: 1px solid var(--border);
}
.btn-download { background: var(--surface2); color: var(--text); }
.btn-download:hover { border-color: var(--accent); color: var(--accent); }
.btn-reset { background: transparent; color: var(--text-sub); }
.btn-reset:hover { border-color: #ff6b6b; color: #ff6b6b; }

