:root {
  --bg: #0b0b0b;
  --panel: #141414;
  --panel2: #101010;
  --border: #2a2a2a;
  --text: #ffffff;
  --muted: #bdbdbd;
  --muted2: #8f8f8f;
}

* { box-sizing: border-box; }

body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
}

.wrap {
  max-width: 1100px;
  margin: 36px auto;
  padding: 0 16px;
}

.hero,
.header,
.branding {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero h1,
.header h1,
.branding h1 {
  margin: 0;
  margin-bottom: 6px;
  font-size: 2rem;
}

.tagline,
.subtitle,
.hero p,
.header p,
.branding p {
  margin-top: 4px;
  text-align: center;
  opacity: 0.85;
  font-weight: 400;
  font-size: 18px;
}

.hero-text {
  text-align: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  display: flex;
  justify-content: center;
  margin-top: 28px;
  margin-bottom: 18px;
}

.logo img, .logo-img {
  width: 90px;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}


.sub { margin: 0; color: var(--muted); }

.pill {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #0f0f0f;
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
}

.grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 14px;
}

.panel {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
  padding: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.28);
}

.panelTitle {
  margin: 0 0 10px;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.tab {
  flex: 1;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0f0f0f;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.tab.active {
  background: #ffffff;
  color: #000;
  border-color: #fff;
}

.mode { margin-bottom: 10px; }
.hidden { display: none !important; }

.offlineBadge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.22);
  color: rgba(255,255,255,0.88);
  font-weight: 900;
  font-size: 12px;
}

.offlineBadge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  opacity: 0.85;
}

.offlineBadge.hidden { display: none; }

label { display: block; color: #d7d7d7; font-size: 13px; }

input {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel2);
  color: var(--text);
  outline: none;
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.primary {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: none;
  background: #ffffff;
  color: #000;
  font-weight: 900;
  cursor: pointer;
  margin-top: 4px;
}

.primary:disabled { opacity: 0.6; cursor: not-allowed; }

.status { margin: 10px 0 0; color: var(--muted); min-height: 18px; }

.result {
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #0f0f0f;
}

.result-layout {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  align-items: start;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-card {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.song-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.song-meta {
  flex: 1;
  min-width: 0;
}

.tracknotes-insight {
  margin-top: 24px;
  margin-bottom: 24px;
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.resultTop { display: flex; gap: 14px; align-items: center; }

.album-art {
  width: 120px;
  flex-shrink: 0;
}

.artwork {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.song-info {
  flex: 1;
  min-width: 0;
}

.meta { flex: 1; }

.songTitle { font-size: 20px; font-weight: 900; margin-bottom: 4px; }

.songSub { color: var(--muted); font-size: 13px; margin-bottom: 6px; }

.songAlbum { color: var(--muted2); font-size: 13px; }

.actions { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }

.linkBtn {
  display: inline-block;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #141414;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
}

.ghostBtn {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0f0f0f;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}

.divider { height: 1px; background: var(--border); margin: 14px 0; }
.sectionDivider { height: 1px; background: var(--border); margin: 20px 0; }

.sectionTitle {
  font-size: 14px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

.insight p { margin: 0 0 10px; color: #e9e9e9; line-height: 1.45; }

.sources ul { margin: 8px 0 0 18px; }
.sources li { margin: 6px 0; }
.sources a { color: #4da6ff; text-decoration: none; }
.sources a:hover { text-decoration: underline; }

.vinylSection {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.vinylHeader {
  font-weight: 800;
  margin-bottom: 10px;
}

.vinylCard {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.vinylTitle {
  font-weight: 700;
  margin-bottom: 4px;
}

.vinylSub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.vinylBtn {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  text-decoration: none;
  font-weight: 600;
}

.bookSection {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.bookHeader {
  font-weight: 800;
  margin-bottom: 12px;
}

.bookCard {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.bookImg {
  width: 90px;
  border-radius: 8px;
}

.bookInfo {
  flex: 1;
}

.bookTitle {
  font-weight: 700;
  margin-bottom: 4px;
}

.bookAuthor {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.bookBtn {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  text-decoration: none;
  font-weight: 600;
}

.favHeader { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.favList.empty, .topTracks.empty { padding: 8px 0; }

.favItem {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #0f0f0f;
  margin-bottom: 10px;
}

.favTitle { font-weight: 900; }
.favSub { color: var(--muted2); font-size: 12px; margin-top: 4px; }

.favBtns { display: flex; flex-direction: column; gap: 8px; }

.tinyBtn {
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #141414;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  font-size: 12px;
}

.tinyBtn.danger { background: #240f0f; }

.topItem {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #0f0f0f;
  margin-bottom: 10px;
}

.topTitle { color: #e9e9e9; font-weight: 800; font-size: 12px; line-height: 1.2; }
.topCount { color: var(--muted); font-weight: 900; }

.muted { color: var(--muted); }

.foot { margin-top: 14px; color: var(--muted2); font-size: 12px; text-align: center; }
.footerNote {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

/* ----- Skeleton shimmer ----- */
.skeletonLine {
  height: 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: linear-gradient(90deg, #0f0f0f 25%, #1a1a1a 50%, #0f0f0f 75%);
  background-size: 300% 100%;
  animation: shimmer 1.2s infinite;
  margin: 10px 0;
}

.skeletonLine.short { width: 70%; }

.skeletonBox {
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.08);
  width: 88px;
  height: 88px;
}

@keyframes shimmer {
  0% { background-position: 0% 0; }
  100% { background-position: 100% 0; }
}

.actionsRow {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.clipHint {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.clipHint.hidden {
  display: none;
}

.clipHintText {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

#recPreview { margin-top: 10px; }
#recPreview.hidden { display: none; }
#recPreview audio { width: 100%; margin-top: 6px; }

/* --- Confidence + citation badge --- */
.confWrap {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #141414;
  font-weight: 900;
  font-size: 12px;
  color: #fff;
}

.badgeDot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
}

.note {
  color: var(--muted);
  font-size: 12px;
}

/* -----------------------------
   Mobile Optimisation
------------------------------*/
@media (max-width: 768px) {

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

  .hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }

  .brand {
    gap: 10px;
    justify-content: center;
  }


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

  .artwork {
    width: 120px;
    height: 120px;
  }

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

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .actionsRow {
    flex-direction: column;
  }

  .actionsRow .primary,
  .actionsRow .ghostBtn {
    width: 100%;
  }

}

/* ================================
   TrackNotes — Apple Clean UI Pack
==================================*/

:root{
  --bg: #0b0c0f;
  --panel: rgba(255,255,255,0.06);
  --panel2: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.12);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.68);
  --muted2: rgba(255,255,255,0.55);
  --radius: 18px;
  --radius2: 14px;
  --shadow: 0 14px 40px rgba(0,0,0,0.40);
  --shadowSoft: 0 10px 24px rgba(0,0,0,0.25);
  --focus: rgba(255,255,255,0.18);
}

html, body {
  background: radial-gradient(1200px 700px at 20% 0%, rgba(255,255,255,0.08), transparent 55%),
              radial-gradient(900px 600px at 100% 20%, rgba(255,255,255,0.06), transparent 55%),
              var(--bg);
  color: var(--text);
}
body{ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

.wrap{ max-width: 1100px; margin: 0 auto; padding: 18px 16px 40px; }


.hero .sub{
  margin-top: 6px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: rgba(255,255,255,0.98);
}

.pill{ border: 1px solid var(--border); background: rgba(0,0,0,0.22); border-radius: 999px; padding: 10px 12px; font-size: 12px; color: var(--muted); }

.panel{ border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(180deg, var(--panel2), var(--panel)); box-shadow: var(--shadowSoft); padding: 16px; }
.panelTitle{ font-size: 14px; letter-spacing: -0.01em; margin: 0 0 12px; color: rgba(255,255,255,0.90); font-weight: 800; }

.grid{ display:grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
@media (max-width: 980px){ .grid{ grid-template-columns: 1fr; } }

label{ color: var(--muted); font-size: 12px; }
input{ width: 100%; margin-top: 6px; padding: 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.12); background: rgba(0,0,0,0.20); color: var(--text); outline: none; transition: border-color 140ms ease, background 140ms ease; }
input:focus{
  border-color: rgba(255,255,255,0.35);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.28);
}

.row2{ display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px){ .row2{ grid-template-columns: 1fr; } }

.tabs{ display:flex; gap: 8px; margin: 10px 0 14px; }
.hintLine{ margin-top: 6px; font-size: 12px; color: var(--muted); }
.tab{ border: 1px solid var(--border); background: rgba(0,0,0,0.18); color: var(--muted); padding: 10px 12px; border-radius: 999px; font-weight: 700; font-size: 12px; cursor: pointer; transition: transform 140ms ease, background 140ms ease, color 140ms ease; }
.tab:hover{ transform: translateY(-1px); }
.tab.active{ background: rgba(255,255,255,0.10); color: rgba(255,255,255,0.92); border-color: rgba(255,255,255,0.18); }

.primary{ border: 1px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.95); padding: 12px 14px; border-radius: 14px; font-weight: 800; cursor: pointer; transition: transform 140ms ease, background 140ms ease; }
.primary:hover{ transform: translateY(-1px); background: rgba(255,255,255,0.16); }
.ghostBtn{ border: 1px solid rgba(255,255,255,0.14); background: rgba(0,0,0,0.16); color: rgba(255,255,255,0.88); padding: 12px 14px; border-radius: 14px; font-weight: 700; cursor: pointer; transition: transform 140ms ease, background 140ms ease; }
.ghostBtn:hover{ transform: translateY(-1px); background: rgba(0,0,0,0.24); }
.actionsRow{ display:flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }

.top-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 25px;
}

.tab-button {
  padding: 12px 22px;
  font-size: 16px;
  border-radius: 25px;
  border: none;
  background: #f0f0f0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-button:hover {
  background: #e0e0e0;
}

.tab-button.active {
  background: black;
  color: white;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.listen-area {
  text-align: center;
}

.listen-wrapper {
  position: relative;
  width: 170px;
  height: 170px;
  margin: 0 auto;
}

.sound-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 3px solid rgba(0,0,0,0.2);
  z-index: 1;
  transition: transform 0.1s ease;
}

.listen-wrapper.listening .sound-ring {
  animation: ring-pulse 1.5s ease-out infinite;
  opacity: 1;
}

@keyframes ring-pulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

#listenButton {
  position: relative;
  z-index: 2;
}

#listenButton:hover {
  transform: scale(1.05);
}

#listenButton.listening {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0,0,0,0.5);
  }

  70% {
    transform: scale(1.08);
    box-shadow: 0 0 0 18px rgba(0,0,0,0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0,0,0,0);
  }
}

.searchPanel {
  max-width: 720px;
  margin: 24px auto;
  padding: 28px 20px 32px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(35,35,40,0.92), rgba(20,20,24,0.96));
  border: 1px solid rgba(255,255,255,0.08);
}

.searchHeader {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}

.searchHeaderTitle {
  background: #000;
  color: #fff;
  border-radius: 999px;
  padding: 12px 28px;
  font-size: 18px;
  font-weight: 700;
  display: inline-block;
}

.topRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.listen-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.listen-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.spotify-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 28px;
  margin-bottom: 18px;
}

.search-tagline {
  margin: 0 0 18px;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  opacity: 0.85;
  letter-spacing: 0.01em;
}

.manual-search {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.listen-card {
  padding: 28px 22px 24px;
  border-radius: 28px;
}

.hero-listen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

.record-disc {
  margin: 0;
}

.listen-subtext {
  margin: 0;
  text-align: center;
  font-size: 18px;
}

.quick-actions,
.secondary-actions,
.manual-search {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.quick-actions {
  margin-bottom: 24px;
}

.section-divider {
  border: 0;
  height: 1px;
  opacity: 0.15;
  background: #fff;
  margin: 0 0 26px;
}

.secondary-actions {
  margin-bottom: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tell-song-btn {
  width: 100%;
}

@media (max-width: 768px) {
  .quick-actions,
  .secondary-actions,
  .manual-search {
    grid-template-columns: 1fr;
  }
}

.ghostAction {
  background: rgba(255,255,255,0.06);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 16px 18px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
}

.searchHint {
  margin: 0 0 10px;
  color: #d5d5d5;
  font-size: 15px;
}

.fieldRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.fieldGroup label {
  display: block;
  margin-bottom: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.fieldGroup input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(0,0,0,0.28);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 16px 18px;
  font-size: 16px;
  outline: none;
}

.primaryWideBtn {
  width: 100%;
  background: rgba(255,255,255,0.14);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 18px 22px;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 24px;
}

.listen-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 28px auto 18px;
}

.listen-button {
  width: 220px;
  height: 220px;
  border: none;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #1c1c22, #050505 72%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.listen-button:hover,
.listen-button:active {
  transform: scale(1.03);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.48);
}

.listen-disc {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.listen-disc::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.08);
}

.listen-wave {
  position: absolute;
  width: 100%;
  height: 22px;
  top: 42px;
  left: 0;
  right: 0;
}

.listen-wave::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 50%;
  height: 4px;
  transform: translateY(-50%);
  background: white;
  clip-path: polygon(
    0% 50%, 18% 50%, 24% 50%,
    28% 15%, 32% 80%, 36% 28%,
    40% 50%, 60% 50%,
    64% 50%, 68% 25%, 72% 72%,
    76% 34%, 80% 50%, 100% 50%
  );
}

.listen-hole {
  position: absolute;
  top: 34px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: white;
}

.listen-hole::after {
  content: "";
  position: absolute;
  inset: 15px;
  border-radius: 50%;
  background: #000;
}

.listen-text {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.05;
}

.listen-caption {
  margin-top: 16px;
  color: rgba(255,255,255,0.88);
  font-size: 16px;
  font-weight: 500;
  text-align: center;
}

@keyframes listenGlow {
  0% {
    box-shadow: 0 0 0 rgba(120,120,255,0);
  }

  50% {
    box-shadow: 0 0 25px rgba(120,120,255,0.6);
  }

  100% {
    box-shadow: 0 0 0 rgba(120,120,255,0);
  }
}

.listen-button.listening {
  animation: listenGlow 1.6s ease-in-out infinite;
}

.artistLink {
  color: #9ecbff;
  text-decoration: none;
  font-weight: 600;
}
.artistLink:hover {
  text-decoration: underline;
}

.whyFamous {
  font-style: italic;
  color: #c8d8f0;
  margin: 4px 0 16px;
  font-size: 15px;
  line-height: 1.5;
}

.storySection {
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.6;
}

.listen-help {
  margin-top: 12px;
  color: #a8a8a8;
  font-size: 14px;
}

.actionRow {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.secondaryBtn {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 14px 22px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 700px) {
  .topRow,
  .fieldRow {
    grid-template-columns: 1fr;
  }

  .listen-btn {
    min-width: 0;
    width: 100%;
  }
}

.listenDivider {
  width: 100%;
  border: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin: 4px 0;
}

.lastFound {
  width: 100%;
  text-align: center;
}

.lastFoundLabel {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 6px;
}

.lastFoundTrack {
  font-size: 17px;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
}

.lastFoundArtist {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  margin-top: 2px;
}

.tinyBtn{ border: 1px solid rgba(255,255,255,0.14); background: rgba(0,0,0,0.20); color: rgba(255,255,255,0.90); padding: 8px 10px; border-radius: 12px; font-weight: 700; font-size: 12px; cursor: pointer; }
.tinyBtn:hover{ background: rgba(0,0,0,0.28); }
.tinyBtn.danger{ border-color: rgba(255,255,255,0.10); color: rgba(255,255,255,0.82); opacity: 0.9; }

.status{ margin-top: 10px; color: var(--muted); font-size: 13px; }
.divider{ height: 1px; background: rgba(255,255,255,0.10); margin: 16px 0; }

.result{ margin-top: 14px; border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius); background: rgba(0,0,0,0.18); padding: 14px; }
.resultTop{ display:flex; gap: 14px; align-items:flex-start; }
.artwork{ width: 88px; height: 88px; border-radius: 16px; object-fit: cover; border: 1px solid rgba(255,255,255,0.10); box-shadow: 0 8px 18px rgba(0,0,0,0.28); }
.meta{ flex: 1; min-width: 0; }
.songTitle{ font-size: 18px; font-weight: 900; letter-spacing: -0.02em; margin-bottom: 4px; }
.songSub, .songAlbum{ color: var(--muted); font-size: 13px; line-height: 1.35; }
.actions{ display:flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.linkBtn{ display:inline-flex; align-items:center; justify-content:center; text-decoration:none; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.95); font-weight: 800; }

.sectionTitle{ font-size: 13px; letter-spacing: -0.01em; color: rgba(255,255,255,0.90); margin: 0 0 10px; font-weight: 900; }
.insight p{ margin: 10px 0; color: rgba(255,255,255,0.90); line-height: 1.5; font-size: 14px; }
.insight strong{ color: rgba(255,255,255,0.96); }
.muted{ color: var(--muted); }
.sources ul{ margin: 8px 0 0; padding-left: 18px; }
.sources a{ color: rgba(255,255,255,0.92); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

aside.panel{ position: sticky; top: 14px; align-self: start; }
.favHeader{ display:flex; align-items:center; justify-content:space-between; gap: 10px; }
.favList, .topTracks{ display:flex; flex-direction: column; gap: 10px; }
.favItem, .topItem{ border: 1px solid rgba(255,255,255,0.12); background: rgba(0,0,0,0.16); border-radius: 14px; padding: 12px; }
.favTitle, .topTitle{ font-weight: 800; font-size: 13px; letter-spacing: -0.01em; }
.favSub{ color: var(--muted); font-size: 12px; margin-top: 4px; line-height: 1.35; }
.favBtns{ display:flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.topCount{ margin-top: 6px; color: var(--muted); font-size: 12px; }

.confWrap{ display:flex; gap: 10px; align-items:center; flex-wrap: wrap; margin-bottom: 10px; }
.badge{ display:inline-flex; align-items:center; gap: 8px; padding: 8px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.14); background: rgba(0,0,0,0.16); font-weight: 800; font-size: 12px; color: rgba(255,255,255,0.92); }
.badgeDot{ width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.85); }
.note{ color: var(--muted); font-size: 12px; margin-top: 6px; }

.personalSection{
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.10);
}

.personalHeader{
  font-weight: 900;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.noteBox{
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.16);
  color: rgba(255,255,255,0.92);
  padding: 12px;
  resize: vertical;
}

.tagsBox{
  width: 100%;
  margin-top: 4px;
}

.bookSection, .vinylSection{ margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.10); }
.bookHeader, .vinylHeader{ font-weight: 900; margin-bottom: 10px; letter-spacing: -0.01em; }
.bookCard{ display:flex; gap: 14px; align-items:flex-start; border: 1px solid rgba(255,255,255,0.12); background: rgba(0,0,0,0.16); border-radius: 16px; padding: 12px; }
.bookImg{ width: 86px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.10); }
.bookTitle{ font-weight: 900; margin-bottom: 4px; }
.bookAuthor{ font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.bookBtn, .vinylBtn{ display:inline-flex; align-items:center; justify-content:center; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.10); text-decoration:none; font-weight: 800; color: rgba(255,255,255,0.92); }
.bookBtn:hover, .vinylBtn:hover{ background: rgba(255,255,255,0.14); }
.vinylCard{ border: 1px solid rgba(255,255,255,0.12); background: rgba(0,0,0,0.16); border-radius: 16px; padding: 12px; }
.vinylTitle{ font-weight: 900; margin-bottom: 4px; }
.vinylSub{ color: var(--muted); font-size: 12px; margin-bottom: 10px; }

.clipHint{ margin-top: 10px; padding: 10px 12px; border: 1px solid rgba(255,255,255,0.12); border-radius: 16px; display:flex; align-items:center; justify-content:space-between; gap: 12px; background: rgba(0,0,0,0.16); }
.clipHint.hidden{ display:none; }
.clipHintText{ color: var(--muted); font-size: 12px; line-height: 1.3; }

.foot, .footerNote{ margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.10); color: var(--muted2); font-size: 12px; }

@media (max-width: 768px){
  .panel{ padding: 14px; }
  aside.panel{ position: static; }
}

.skeletonLine{ height: 12px; border-radius: 999px; background: rgba(255,255,255,0.10); margin: 10px 0; }

.favFilters{
  margin: 10px 0 12px;
  display:flex;
  flex-direction: column;
  gap: 10px;
}

.favSearch{
  width: 100%;
}

.tagChips{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip{
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.16);
  color: rgba(255,255,255,0.82);
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}

.chip:hover{
  background: rgba(0,0,0,0.24);
}

.chip.active{
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.95);
}

.chipClear{
  opacity: 0.9;
}

#copyCardBtn{
  white-space: nowrap;
}

/* Share Card header */
.shareHeader{
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.16);
  border-radius: 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}

.shareHeader.hidden{ display:none; }

.shareHeader .left{
  display:flex;
  flex-direction:column;
  gap: 4px;
}

.shareHeader .kicker{
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  font-weight: 700;
}

.shareHeader .ctaRow{
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.shareBtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.10);
  text-decoration:none;
  font-weight: 800;
  color: rgba(255,255,255,0.92);
  cursor:pointer;
}

.shareBtn:hover{ background: rgba(255,255,255,0.14); }

/* Typeahead suggestions */
.suggest{
  margin-top: 6px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.18);
  border-radius: 14px;
  overflow: hidden;
}

.suggest.hidden{ display:none; }

.suggestItem{
  padding: 10px 12px;
  cursor: pointer;
  display:flex;
  flex-direction: column;
  gap: 2px;
}

.suggestItem:hover{
  background: rgba(255,255,255,0.06);
}

.suggestItem.active{
  background: rgba(255,255,255,0.10);
}

.suggestMain{
  font-weight: 800;
  font-size: 13px;
}

.suggestSub{
  font-size: 12px;
  color: rgba(255,255,255,0.65);
}

/* Tagline animation (subtle Apple-style) */
.hero .sub{
  opacity: 0;
  transform: translateY(6px);
  animation: taglineIn 520ms ease-out 120ms forwards;
}

@keyframes taglineIn{
  to{
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce){
  .hero .sub{
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.exploreMore {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.10);
}

.exploreMore.hidden { display: none; }

.exploreHeader {
  font-weight: 900;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.exploreList {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exploreItem {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.16);
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
}

.exploreItem:hover {
  background: rgba(0,0,0,0.22);
}

.exploreTitle {
  font-weight: 900;
  font-size: 13px;
}

.exploreSub {
  margin-top: 4px;
  color: rgba(255,255,255,0.65);
  font-size: 12px;
  line-height: 1.3;
}

/* Loading Screen */
#loadingScreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0b0b0b;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  color: white;
  font-family: Arial, sans-serif;
}

.loader-box {
  text-align: center;
}

.wave {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 50px;
  margin-bottom: 20px;
}

.wave span {
  display: block;
  width: 6px;
  height: 20px;
  margin: 0 4px;
  background: #1db954;
  border-radius: 3px;
  animation: waveAnim 1s infinite ease-in-out;
}

.wave span:nth-child(2) { animation-delay: 0.1s; }
.wave span:nth-child(3) { animation-delay: 0.2s; }
.wave span:nth-child(4) { animation-delay: 0.3s; }
.wave span:nth-child(5) { animation-delay: 0.4s; }

@keyframes waveAnim {
  0%, 100% { height: 20px; }
  50%       { height: 50px; }
}

#loadingMessage {
  opacity: 0.8;
  font-size: 16px;
}

/* Hero Landing Section */
section.hero {
  padding: 100px 20px 80px;
  text-align: center;
  background: radial-gradient(circle at top, #1c1c1c, #0b0b0b);
  color: white;
}

section.hero h1 {
  font-size: 48px;
  margin-bottom: 16px;
  font-weight: 700;
}

section.hero p {
  max-width: 640px;
  margin: auto;
  font-size: 18px;
  opacity: 0.85;
  line-height: 1.6;
}

.hero-actions {
  margin-top: 30px;
}

section.hero button {
  background: #1db954;
  border: none;
  padding: 16px 28px;
  font-size: 16px;
  border-radius: 10px;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

section.hero button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.35);
}

/* Song Insight Card */
.insight-card {
  max-width: 760px;
  margin: 30px auto;
  background: linear-gradient(180deg, #181818 0%, #101010 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  padding: 24px;
  color: #fff;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}

.insight-header {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
}

.album-art-wrap {
  width: 120px;
  min-width: 120px;
  height: 120px;
  border-radius: 18px;
  overflow: hidden;
  background: #222;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.album-art-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.insight-main {
  flex: 1;
}

.insight-label {
  font-size: 12px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #1db954;
  margin: 0 0 8px;
}

#insightTitle {
  font-size: 32px;
  line-height: 1.1;
  margin: 0 0 8px;
}

.insight-artist {
  font-size: 18px;
  color: #d9d9d9;
  margin: 0 0 8px;
}

.insight-meta {
  font-size: 14px;
  color: #9a9a9a;
  margin: 0;
}

.insight-body {
  display: grid;
  gap: 18px;
}

.insight-section {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 18px;
  padding: 18px;
}

.insight-section h3 {
  margin: 0 0 10px;
  font-size: 16px;
  color: #fff;
}

.insight-section p {
  margin: 0;
  color: #d7d7d7;
  line-height: 1.6;
  font-size: 15px;
}

.fact-box {
  background: rgba(29,185,84,0.08);
  border: 1px solid rgba(29,185,84,0.18);
}

.insight-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.insight-btn {
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.insight-btn:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.primary-btn {
  background: #1db954;
  color: #fff;
}

.secondary-btn {
  background: #2a2a2a;
  color: #fff;
}

@media (max-width: 640px) {
  .insight-card {
    padding: 18px;
    border-radius: 18px;
  }

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

  .album-art-wrap {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  #insightTitle {
    font-size: 26px;
  }

  .insight-actions {
    flex-direction: column;
  }

  .insight-btn {
    width: 100%;
  }
}
