:root {
  color-scheme: dark;
  --bg: #070506;
  --bg-alt: #0d0909;
  --panel: rgba(13, 9, 9, 0.97);
  --panel-soft: rgba(22, 14, 14, 0.72);
  --line: rgba(160, 40, 40, 0.22);
  --text: #e4d8d2;
  --muted: #7a6a66;
  --accent: #b02a2a;
  --accent-bright: #d43a3a;
  --accent-soft: rgba(176, 42, 42, 0.15);
  --success: #5a8c50;
  --danger: #e05040;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.65), 0 4px 20px rgba(140, 20, 20, 0.08);
  --radius: 14px;
  --radius-sm: 9px;
  --display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --body: "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  color: var(--text);
  background:
    radial-gradient(ellipse at top left, rgba(120, 20, 20, 0.1), transparent 35%),
    radial-gradient(ellipse at bottom right, rgba(80, 10, 10, 0.18), transparent 40%),
    linear-gradient(180deg, #060404 0%, #0c0808 60%, #070505 100%);
}

a {
  color: var(--text);
  text-decoration: none;
}

button,
select {
  font: inherit;
}

.shell {
  width: min(1400px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.topbar {
  margin-top: 0;
  margin-bottom: 1.35rem;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand-mark {
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}

.topbar-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.topbar-button {
  min-height: 42px;
  padding: 0 1rem;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: rgba(10, 6, 6, 0.85);
  color: var(--text);
  cursor: pointer;
  letter-spacing: 0.03em;
}

.topbar-button.active {
  background: var(--accent-soft);
  border-color: rgba(176, 42, 42, 0.4);
  color: #f0c0b0;
}

.hero,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  gap: 2rem;
  padding: 2rem;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.9fr);
  background:
    linear-gradient(135deg, rgba(100, 15, 15, 0.12) 0%, transparent 50%),
    var(--panel);
  border-color: rgba(160, 40, 40, 0.3);
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--accent-bright);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.7rem;
  font-weight: 700;
}

.hero h1,
.section-head h2 {
  margin: 0;
  font-family: var(--display);
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(2.8rem, 5vw, 5.3rem);
  max-width: 12ch;
  color: #f0e4de;
}

.lede,
.section-note,
.detail-review,
.source-list li,
.detail-grid p {
  color: var(--muted);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 1.2rem;
  border-radius: 7px;
  border: 1px solid var(--line);
  letter-spacing: 0.02em;
}

.button.primary {
  background: var(--accent);
  border-color: rgba(200, 60, 60, 0.5);
  color: #f5e0dc;
  font-weight: 700;
}

.button.primary:hover {
  background: var(--accent-bright);
}

.button.secondary {
  background: transparent;
  border-color: rgba(176, 42, 42, 0.5);
  color: #d4a09a;
  font-weight: 600;
}

.button.secondary:hover {
  background: var(--accent-soft);
}

.button.ghost {
  background: var(--accent-soft);
  border-color: rgba(176, 42, 42, 0.3);
  color: #d4a09a;
}

.button.disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.hero.library-mode {
  background:
    linear-gradient(135deg, rgba(100, 15, 15, 0.1) 0%, transparent 50%),
    rgba(13, 9, 9, 0.97);
}

.hero.library-mode .hero-stats {
  align-content: stretch;
}

.hero-stats {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.stat-card {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  background: rgba(18, 10, 10, 0.8);
  border: 1px solid var(--line);
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 0.45rem;
}

.panel {
  margin-top: 1.35rem;
  padding: 1.45rem;
}

.panel-soft {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(12, 8, 8, 0.8);
  padding: 1rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.section-head.compact {
  align-items: center;
}

.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  color: #ede0da;
}

.album-rail {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.week-card,
.library-row,
.favorite-card {
  width: 100%;
  border: 1px solid rgba(100, 30, 30, 0.3);
  background: rgba(10, 6, 6, 0.82);
  color: inherit;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.week-card:hover,
.week-card:focus-visible,
.library-row:hover,
.library-row:focus-visible,
.favorite-card:hover,
.favorite-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(176, 42, 42, 0.55);
  background: rgba(20, 12, 12, 0.98);
  box-shadow: 0 8px 32px rgba(120, 20, 20, 0.2);
}

.week-card {
  padding: 1rem;
  border-radius: 12px;
  text-align: left;
}

.cover-art,
.row-cover,
.favorite-cover,
.detail-cover {
  display: block;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
}

.cover-art {
  aspect-ratio: 1;
  margin-bottom: 0.9rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.card-copy {
  display: grid;
  gap: 0.3rem;
}

.card-topline,
.genre-line {
  color: var(--muted);
  font-size: 0.88rem;
}

.status-pill {
  margin-top: 0.35rem;
  display: inline-flex;
  width: fit-content;
  padding: 0.35rem 0.65rem;
  border-radius: 5px;
  font-size: 0.8rem;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

.status-pill.pending {
  background: rgba(160, 40, 40, 0.12);
  color: #c09090;
  border: 1px solid rgba(160, 40, 40, 0.2);
}

.status-pill.rated {
  background: rgba(80, 130, 70, 0.15);
  color: #98c48a;
  border: 1px solid rgba(80, 130, 70, 0.2);
}

.split,
.triple {
  display: grid;
  gap: 1.35rem;
}

.split {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.95fr);
}

.triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.toolbar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.toolbar label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

select {
  min-width: 150px;
  padding: 0.65rem 0.8rem;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #100808;
  color: var(--text);
}

.library-list {
  display: grid;
  gap: 0.6rem;
  max-height: 54rem;
  overflow: auto;
  padding-right: 0.35rem;
}

.library-list::-webkit-scrollbar {
  width: 8px;
}

.library-list::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: rgba(176, 42, 42, 0.35);
}

.library-list::-webkit-scrollbar-track {
  background: rgba(30, 10, 10, 0.4);
}

.library-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr) 90px;
  gap: 0.9rem;
  align-items: center;
  padding: 0.7rem;
  border-radius: 9px;
  text-align: left;
}

.row-cover {
  aspect-ratio: 1;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.row-main,
.detail-copy {
  display: grid;
  gap: 0.18rem;
}

.row-main span,
.row-meta,
.detail-meta {
  color: var(--muted);
}

.row-rating {
  justify-self: end;
  font-weight: 700;
  color: var(--accent-bright);
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.detail-hero {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.detail-cover {
  aspect-ratio: 1;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.7), 0 2px 10px rgba(140, 20, 20, 0.15);
}

.rating-badge {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 0.7rem;
  padding: 0.35rem 0.75rem;
  border-radius: 5px;
  background: rgba(176, 42, 42, 0.18);
  border: 1px solid rgba(176, 42, 42, 0.35);
  color: #e0a0a0;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.detail-grid section {
  padding: 0.9rem;
  border: 1px solid rgba(100, 30, 30, 0.3);
  border-radius: 9px;
  background: rgba(12, 7, 7, 0.8);
}

.detail-grid h3 {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-bright);
}

.detail-grid a {
  display: block;
  margin-bottom: 0.45rem;
}

.detail-link {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.92rem;
}

.detail-link.pending {
  color: var(--muted);
  font-style: italic;
}

.detail-prompts {
  margin: 0;
  padding-left: 1rem;
  color: var(--muted);
  line-height: 1.6;
}

.favorites-stack {
  display: grid;
  gap: 1.4rem;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(176, 42, 42, 0.3) transparent;
}

.favorites-stack::-webkit-scrollbar {
  width: 6px;
}

.favorites-stack::-webkit-scrollbar-thumb {
  border-radius: 3px;
  background: rgba(176, 42, 42, 0.3);
}

/* Crate section (per star tier) */
.crate-section {
  display: grid;
  gap: 1rem;
}

.crate-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-bright);
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(160, 40, 40, 0.3);
}

.crate-section-head span {
  color: var(--muted);
  font-weight: 400;
}

/* Genre shelf row */
.crate-shelf {
  display: grid;
  gap: 0.5rem;
}

.crate-shelf-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.crate-shelf-count {
  opacity: 0.6;
}

/* Horizontal scrolling crate */
.crate-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  padding-top: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(176, 42, 42, 0.3) transparent;
}

.crate-rail::-webkit-scrollbar {
  height: 5px;
}

.crate-rail::-webkit-scrollbar-thumb {
  border-radius: 3px;
  background: rgba(176, 42, 42, 0.3);
}

/* Individual record in the crate */
.crate-card {
  flex: 0 0 130px;
  display: grid;
  gap: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  color: inherit;
  text-align: left;
  padding: 0;
  position: relative;
  transform-origin: bottom center;
  transition: transform 160ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
              filter 160ms ease;
  will-change: transform;
}

.crate-card:hover,
.crate-card:focus-visible {
  transform: translateY(-12px) scale(1.04);
  filter: brightness(1.08);
  z-index: 5;
}

.crate-cover {
  display: block;
  width: 130px;
  height: 130px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  box-shadow:
    0 2px 0 rgba(0,0,0,0.9),
    0 4px 0 rgba(20,10,10,0.7),
    0 6px 16px rgba(0,0,0,0.6);
}

.crate-info {
  display: grid;
  gap: 0.1rem;
  padding: 0.45rem 0.1rem 0;
  max-width: 130px;
}

.crate-info strong {
  font-size: 0.75rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.crate-info span {
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.favorite-card,
.favorite-cover {
  display: none;
}

.empty-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-style: italic;
}

/* KPI row */
.stat-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  margin-bottom: 1.2rem;
}

.stat-kpi {
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem 0.9rem;
  border-radius: 9px;
  border: 1px solid rgba(100, 30, 30, 0.25);
  background: rgba(10, 6, 6, 0.85);
}

.stat-kpi-val {
  font-size: 1.6rem;
  font-weight: 700;
  font-family: var(--display);
  color: var(--accent-bright);
  line-height: 1;
}

.stat-kpi-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

/* Bar charts */
.chart-section {
  margin-bottom: 1.1rem;
}

.chart-title {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.chart-row {
  display: grid;
  grid-template-columns: minmax(2.5rem, 7rem) 1fr 2rem;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.35rem;
}

.chart-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chart-track {
  height: 10px;
  border-radius: 3px;
  background: rgba(40, 20, 20, 0.7);
  overflow: hidden;
}

.chart-bar {
  height: 100%;
  border-radius: 3px;
  background: rgba(140, 40, 40, 0.55);
  transition: width 400ms ease;
}

.chart-bar--accent {
  background: var(--accent-bright);
}

.chart-val {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: right;
}

/* Carousel navigation */
.carousel-nav {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.carousel-count {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  min-width: 3.5rem;
  text-align: center;
}

.carousel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(12, 7, 7, 0.9);
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  transition: border-color 100ms ease, background 100ms ease, color 100ms ease;
}

.carousel-btn:hover:not(:disabled) {
  border-color: rgba(176, 42, 42, 0.5);
  background: rgba(176, 42, 42, 0.1);
  color: var(--accent-bright);
}

.carousel-btn:disabled {
  opacity: 0.25;
  cursor: default;
}

/* New releases this week */
.new-releases-list {
  display: grid;
  gap: 0.55rem;
}

.new-release-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) minmax(0, 1fr) 80px;
  gap: 0.9rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border-radius: 9px;
  border: 1px solid rgba(100, 30, 30, 0.28);
  background: rgba(10, 6, 6, 0.7);
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color 120ms ease, background 120ms ease;
}

.new-release-row:hover,
.new-release-row:focus-visible {
  border-color: rgba(176, 42, 42, 0.5);
  background: rgba(20, 11, 11, 0.95);
}

.row-links {
  display: flex;
  gap: 0.45rem;
  justify-content: flex-end;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 5px;
  border: 1px solid rgba(176, 42, 42, 0.3);
  background: rgba(176, 42, 42, 0.1);
  color: var(--accent-bright);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: background 100ms ease, border-color 100ms ease;
}

.icon-link:hover {
  background: rgba(176, 42, 42, 0.22);
  border-color: rgba(176, 42, 42, 0.55);
}

.loading-panel {
  margin-top: 0;
}

/* ---------------------------------------------------------------------------
   Year archive — brand button (clickable logo)
   --------------------------------------------------------------------------- */

.brand-btn {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  color: inherit;
  text-align: left;
}

.brand-btn .eyebrow {
  margin-bottom: 0.25rem;
}

/* ---------------------------------------------------------------------------
   Year browser grid
   --------------------------------------------------------------------------- */

.year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.year-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.25rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(120, 35, 35, 0.35);
  background: rgba(12, 7, 7, 0.88);
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.year-card:hover,
.year-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(176, 42, 42, 0.6);
  background: rgba(22, 12, 12, 0.98);
  box-shadow: 0 8px 32px rgba(120, 20, 20, 0.22);
}

.year-number {
  font-family: var(--display);
  font-size: 2.8rem;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #f0e4de;
}

.year-card-stats {
  display: flex;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.year-avg {
  color: var(--accent-bright);
  font-weight: 700;
}

.year-card-genre {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.year-card-footer {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.5rem;
}

.year-fivestar {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-bright);
  letter-spacing: 0.03em;
}

.year-playlist-badge {
  font-size: 0.68rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(80, 130, 70, 0.15);
  color: #98c48a;
  border: 1px solid rgba(80, 130, 70, 0.25);
}

/* ---------------------------------------------------------------------------
   Year detail hero
   --------------------------------------------------------------------------- */

.year-archive-hero,
.year-detail-hero {
  background:
    linear-gradient(135deg, rgba(80, 10, 10, 0.18) 0%, transparent 55%),
    var(--panel);
  border-color: rgba(160, 40, 40, 0.3);
}

/* ---------------------------------------------------------------------------
   Playlist button states
   --------------------------------------------------------------------------- */

.playlist-error {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--danger);
}

/* Selected library row highlight */
.library-row.selected {
  border-color: rgba(176, 42, 42, 0.5);
  background: rgba(176, 42, 42, 0.06);
}

/* ---------------------------------------------------------------------------
   Throwback Thursday
   --------------------------------------------------------------------------- */

.tbt-hero,
.tbt-session-hero {
  background:
    linear-gradient(135deg, rgba(60, 10, 80, 0.12) 0%, rgba(100, 10, 10, 0.1) 50%, transparent 70%),
    var(--panel);
  border-color: rgba(140, 60, 160, 0.25);
}

.tbt-year-picker {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.tbt-year-label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.tbt-generating-note {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-style: italic;
}

.tbt-abandon-btn {
  background: transparent;
  border-color: rgba(200, 60, 60, 0.2);
  color: var(--muted);
  font-size: 0.85rem;
}

.tbt-abandon-btn:hover {
  border-color: rgba(200, 60, 60, 0.5);
  color: var(--danger);
}

/* Album card grid */
.tbt-album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.tbt-album-card {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 0;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(100, 30, 30, 0.32);
  background: rgba(10, 6, 6, 0.88);
  overflow: hidden;
  transition: border-color 140ms ease;
}

.tbt-album-card.is-saved {
  border-color: rgba(80, 130, 70, 0.35);
  background: rgba(10, 14, 9, 0.92);
}

.tbt-cover {
  display: block;
  aspect-ratio: 1;
  width: 130px;
  background-size: cover;
  background-position: center;
  position: relative;
  flex-shrink: 0;
  text-decoration: none;
}

.tbt-spotify-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  color: #1DB954;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  opacity: 0;
  transition: opacity 140ms ease;
}

.tbt-cover:hover .tbt-spotify-overlay {
  opacity: 1;
}

.tbt-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.85rem 0.9rem;
  min-width: 0;
}

.tbt-card-meta {
  display: grid;
  gap: 0.15rem;
}

.tbt-album-title {
  font-size: 0.9rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tbt-album-artist {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tbt-album-tags {
  font-size: 0.72rem;
  color: var(--muted);
  opacity: 0.75;
}

/* Star rating */
.tbt-stars {
  display: flex;
  gap: 3px;
}

.star-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: rgba(160, 80, 80, 0.35);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0;
  transition: color 80ms ease, transform 80ms ease;
  line-height: 1;
}

.star-btn:hover,
.star-btn.active {
  color: var(--accent-bright);
  transform: scale(1.15);
}

.tbt-review {
  width: 100%;
  min-height: 52px;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(100, 30, 30, 0.3);
  background: rgba(8, 4, 4, 0.85);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  resize: none;
  line-height: 1.4;
}

.tbt-review:focus {
  outline: none;
  border-color: rgba(176, 42, 42, 0.5);
}

.tbt-card-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 30px;
}

.tbt-save-btn {
  min-height: 30px;
  padding: 0 0.75rem;
  font-size: 0.8rem;
}

.tbt-saved-badge {
  font-size: 0.78rem;
  color: #98c48a;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* History list */
.tbt-history-list {
  display: grid;
  gap: 0.55rem;
}

.tbt-history-row {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.75rem 0.9rem;
  border-radius: 9px;
  border: 1px solid rgba(100, 30, 30, 0.28);
  background: rgba(10, 6, 6, 0.7);
}

.tbt-history-year {
  font-family: var(--display);
  font-size: 1.4rem;
  color: #f0e4de;
  line-height: 1;
}

.tbt-history-meta,
.tbt-history-date {
  color: var(--muted);
  font-size: 0.85rem;
}

.tbt-history-links {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

@media (max-width: 1080px) {
  .hero,
  .split,
  .triple,
  .detail-hero,
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .tbt-album-grid {
    grid-template-columns: 1fr;
  }

  .tbt-history-row {
    grid-template-columns: 4rem minmax(0, 1fr);
  }

  .tbt-history-date,
  .tbt-history-links {
    display: none;
  }

  .shell {
    width: min(100% - 1rem, 100%);
    padding-top: 1rem;
  }

  .hero,
  .panel {
    border-radius: 12px;
    padding: 1rem;
  }

  .topbar {
    padding: 1rem;
    border-radius: 12px;
  }

  .library-row {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .row-meta,
  .row-rating {
    justify-self: start;
  }

  .new-release-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .topbar {
    align-items: start;
    flex-direction: column;
  }
}
