/* ============================================================
   scottgoings.com — style.css
   Design: Warm editorial, clean & minimal
   Palette: Off-white bg · deep charcoal text · amber accent
   Type: Playfair Display (headings) · DM Mono (data/ui) · DM Sans (body)
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=DM+Mono:wght@300;400;500&family=DM+Sans:wght@300;400;500&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --bg:            #f5f2ed;
  --bg-card:       #faf8f4;
  --bg-header:     #1c1a17;
  --bg-header-alt: #242017;
  --text:          #1c1a17;
  --text-muted:    #6b6660;
  --text-faint:    #a8a19a;
  --accent:        #b8722e;
  --accent-hover:  #9e611f;
  --accent-light:  #f0e4d0;
  --border:        #e2ddd7;
  --border-strong: #ccc6be;
  --nav-text:      #c8c2ba;
  --nav-active:    #ffffff;
  --nav-accent:    #b8722e;

  --font-display:  'Playfair Display', Georgia, serif;
  --font-body:     'DM Sans', system-ui, sans-serif;
  --font-mono:     'DM Mono', 'Courier New', monospace;

  --radius:        5px;
  --radius-lg:     10px;
  --shadow:        0 1px 3px rgba(0,0,0,0.07), 0 3px 10px rgba(0,0,0,0.05);
  --shadow-md:     0 2px 8px rgba(0,0,0,0.09), 0 6px 20px rgba(0,0,0,0.06);

  /* Table column widths */
  --col-thumb:     52px;
  --col-numeric:   70px;
  --col-tier:      100px;
  --col-date:      110px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

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

img { display: block; max-width: 100%; }

/* ============================================================
   SITE HEADER + NAV
   ============================================================ */

.site-header {
  background: var(--bg-header);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.main-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}

.main-nav a {
  display: block;
  padding: 0.8rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--nav-text);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.main-nav a:hover {
  color: var(--nav-active);
  text-decoration: none;
}

.main-nav a.active {
  color: var(--nav-active);
  border-bottom-color: var(--nav-accent);
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-faint);
  border-top: 1px solid rgba(255,255,255,0.05);
}

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

.breadcrumbs a:hover { color: var(--nav-text); text-decoration: none; }

.breadcrumbs span { color: var(--text-faint); }

/* ============================================================
   PAGE CONTENT WRAPPER
   ============================================================ */

.page-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  overflow-x: hidden;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 1.25rem;
}

h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 0.75rem;
}

h2 small {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  margin-left: 0.4rem;
}

h3 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

p { margin-bottom: 0.75rem; }
p:last-child { margin-bottom: 0; }

.muted { color: var(--text-muted); font-size: 0.875rem; }

/* ============================================================
   FLASH MESSAGES
   ============================================================ */

.flash-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.flash {
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.85rem;
  box-shadow: var(--shadow-md);
  transition: opacity 0.4s, transform 0.4s;
}

.flash.hide { opacity: 0; transform: translateY(4px); }

.flash-success  { background: #1e4d35; color: #d4edda; }
.flash-error    { background: #6b1e1e; color: #f8d7da; }
.flash-warning  { background: #5a4010; color: #fff3cd; }
.flash-info     { background: var(--bg-header); color: var(--nav-text); }

/* ============================================================
   SPOTIFY LOADING TOAST
   ============================================================ */

.spotify-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(calc(100% + 2rem));
  background: var(--bg-header);
  color: var(--nav-text);
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease;
  z-index: 9998;
}

.spotify-toast.show {
  transform: translateX(-50%) translateY(0);
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.15);
  border-top-color: var(--nav-text);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   BUTTONS
   ============================================================ */

.btn-primary,
.btn-secondary,
.btn-danger {
  display: inline-block;
  padding: 0.45rem 1rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.825rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  text-align: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
  white-space: nowrap;
  line-height: 1.5;
}

.btn-primary {
  background: var(--text);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.btn-danger {
  background: #b91c1c;
  color: #fff;
}

.btn-danger:hover {
  background: #991b1b;
  color: #fff;
  text-decoration: none;
}

/* ============================================================
   FORMS
   ============================================================ */

input[type="text"],
input[type="number"],
input[type="password"],
textarea,
select {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 114, 46, 0.12);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.input-muted {
  background: var(--bg);
  border-color: var(--border);
  color: var(--text-muted);
}

/* ============================================================
   TIER BADGES
   ============================================================ */

.tier-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.tier-essential { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.tier-strong    { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
.tier-solid     { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.tier-weak      { background: #f3f4f6; color: #4b5563; border-color: #d1d5db; }
.tier-horrible  { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }

/* ============================================================
   DATA TABLES (split header/body pattern)
   ============================================================ */

.table-shell {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.table-header {
  background: var(--bg);
  border-bottom: 2px solid var(--border);
  overflow: hidden;
}

.table-body {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.table-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 0.6rem 1rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

/* Fixed layout only inside the split header/body shell,
   where thead and tbody are in separate synced tables */
.table-shell .data-table {
  table-layout: fixed;
}

.data-table thead th {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.6rem 0.75rem;
  text-align: left;
  white-space: nowrap;
}

.data-table thead th a {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.data-table thead th a:hover { color: var(--accent); text-decoration: none; }

.data-table thead th.sorted a { color: var(--accent); }

.data-table thead th.sortable { cursor: pointer; }

.sort-indicator { font-size: 0.6rem; opacity: 0.8; }

.data-table tbody td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-size: 0.875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}



.data-table tbody tr:last-child td { border-bottom: none; }

.data-table tbody tr:hover { background: rgba(184,114,46,0.04); }

.data-table tbody td a { color: var(--text); text-decoration: none; }
.data-table tbody td a:hover { color: var(--accent); text-decoration: none; }

/* Column widths */
.col-thumb   { width: var(--col-thumb);   min-width: var(--col-thumb); }
.col-numeric { width: var(--col-numeric); text-align: right; font-family: var(--font-mono); font-size: 0.82rem !important; }
.col-tier    { width: var(--col-tier); }
.col-date    { width: 90px; min-width: 90px; white-space: nowrap; font-family: var(--font-mono); font-size: 0.78rem !important; color: var(--text-muted); }
.col-main    { min-width: 150px; font-weight: 500; }

/* Recent tracks standalone table */
.recent-tracks-table {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: block; /* enables border-radius on table */
}

.recent-tracks-table td,
.recent-tracks-table th {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Let track name and album wrap rather than truncate */
.recent-tracks-table .col-text {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  min-width: 120px;
}
.col-text    { min-width: 120px; }

/* Thumbnails */
.thumb {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 3px;
  display: block;
}

/* Stacked meta in table cells */
.stacked-meta { display: flex; flex-direction: column; gap: 0.1rem; }
.stacked-meta .album  { font-size: 0.85rem; font-weight: 500; color: var(--text); }
.stacked-meta .artist { font-size: 0.75rem; color: var(--text-muted); }

/* Album row (genre/decade last album) */
.album-row { display: flex; flex-direction: column; gap: 0.1rem; }
.album-primary   a { font-size: 0.85rem; font-weight: 500; color: var(--text); }
.album-secondary a { font-size: 0.75rem; color: var(--text-muted); }

/* Score cell */
.score-cell { display: flex; align-items: center; gap: 0.4rem; }

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pagination a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.pagination a:hover { color: var(--accent); text-decoration: none; }

.page-status {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  margin: 0 auto;
}

/* Responsive hide columns */
@media (max-width: 1100px) { .can-hide-1 { display: none !important; } }
@media (max-width: 900px)  { .can-hide-2 { display: none !important; } }
@media (max-width: 700px)  { .can-hide-3 { display: none !important; } }
@media (max-width: 520px)  { .can-hide-4 { display: none !important; } }



/* ============================================================
   TRACK TABLE
   ============================================================ */

.track-table-shell {
  width: 100%;
}

.track-table {
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
}

/* All track table cells — reset the general data-table overrides */
.track-table thead th,
.track-table tbody td {
  overflow: visible;
  text-overflow: unset;
  white-space: nowrap;
  padding: 0.45rem 0.75rem;
}

/* # column — tight, right-aligned, faint */
.track-table .col-numeric {
  width: 2rem;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* Title column — fixed width, wraps on long names */
.track-table .col-text {
  width: 200px;
  max-width: 200px;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  text-align: left;
}

@media (max-width: 500px) {
  .track-table .col-text {
    width: 120px;
    max-width: 120px;
  }
}

/* Duration column — tight right-aligned, mono */
.track-table .col-duration {
  width: 5rem;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ============================================================
   DETAIL LAYOUT (album, artist, genre, decade pages)
   ============================================================ */

.detail-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2.5rem;
  align-items: start;
}

.album-detail-meta {
  position: sticky;
  top: 4.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.detail-art {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: block;
  margin-bottom: 0.25rem;
}

/* Artist detail: slightly wider left col */
.artist-detail-meta .detail-art {
  border-radius: 50%;
  width: 180px;
  height: 180px;
  object-fit: cover;
}

.album-detail-content { min-width: 0; }

/* Two-column right side (genre/decade) */
.detail-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

/* ============================================================
   SCORE EXPLAINER (formula block)
   ============================================================ */

.score-explainer {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}

.formula {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--text-muted);
  background: transparent;
  border: none;
  padding: 0;
  white-space: pre;
  overflow-x: auto;
}

.formula-notes {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.formula-notes p {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.25rem;
}

.formula-notes code {
  background: var(--accent-light);
  color: var(--accent);
  padding: 0 3px;
  border-radius: 3px;
  font-size: 0.72rem;
}

/* ============================================================
   TIER ALBUMS (collapsible detail sections)
   ============================================================ */

.tier-albums {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.tier-albums details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.tier-albums details[open] { border-color: var(--border-strong); }

.tier-albums summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  background: var(--bg);
}

.tier-albums summary::-webkit-details-marker { display: none; }
.tier-albums summary:hover { background: var(--accent-light); }

.tier-albums .count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.album-list {
  list-style: none;
  padding: 0.25rem 0;
  margin: 0;
}

.album-list li {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.84rem;
  flex-wrap: wrap;
}

.album-list li:last-child { border-bottom: none; }

.album-list a { color: var(--text); text-decoration: none; }
.album-list a:hover { color: var(--accent); text-decoration: none; }

.album-list .artist {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.album-list .artist a { color: var(--text-muted); }
.album-list .artist a:hover { color: var(--accent); }

.empty {
  font-size: 0.8rem;
  color: var(--text-faint);
  font-style: italic;
  padding: 0.4rem 0.75rem;
}

/* ============================================================
   STATS PAGE
   ============================================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  align-items: start;
}

.stats-grid section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

/* Compact list (stats bullets) */
.compact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
}

.compact-list li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  line-height: 1.45;
}

.compact-list li:last-child { border-bottom: none; }

/* Rating blocks within stats */
.rating-block {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Heatmap bars */
.heatmap {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.heatmap-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.heatmap-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  width: 80px;
  flex-shrink: 0;
  text-align: right;
}

.heatmap-bar {
  flex: 1;
  height: 14px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.heatmap-fill {
  height: 100%;
  width: calc(var(--value) * 1%);
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.4s ease;
  min-width: 2px;
}

.heatmap-value {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  width: 32px;
  text-align: right;
  flex-shrink: 0;
}

/* Album list within stats ratings column */
.stats-grid .album-list li {
  flex-direction: column;
  gap: 0.1rem;
  align-items: flex-start;
}

.stats-grid .album-row { width: 100%; }

.stats-grid .album-primary,
.stats-grid .album-secondary {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.stats-grid .album-primary a.album { font-weight: 500; font-size: 0.85rem; color: var(--text); }
.stats-grid .album-secondary a.artist { font-size: 0.78rem; color: var(--text-muted); }
.stats-grid .rating { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent); }
.stats-grid .date   { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-faint); }
.stats-grid .plays  { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }
.stats-grid .dot    { color: var(--text-faint); font-size: 0.7rem; }

/* ============================================================
   CHOOSE PAGE (batch grid)
   ============================================================ */

.choose-grid {
  display: grid;
  gap: 1.1rem;
}

.choose-grid.thirds {
  grid-template-columns: repeat(3, 1fr);
}

.choose-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.choose-tile:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.choose-tile > a {
  display: block;
  text-decoration: none;
}

.choose-tile img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.choose-meta {
  padding: 0.75rem;
  background: var(--bg-card);
}

.choose-meta strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 0.2rem;
}

.choose-meta .muted { font-size: 0.8rem; }

.choose-action {
  padding: 0.6rem 0.75rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.choose-action button {
  width: 100%;
  padding: 0.45rem;
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.choose-action button:hover { background: var(--accent); }

/* ============================================================
   SEARCH RESULTS
   ============================================================ */

.search-result {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  align-items: flex-start;
}

.search-result img.thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.search-result .meta { flex: 1; min-width: 0; }
.search-result .meta strong { font-size: 0.875rem; color: var(--text); }
.search-result .meta .muted { font-size: 0.8rem; }

.search-result .actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.search-result .actions a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s, color 0.15s;
}

.search-result .actions a:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

/* Search highlight */
mark {
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 2px;
  padding: 0 2px;
}

/* ============================================================
   DASHBOARD
   ============================================================ */

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.dashboard-current,
.dashboard-actions {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.section-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* Card horizontal (current album in dashboard) */
.card-horizontal {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.card-horizontal .detail-art {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.card-horizontal .stacked-meta .album  { font-weight: 600; font-size: 0.925rem; }
.card-horizontal .stacked-meta .artist { color: var(--text-muted); font-size: 0.825rem; }

.action-links { margin-top: 0.5rem; }
.action-links a { font-size: 0.825rem; display: inline-block; }

/* Action list */
.action-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.action-list li {
  border-bottom: 1px solid var(--border);
}

.action-list li:last-child { border-bottom: none; }

.action-list a {
  display: block;
  padding: 0.55rem 0;
  font-size: 0.875rem;
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s;
}

.action-list a:hover { color: var(--accent); text-decoration: none; }

/* ============================================================
   AUTH PAGE
   ============================================================ */

.auth-container {
  max-width: 360px;
  margin: 3rem auto 0;
}

.auth-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.25rem;
}

.auth-form button {
  width: 100%;
  padding: 0.55rem;
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 0.25rem;
}

.auth-form button:hover { background: var(--accent); }

/* ============================================================
   ALL ARTISTS / ALL GENRES (cloud views)
   ============================================================ */

.artist-cloud,
.genre-cloud {
  line-height: 2;
}

.artist-item,
.genre-item {
  font-size: 0.875rem;
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s;
}

.artist-item:hover,
.genre-item:hover { color: var(--accent); text-decoration: none; }

.separator { color: var(--text-faint); margin: 0 0.2rem; font-size: 0.75rem; }

/* ============================================================
   RATE ALBUM PAGE
   ============================================================ */

.rate-album-form label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  transition: border-color 0.15s, background 0.15s;
}

.rate-album-form label:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

/* ============================================================
   MISC UTILITIES
   ============================================================ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

/* Generic page card for add/confirm flows */
.confirm-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  max-width: 520px;
}

.confirm-card img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1100px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .album-detail-meta {
    position: static;
  }

  .detail-columns {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .choose-grid.thirds {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  h1 { font-size: 1.5rem; }

  .page-content { padding: 1.5rem 1rem 3rem; }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .choose-grid.thirds {
    grid-template-columns: 1fr;
  }

  .detail-columns {
    grid-template-columns: 1fr;
  }
}