/* ── Track article: full accent border ─────────────────── */
article.track {
  border: 2px solid var(--album-accent) !important;
  border-radius: 2px !important;
}

/* ── Cover container: always square ────────────────────── */
#img-container {
  width: clamp(200px, calc(100% - 2.5rem), 400px);
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
  position: relative;
  cursor: crosshair;
}

#album-cover {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}


/* ── Album sidebar layout ─────────────────────────────── */
.album-sidebar {
  background: var(--bg-primary);
}
@media (min-width: 1024px) {
  .album-sidebar { border-right: 1px solid var(--border-light); }
}
@media (max-width: 1023px) {
  .album-sidebar > div:last-child { padding-left: 1rem; padding-right: 1rem; }
}

/* ── Zoom panel — appended to body, position:fixed via JS ── */
.zoom-result {
  position: fixed;
  width: 0;
  height: 0;
  overflow: hidden;
  background-repeat: no-repeat;
  background-color: #0d120d;
  border: 1px solid var(--border-light);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 2px;
  transition: opacity 0.12s ease;
}

/* ── Album cover section ────────────────────────────────── */
.album-cover-section {
  padding: 1.25rem;
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--border-light);
}

/* ── Compact details block (inside hero band, under title) ─ */
.album-details-compact {
  margin-top: 0.6rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(46, 96, 64, 0.4);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem 0.6rem;
}
.adc-wide { grid-column: 1 / -1; }

.adc-item {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}
.adc-label {
  font-size: 0.44rem;
  color: #4b6655;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}
.adc-val {
  font-size: 0.62rem;
  color: #c9d1d9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adc-empty { color: #2e6040; }
.adc-sub {
  font-size: 0.5rem;
  color: #4b5563;
}
.adc-color-val {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.adc-swatch {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.1);
  display: inline-block;
}
.adc-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0;
  align-items: baseline;
}
.adc-link {
  font-size: 0.62rem;
  color: #7da87d;
  text-decoration: none;
}
.adc-link + .adc-link::before {
  content: ", ";
  color: #4b5563;
  white-space: pre;
}
.adc-link:hover { color: #e6edf3; }
.adc-label-inline {
  font-size: 0.58rem;
  color: #6e7681;
  margin-left: 0.5rem;
  padding-left: 0.5rem;
  border-left: 1px solid #2e6040;
}

/* ── Stats grid (homepage-style bordered cells) ─────── */
.album-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border-light);
  border-left: 1px solid var(--border-light);
}
.album-stat-cell {
  padding: 0.6rem 0.7rem;
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.1s;
}
.album-stat-cell:hover { background-color: var(--bg-secondary); }
.album-stat-cell .sn {
  font-size: 1rem;
  font-weight: 700;
  color: #e6edf3;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.album-stat-cell .sl {
  font-size: 0.6rem;
  color: #6e7681;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.15rem;
}

.album-details-container {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 20px;
  margin: 20px 2rem;
}

.album-details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.album-details-grid div {
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: 8px;
  border-radius: var(--border-radius-md);
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
}

.details-section {
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius-md);
  padding: 1px;
  font-size: 0.8rem;
}

.details-section h3 {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--text-secondary);
  margin-bottom: 10px;
  text-align: center;
}

.section-details {
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  margin:2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-light);
  max-width: 100%;
}

.track {
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius-lg);
  padding: 0.2rem;
  margin:1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  border-left: 3px solid var(--album-accent);
}

.track-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  text-align: center;
}

.track-metadata {
  background-color: var(--bg-primary);
  border-radius: var(--border-radius-lg);
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.track-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2px;    
  padding-bottom: 4px;    
}

.track-stats::-webkit-scrollbar {
  display: none;
}

.stat-chip {
  background: transparent;
  border: none;
  border-left: 2px solid var(--border-light);
  padding: 0.3rem 0.5rem;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  min-width: 40px;
  transition: border-color 0.15s ease;
}

.stat-chip:hover {
  border-left-color: #4db87a;
}

.stat-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.48rem;
  color: #4b6655;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.track-pos-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
}

.pos-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  row-gap: 0.6rem;
  justify-content: center;
  align-items: center;
  max-width: 100%;
  padding: 0 0.25rem;
}

.pos-tag {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 0.35rem 0.6rem;
  border-radius: 3px;
  border: 1px solid rgba(46, 96, 64, 0.45);
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
  min-width: 40px;
}

.pos-tag .pos-category {
  font-size: 0.48rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.1rem;
  opacity: 0.75;
  font-weight: 600;
}

.pos-tag .pos-count {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  background: none;
  padding: 0;
  border-radius: 0;
  min-width: unset;
  color: #e6edf3;
}

.pos-tag:hover {
  transform: scale(1.05);
}

.highlight-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.5rem;
}

.highlight-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.highlight-all-checkbox {
  width: 0.875rem;
  height: 0.875rem;
}

.track-content {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
}

.lyrics {
  background-color: var(--bg-primary);
  padding: 1.5rem;
  border-radius: var(--border-radius-lg);
  font-size: 0.875rem;
  line-height: 1.5;
  column-count: 2;
  column-gap: 2rem;
  border: 1px solid var(--border-light);
  max-width: 100%;
  overflow-x: hidden;
  word-wrap: break-word;
  column-width: auto;
  column-fill: balance;  
  width: 100%;    
  box-sizing: border-box;
}

.word-counts {
  background-color: var(--bg-primary);
  padding: 1.5rem;
  border-radius: var(--border-radius-lg);
  width: 300px;
  border: 1px solid var(--border-light);
}

.word {
  transition: var(--transition-base);
  border-radius: 0.25rem;
  padding: 0 0.125rem;
}

.word.highlighted {
  background-color: var(--highlight-color, #fcd34d);
  color: #000000;
}

.word-freq-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 0.18rem;
  padding: 0.1rem 0.25rem;
  font-size: 0.65rem;
  cursor: pointer;
  border-bottom: 1px solid #2e6040;
  color: #c9d1d9;
  transition: border-color 0.12s ease;
}

.word-freq-tag:hover {
  border-bottom-color: #4db87a;
}

.word-freq-tag .wft-count {
  font-size: 0.52rem;
  opacity: 0.55;
}

@media (max-width: 1024px) {
  .album-details-container {
    grid-template-columns: 3fr 1fr;
  }

  .track-content {
    grid-template-columns: 1fr;
  }
  
  .word-counts {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .album-details-container {
    grid-template-columns: 1fr;
    margin: 20px 1rem;
  }

  .track {
    margin: 0 1rem 2rem 1rem;
    padding: 1rem;
  }

  .lyrics {
    column-count: 1;
  }

  .stat-chip {    
    padding: 0.375rem 0.5rem;
  }

  .pos-tag {    
    padding: 0.25rem 0.5rem;
  }
}