/* /home/hkiugcom/website.airplay/assets/track/track.css */

.ap-bs-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid;
  flex-shrink: 0;
  vertical-align: middle;
}
.ap-bs-pill__star {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1;
  font-family: inherit;
}
.ap-bs-pill--lift  { border-color: rgb(34 197 94); color: rgb(34 197 94); background: rgba(34,197,94,0.10); }
.ap-bs-pill--drop  { border-color: rgb(239 68 68); color: rgb(239 68 68); background: rgba(239,68,68,0.10); }
.ap-bs-pill--neutral { border-color: rgba(148,163,184,0.45); color: rgba(148,163,184,0.80); background: rgba(148,163,184,0.06); }
.delta-wrap { position: relative; width: 100%; }
.delta-bg { position: absolute; inset: 0; background: linear-gradient(180deg, rgb(148 163 184 / 8%), rgb(15 23 42 / 0%)); border-radius: 6px; z-index: 0; }
.delta-svg { position: relative; display: block; width: 100%; height: 28px; z-index: 1; }
.tick-line { stroke: #f97373; stroke-width: 1.1; vector-effect: non-scaling-stroke; }
.tick-top { stroke: #f97373; stroke-width: 1.1; vector-effect: non-scaling-stroke; }

/* Compact meta card */
.meta-card { background:#030712; border:1px solid #1f2937; border-radius:16px; padding:10px 12px; overflow:hidden; }
.meta-inline { display:flex; gap:8px; flex-wrap:wrap; }
.meta-item { flex: 1; min-width: 0; padding: 6px 8px; border-radius: 9999px; background: #111827; border: 1px solid #1f2937; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; text-align: left; }
.meta-item--clickable { cursor: pointer; transition: border-color .15s, background .15s; }
.meta-item--clickable:hover { border-color: #374151; background: #1c2434; }
.meta-item--pop { border-color: rgba(253,224,71,0.35); min-width: 88px; }
.meta-item--rank { border-color: rgba(255,255,255,0.12); min-width: 88px; }
.meta-item--pop.meta-item--clickable:hover { border-color: rgba(253,224,71,0.6); background: rgba(253,224,71,0.04); }
.meta-est { font-size: 10px; color: #9ca3af; font-weight: 400; }
.meta-na { color: #4b5563; }
.meta-k { font-size: 9px; color:#9ca3af; letter-spacing:.06em; text-transform:uppercase; line-height: 1; white-space: nowrap; }
.meta-v { font-size: 12px; color:#e5e7eb; font-weight: 500; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.meta-unit { font-weight: 400; font-size: 10px; color:#9ca3af; margin-left: 4px; }
.meta-play-btn { flex: 0 0 auto; width: 32px; padding: 0; align-items: center; justify-content: center; cursor: pointer; color: #6b7280; transition: color .15s, border-color .15s; }
.meta-play-btn:hover { color: #e5e7eb; border-color: #374151; }
.meta-play-btn.is-loading { color: #4b5563; pointer-events: none; }
.meta-play-btn.is-playing { color: #f4e900; }
#metaClipLabel {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.10em;
  color: rgba(226,232,240,0.80);
  line-height: 1;
  margin-top: 3px;
  opacity: 0;
  transition: opacity 400ms ease;
}
#metaClipLabel.is-visible { opacity: 1; }

/* Wrap */
.ap-track-chart-wrap{ position:relative; width:100%; height:100%; }

/* Desktop watermark: right-bottom, away from axes */
.ap-track-watermark{
  position:absolute;
  right: 44px;
  left: auto;
  bottom: 64px;
  max-width: min(760px, calc(100% - 88px));
  text-align: right;
  pointer-events:none;
  user-select:none;
  opacity:0;
  transform: translateY(22px);
  filter: blur(2px);
  transition: opacity 520ms cubic-bezier(.2,.9,.2,1), transform 520ms cubic-bezier(.2,.9,.2,1), filter 700ms ease;
  z-index: 5;
}
.ap-track-watermark.is-on{ opacity:1; transform: translateY(0); filter: blur(0); }
.ap-track-watermark__title{
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 900;
  letter-spacing: .10em;
  text-transform: uppercase;
  font-size: 36px;
  line-height: 1.02;
  color: rgba(255,255,255,0.05);
  -webkit-text-stroke: 1px rgba(255,255,255,0.22);
  text-shadow: 0 0 18px rgba(255,255,255,0.06);
}
.ap-track-watermark__sub{ margin-top: 6px; font-size: 13px; line-height: 1.35; color: rgba(255,255,255,0.55); }
.ap-track-watermark__meta{ margin-top: 6px; font-size: 12px; letter-spacing: .02em; color: rgba(255,255,255,0.55); }

@media (max-width: 640px){
  .ap-track-watermark{
    right: 10px;
    bottom: 30%;
    max-width: calc(100% - 20px);
    text-align: right;
  }
  .ap-track-watermark__title{ font-size: 15px; letter-spacing: .07em; color: rgba(255,255,255,0.45); -webkit-text-stroke: 0; text-shadow: none; }
  .ap-track-watermark__sub,
  .ap-track-watermark__meta{ display: none; }
}

/* --- Context modal (v1) --- */
.ap-ctx-overlay{ position: fixed; inset: 0; background: rgba(0,0,0,0.62); z-index: 1000; }
.ap-ctx-modal{ position: fixed; inset: 0; z-index: 1001; display: flex; align-items: center; justify-content: center; padding: 18px; }
.ap-ctx-panel{ width: min(1100px, 100%); background: rgba(3,7,18,0.96); border: 1px solid rgba(31,41,55,0.95); border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,0.55); overflow: hidden; }
.ap-ctx-head{ display:flex; align-items:center; justify-content:space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid rgba(31,41,55,0.8); background: rgba(17,24,39,0.55); }
.ap-ctx-title{ font-weight: 900; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; color: rgba(229,231,235,0.9); }
.ap-ctx-close{ font-size: 12px; padding: 7px 10px; border-radius: 9999px; border: 1px solid rgba(255,255,255,0.16); background: rgba(17,24,39,0.78); color: rgba(255,255,255,0.86); cursor: pointer; }
.ap-ctx-body{ padding: 14px 16px 16px; }
.ap-ctx-grid{ display:grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 900px){
  .ap-ctx-grid{ grid-template-columns: 1fr 1fr 1fr; }
}
.ap-ctx-card{ background: rgba(17,24,39,0.55); border: 1px solid rgba(31,41,55,0.85); border-radius: 16px; padding: 12px; }
.ap-ctx-k{ font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: rgba(156,163,175,0.85); }
.ap-ctx-name{ margin-top: 6px; font-weight: 800; font-size: 13px; color: rgba(243,244,246,0.95); line-height: 1.25; min-height: 34px; }
.ap-ctx-badge{ display:inline-flex; align-items:center; gap: 6px; margin-top: 8px; font-size: 11px; font-weight: 900; letter-spacing: .10em; text-transform: uppercase; padding: 6px 10px; border-radius: 9999px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); color: rgba(229,231,235,0.92); }
.ap-ctx-mini{ margin-top: 10px; height: 120px; position: relative; }
.ap-ctx-meta{ margin-top: 10px; font-size: 11px; color: rgba(156,163,175,0.9); line-height: 1.3; }
.ap-ctx-note{ margin-top: 10px; font-size: 11px; color: rgba(156,163,175,0.9); }

/* Track chart: use the card padding area on mobile (section has px-4 => 16px each side) */
@media (max-width: 640px){
  .ap-track-chart-wrap{
    width: calc(100% + 32px) !important;
    margin-left: -16px !important;
    margin-right: -16px !important;
  }
}

/* -------------------------------------------------------
   Track view UI additions (moved from inline <style>)
------------------------------------------------------- */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}

/* "WHAT'S HERE" pill + popup */
.audit-intro-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:9999px;
  border:1px solid rgba(148,163,184,0.28);
  background: rgba(255,255,255,0.04);
  color: rgba(226,232,240,0.92);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  user-select:none;
  transition:background 140ms ease, border-color 140ms ease, transform 140ms ease;
}
.audit-intro-pill:hover{
  background: rgba(255,255,255,0.06);
  border-color: rgba(148,163,184,0.38);
  transform: translateY(-1px);
}
.audit-intro-pill.is-open{
  background: rgba(0,0,0,0.88);
  border-color: rgba(250,204,21,0.35);
  color: rgba(250,204,21,0.92);
}

@keyframes apTrackPopupIn {
  from { opacity:0; transform:translateX(-50%) translateY(-6px) scale(0.975); }
  to   { opacity:1; transform:translateX(-50%) translateY(0)    scale(1);     }
}
@keyframes apTrackPopupOut {
  0%   { opacity:1; transform:translateX(-50%) translateY(0)     scale(1);     }
  60%  { opacity:0.3; transform:translateX(-50%) translateY(4px) scale(0.97);  }
  100% { opacity:0; transform:translateX(-50%) translateY(8px)   scale(0.96);  }
}

.audit-intro-box{
  position: fixed;
  top: clamp(12px, 10vh, 120px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px) scale(0.975);
  z-index: 1050;
  width: min(640px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.audit-intro-box.is-open{
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
  animation: apTrackPopupIn 200ms ease forwards;
}
.audit-intro-box.is-closing{
  animation: apTrackPopupOut 200ms ease forwards;
  pointer-events: none;
}
.audit-intro-box-inner{
  border:1px solid rgba(148,163,184,0.22);
  background: rgba(3,7,18,0.98);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.55), 0 0 0 1px rgba(250,204,21,0.06);
  color: rgba(226,232,240,0.92);
  font-size: 13px;
  overflow: auto;
  max-height: calc(100vh - 24px);
  overscroll-behavior: contain;
  padding-bottom: 14px;
}
.audit-intro-box-line{ color: rgba(226,232,240,0.92); }
.audit-intro-box-line strong{ color: rgba(250,204,21,0.95); }
.audit-intro-list{ margin: 8px 0 0 18px; padding: 0; color: rgba(148,163,184,0.98); font-size: 12px; }
.audit-intro-list li{ margin: 4px 0; }

/* Pills (ADVANCED/DELETED/FLASH) */
.ap-pill{transform-origin:center left;}
.ap-pill-hidden{display:none !important;}
.ap-pill-dismiss{
  animation: apPillDismiss 420ms ease-in forwards;
  will-change: transform, opacity, max-height, margin, padding;
  overflow: hidden;
}
@keyframes apPillDismiss{
  0%{opacity:1; transform:scaleY(1); max-height:48px; padding-top:0.25rem; padding-bottom:0.25rem; margin-right:0.5rem;}
  70%{opacity:0.35; transform:scaleY(0.18); max-height:8px; padding-top:0; padding-bottom:0; margin-right:0.5rem;}
  100%{opacity:0; transform:scaleY(0.06); max-height:0; padding-top:0; padding-bottom:0; margin-right:0;}
}

/* Track header layout */
.ap-track-head{
  display:block;
}
.ap-track-head-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-width:0;
}
.ap-track-head-bar-left{
  min-width:0;
  flex:1 1 auto;
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.ap-track-head-bar-right{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:nowrap;
}
.ap-track-head-actions-mobile{ display:none; }

/* Track header buttons */
.ap-ui-btn{
  font-size: 11px;
  line-height: 1;
  padding: 7px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(148,163,184,0.28);
  background: rgba(255,255,255,0.04);
  color: rgba(226,232,240,0.92);
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, opacity 120ms ease;
  cursor: pointer;
  opacity: 1 !important;
  filter: none !important;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.ap-ui-btn:hover{
  transform: translateY(-1px);
  border-color: rgba(148,163,184,0.40);
}

/* ON: cyan */
.ap-ui-btn.is-on{
  border-color: rgba(56,189,248,0.45) !important;
  box-shadow: 0 0 0 1px rgba(56,189,248,0.15) inset;
  color: rgba(226,232,240,0.92) !important;
  background: rgba(255,255,255,0.06) !important;
}

/* Drop-off toggle OFF */
.ap-ui-btn--dropoff:not(.is-on){
  border-color: rgba(226,232,240,0.22) !important;
  color: rgba(226,232,240,0.92) !important;
}
.ap-ui-btn--dropoff{
  justify-content: center;
  text-align: center;
}

/* Interest toggle */
.ap-ui-btn--interest{
  justify-content: center;
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* MODE-based colors */
.ap-ui-btn--interest.is-next-popularity{
  border-color: rgba(250,204,21,0.22) !important;
  background: rgba(250,204,21,0.06) !important;
  color: rgba(250,204,21,0.92) !important;
}
.ap-ui-btn--interest.is-next-interest{
  border-color: rgba(148,163,184,0.26) !important;
  background: rgba(96,165,250,0.08) !important;
  color: rgba(191,219,254,0.96) !important;
}
.ap-ui-btn--interest.is-next-off{
  border-color: rgba(148,163,184,0.24) !important;
  background: rgba(255,255,255,0.04) !important;
  color: rgba(203,213,225,0.92) !important;
}

/* Chart time-window buttons */
.ap-window-btns{
  display:flex;
  align-items:center;
  gap:4px;
}

.ap-one-play-marker{
  display:inline-flex;
  align-items:center;
  padding:6px 14px;
  font-size:9px;
  font-weight:400;
  letter-spacing:0.06em;
  text-transform:uppercase;
  color:#9ca3af;
  background:rgba(251,191,36,0.10);
  border:none;
  position:relative;
  white-space:nowrap;
  user-select:none;
  line-height:1;
  opacity:0;
  transition:opacity 0.7s ease;
}
.ap-one-play-marker::before,
.ap-one-play-marker::after{
  content:'';
  position:absolute;
  top:0; bottom:0;
  width:1.5px;
  background:rgba(251,191,36,0.62);
  pointer-events:none;
}
.ap-one-play-marker::before{ left:0; }
.ap-one-play-marker::after { right:0; }

/* Sweep animation */
.ap-one-play-marker.is-sweeping{
  background:transparent;
  color:transparent;
  transition:background 0.45s ease-in, color 0.45s ease-in;
}
.ap-one-play-marker.is-sweeping::before{
  left:var(--ln-left, calc(100% - 1.5px));
  transition:left 0.45s ease-in;
}
.ap-one-play-marker.is-gone::before,
.ap-one-play-marker.is-gone::after{
  opacity:0;
  transition:opacity 0.35s ease;
}
.ap-track-legend-bar{
  display:flex;
  align-items:center;
  padding-top:8px;
}
.ap-track-legend{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  overflow:hidden;
}
.ap-track-legend__item{
  display:inline-flex;
  align-items:center;
  gap:5px;
  font-size:11px;
  font-weight:500;
  letter-spacing:.02em;
  color:rgba(148,163,184,0.50);
  white-space:nowrap;
  transition:opacity 120ms ease;
}
.ap-track-legend__line{
  display:inline-block;
  width:16px;
  height:2px;
  border-radius:1px;
  flex-shrink:0;
}
.ap-track-legend__square{
  display:inline-block;
  width:8px;
  height:8px;
  border-radius:1px;
  flex-shrink:0;
}
.ap-window-btn{
  font-size:11px;
  font-weight:600;
  letter-spacing:.04em;
  line-height:1;
  padding:3px 9px;
  border-radius:9999px;
  border:1px solid rgba(148,163,184,0.20);
  background:transparent;
  color:rgba(148,163,184,0.55);
  cursor:pointer;
  transition:color 120ms ease,border-color 120ms ease,background 120ms ease;
}
.ap-window-btn:hover{
  color:rgba(226,232,240,0.80);
  border-color:rgba(148,163,184,0.38);
}
.ap-window-btn.is-on{
  border-color:rgba(250,204,21,0.45);
  background:rgba(250,204,21,0.08);
  color:rgba(250,204,21,0.90);
}
.ap-window-btn.is-unavail{
  opacity:0.22;
  cursor:default;
  pointer-events:none;
}

/* track curves infobox pulse + close */
@keyframes apPulseOrange {
  0% { color:rgba(255,255,255,0.95); text-shadow:none; }
  35% { color:rgba(255,170,0,0.98); text-shadow:0 0 14px rgba(255,170,0,0.35); }
  70% { color:rgba(255,255,255,0.95); text-shadow:none; }
  100% { color:rgba(255,255,255,0.95); text-shadow:none; }
}
.ap-hint{ display:inline-flex; align-items:center; }
.ap-hint.is-pulsing strong{ animation:apPulseOrange 3s ease-in-out infinite; }
.ap-pulse-orange{ animation:apPulseOrange 3s ease-in-out infinite; }

.track-curves-infobox-actions{
  display:flex;
  justify-content:flex-start;
  margin-top:10px;
  position: sticky;
  bottom: 0;
  padding-top: 10px;
  background: rgba(3,7,18,0.98);
}
.track-curves-infobox-close{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:5px 10px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,0.28);
  background: rgba(0,0,0,0.75);
  color: rgba(226,232,240,0.86);
  font-weight:900;
  font-size:12px;
  letter-spacing:0.04em;
  cursor:pointer;
  user-select:none;
}
.track-curves-infobox-close:hover{
  background: rgba(0,0,0,0.88);
  border-color: rgba(148,163,184,0.34);
  color: rgba(226,232,240,0.95);
  transform: translateY(-1px);
}

.track-infobox-title{ color: rgba(255,255,255,0.96); }

#auditApTop{
  display: inline-flex !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #e5e7eb !important;
  line-height: 1.1 !important;
  min-width: 0 !important;
  max-width: 100% !important;
}
#auditApTop > *{
  flex: 0 0 auto;
}

.ap-curve-info{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  line-height:1;
  padding:2px 6px;
  border-radius:999px;
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.10);
  white-space:nowrap;
  margin-left:6px;
}
.ap-curve-info--neutral{color:rgba(255,255,255,0.86);}
.ap-curve-info--down{color:#ff5a5a;}
.ap-curve-info--danger{background:rgba(255,90,90,0.10);border-color:rgba(255,90,90,0.35);}
.ap-curve-arrow{font-size:12px;line-height:1;transform:translateY(-0.5px);}

@keyframes apCurvePulseRed{
  0%{box-shadow:0 0 0 0 rgba(255,90,90,0.0);border-color:rgba(255,90,90,0.20);}
  35%{box-shadow:0 0 0 6px rgba(255,90,90,0.10);border-color:rgba(255,90,90,0.55);}
  70%{box-shadow:0 0 0 10px rgba(255,90,90,0.0);border-color:rgba(255,90,90,0.20);}
  100%{box-shadow:0 0 0 0 rgba(255,90,90,0.0);border-color:rgba(255,90,90,0.20);}
}
.ap-curve-pulse-red{animation:apCurvePulseRed 1.2s ease-out infinite;}

/* audit-intro-pill mini variant */
.audit-intro-pill.audit-intro-pill--mini{
  width: 18px;
  height: 18px;
  min-width: 18px;
  padding: 0;
  border-radius: 9999px;
  line-height: 18px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: rgba(56,189,248,0.42);
  background: rgba(56,189,248,0.14);
  color: rgba(186,230,253,0.98);
}
.audit-intro-pill.audit-intro-pill--mini:hover{
  border-color: rgba(56,189,248,0.58);
  background: rgba(56,189,248,0.22);
  color: rgba(224,242,254,1);
}

.audit-intro-pill.audit-intro-pill--curve{
  width: auto;
  height: auto;
  min-width: 0;
  padding: 2px 7px;
  border-radius: 9999px;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: rgba(148,163,184,0.72);
  border-color: rgba(148,163,184,0.20);
  background: rgba(255,255,255,0.02);
}
.audit-intro-pill.audit-intro-pill--curve:hover{
  color: rgba(186,230,253,0.90);
  border-color: rgba(148,163,184,0.34);
  background: rgba(255,255,255,0.05);
  transform: translateY(-1px);
}
.audit-intro-pill.audit-intro-pill--guide{
  color: rgba(253,224,71,0.58);
  border-color: rgba(253,224,71,0.20);
  background: rgba(253,224,71,0.04);
}
.audit-intro-pill.audit-intro-pill--guide:hover{
  color: rgba(253,224,71,0.88);
  border-color: rgba(253,224,71,0.36);
  background: rgba(253,224,71,0.08);
  transform: translateY(-1px);
}

.ap-track-cv-toggle{ display:inline-flex; align-items:center; }
.ap-cv-text{ display:inline-block; transition:opacity 1s ease; }

@media (max-width: 640px){
  .ap-track-head-bar{
    align-items:flex-end;
    gap:8px;
  }
  .ap-track-head-bar-right{
    flex-wrap:nowrap;
  }
  #apPillDeleted{ display:none !important; }
  .tp-deleted-pill{ display:none !important; }
  #trackCurvesInfoBtn{ display:none !important; }
  .ap-track-cv-toggle #trackCurvesInfoBtn{ display:inline-flex !important; }
  .ap-track-cv-toggle{ align-self:center; margin-bottom:6px; }
  .ap-ui-btn{ padding: 7px 9px; }
  .ap-ui-btn--dropoff{ min-width: unset; }
  .ap-window-btns{ display:none !important; }
  .ap-one-play-marker{ display:none !important; }
}

/* Chart hint info button */
.ap-hint-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  min-width: 14px;
  border-radius: 9999px;
  border: 1px solid rgba(107,114,128,0.45);
  background: transparent;
  color: rgba(107,114,128,0.8);
  font-size: 9px;
  line-height: 1;
  cursor: pointer;
  vertical-align: middle;
  transition: border-color 120ms, color 120ms;
}
.ap-hint-info-btn:hover {
  border-color: rgba(148,163,184,0.7);
  color: rgba(148,163,184,0.95);
}

/* Chart hint scroll+pulse animations */
@keyframes apHintTextPulse {
  0%   { color: rgb(107 114 128); }
  12%  { color: rgb(241 245 249); }
  24%  { color: rgb(107 114 128); }
  100% { color: rgb(107 114 128); }
}
@keyframes apChartBrightPulse {
  0%   { filter: brightness(1); }
  12%  { filter: brightness(1.45); }
  24%  { filter: brightness(1); }
  100% { filter: brightness(1); }
}
.ap-hint-pulse-text  { animation: apHintTextPulse    3s ease-in-out 3 forwards; }
.ap-hint-pulse-chart { animation: apChartBrightPulse 3s ease-in-out 3 forwards; }

/* ---- Track page component classes (tp-) ---------------------------------- */

.tp-flash {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(52,211,153,0.30);
  background: rgba(52,211,153,0.10);
  color: rgba(236,253,245,0.95);
  font-size: 14px;
  line-height: 1.25;
  margin-bottom: 16px;
}
.tp-flash__icon {
  width: 16px;
  height: 16px;
  opacity: 0.90;
  flex-shrink: 0;
}

.tp-section {
  background: #030712;
  border-radius: 1rem;
  padding: 12px 16px 16px;
  border: 1px solid #1f2937;
  margin-bottom: 24px;
}
@media (min-width: 640px) {
  .tp-section { padding: 16px 24px 24px; }
}

.tp-chart-title {
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
}
.tp-chart-title--flow  { color: rgba(203,213,225,0.90); }
.tp-chart-title--trend { color: rgba(250,204,21,.85);  }

.tp-chart-area {
  position: relative;
  height: 192px;
}
@media (min-width: 640px) {
  .tp-chart-area { height: 256px; }
}

.tp-chart-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(75,85,99,0.90);
  font-size: 14px;
  pointer-events: none;
}

.tp-deleted-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(251,191,36,0.30);
  background: rgba(251,191,36,0.10);
  color: rgba(254,243,199,0.95);
  font-size: 12px;
  line-height: 1.25;
}

.tp-meta-section {
  padding: 0 8px;
  margin-bottom: 8px;
}
.tp-meta-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (min-width: 768px) {
  .tp-meta-row {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}
.tp-meta-title-group { min-width: 0; }
.tp-meta-artist {
  font-size: 15px;
  color: rgba(156,163,175,0.85);
  letter-spacing: 0.04em;
  margin: 0;
}
.tp-meta-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: break-word;
  word-break: break-word;
  margin: 0;
}
@media (min-width: 640px) {
  .tp-meta-title { font-size: 30px; }
}
.tp-meta-card-col {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}
@media (min-width: 768px) {
  .tp-meta-card-col { width: 360px; position: relative; }
}


.tp-cs-band--top   { color: rgba(52,211,153,0.92);  }
.tp-cs-band--high  { color: rgba(253,224,71,0.92);  }
.tp-cs-band--mid   { color: rgba(203,213,225,0.92); }
.tp-cs-band--low   { color: rgba(251,146,60,0.92);  }
.tp-cs-band--weak  { color: rgba(248,113,113,0.92); }
.tp-cs-band--other { color: rgba(148,163,184,0.92); }

.tp-pop-color--green  { color: rgba(52,211,153,0.92);  }
.tp-pop-color--red    { color: rgba(248,113,113,0.92); }

/* ── Cross Score Ranking modal ───────────────────────────────────────────── */

.cs-chart-panel {
  top: 18px;
  right: 18px;
  width: min(820px, calc(100vw - 36px));
  max-width: 820px;
  height: auto;
  max-height: calc(100vh - 36px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cs-chart-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cs-chart-wrap {
  height: 100px;
  position: relative;
}

@media (min-width: 480px) {
  .cs-chart-wrap { height: 140px; }
}

@media (min-width: 640px) {
  .cs-chart-wrap { height: 170px; }
}

/* Footer: score · rank · plays in one row */
.cs-chart-footer {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0.625rem 0.875rem;
  border: 1px solid rgba(43, 50, 71, 0.6);
  border-radius: 8px;
  background: rgba(10, 12, 20, 0.5);
}

.cs-footer-stat {
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
  min-width: 0;
}

.cs-footer-divider {
  width: 1px;
  height: 22px;
  background: rgba(43, 50, 71, 0.6);
  margin: 0 0.875rem;
  flex-shrink: 0;
}

.cs-footer-big {
  font-size: 1.375rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, monospace;
  color: rgba(250, 204, 21, 0.92);
  line-height: 1;
}

.cs-footer-rank {
  font-size: 12px;
  font-weight: 600;
  color: rgba(203, 213, 225, 0.8);
  white-space: nowrap;
}
.cs-rank--top { color: rgba(74, 222, 128, 0.85); }
.cs-rank--low { color: rgba(248, 113, 113, 0.75); }

.cs-footer-label {
  font-size: 10px;
  color: rgba(100, 116, 139, 0.65);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.cs-chart-hint {
  font-size: 10px;
  color: rgba(100, 116, 139, 0.40);
  letter-spacing: 0.04em;
  text-align: center;
  padding-bottom: 0.25rem;
}

/* ═══════════════════════════════════════════════════════════
   BROADCAST HEADER v2
   tp-broadcast-bar / tp-title-display / tp-data-strip
═══════════════════════════════════════════════════════════ */

.tp-meta-section {
  padding: 0 4px;
  margin-bottom: 16px;
}

/* Broadcast indicator */
.tp-broadcast-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 18px;
}
.tp-broadcast-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e63535;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(230,53,53,0.4);
  animation: tp-broadcast-pulse 2.4s ease-in-out infinite;
}
@keyframes tp-broadcast-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(230,53,53,0.55); }
  65%  { box-shadow: 0 0 0 6px rgba(230,53,53,0); }
  100% { box-shadow: 0 0 0 0 rgba(230,53,53,0); }
}
@media (prefers-reduced-motion: reduce) {
  .tp-broadcast-dot { animation: none; }
}
.tp-broadcast-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(230,53,53,0.82);
}
.tp-broadcast-sep {
  font-size: 11px;
  color: rgba(255,255,255,0.14);
}
.tp-broadcast-station {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(148,163,184,0.50);
}

/* Two-column meta row: title left, KPIs right */
.tp-meta-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}
@media (min-width: 768px) {
  .tp-meta-row {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
  }
}

/* Title display */
.tp-title-display {
  min-width: 0;
  flex: 1 1 auto;
}
.tp-artist-name {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(148,163,184,0.62);
  margin: 0 0 6px;
  line-height: 1.2;
}
.tp-track-name {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.025em;
  color: #eef0f4;
  margin: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}
@media (min-width: 480px) {
  .tp-track-name { font-size: 1.75rem; }
}
@media (min-width: 768px) {
  .tp-track-name { font-size: 2.05rem; }
}

/* KPI column (right side) */
.tp-data-col {
  flex-shrink: 0;
}

/* Data strip */
.tp-data-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 10px;
}
.tp-ds-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0 18px 0 0;
}
.tp-ds-k {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(100,116,139,0.75);
  line-height: 1;
  margin-bottom: 4px;
  white-space: nowrap;
}
.tp-ds-v {
  font-family: 'Space Mono', ui-monospace, SFMono-Regular, monospace;
  font-size: 13px;
  font-weight: 700;
  color: #eef0f4;
  line-height: 1;
  white-space: nowrap;
}
.tp-ds-sep {
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,0.08);
  flex-shrink: 0;
  margin-right: 18px;
  align-self: center;
}
.tp-ds-est {
  font-family: 'Space Mono', ui-monospace, SFMono-Regular, monospace;
  font-size: 9px;
  font-weight: 400;
  color: rgba(100,116,139,0.70);
}
.tp-ds-item--pop .tp-ds-v                      { color: rgba(245,158,11,0.95); }
.tp-ds-item--pop .tp-ds-v.tp-pop-color--green  { color: rgba(52,211,153,0.95); }
.tp-ds-item--pop .tp-ds-v.tp-pop-color--red    { color: rgba(248,113,113,0.95); }
.tp-ds-item--pop .tp-ds-v.tp-pop-color--yellow { color: rgba(245,158,11,0.95); }

/* Play preview button */
.tp-ds-play-btn {
  flex-direction: row;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  margin-left: 2px;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(255,255,255,0.03);
  color: rgba(100,116,139,0.75);
  cursor: pointer;
  transition: color 140ms, border-color 140ms, background 140ms;
}
.tp-ds-play-btn:hover {
  color: #eef0f4;
  border-color: rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.05);
}
.tp-ds-play-btn.is-playing {
  color: rgba(245,158,11,0.95);
  border-color: rgba(245,158,11,0.28);
}
#metaClipLabel {
  font-family: inherit;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.10em;
  line-height: 1;
  color: inherit;
  margin-top: 0;
  opacity: 0;
  transition: opacity 320ms ease;
}
#metaClipLabel.is-visible { opacity: 1; }

@media (max-width: 400px) {
  .tp-ds-item  { padding-right: 12px; }
  .tp-ds-sep   { margin-right: 12px; }
  .tp-ds-v     { font-size: 12px; }
}


.tp-pop-color--yellow { color: rgba(253,224,71,0.92);  }