/* ===========================================================================
   North Link: public share page
   ---------------------------------------------------------------------------
   One card, centred, nothing else. This page is opened by someone who was sent
   a link. Usually on a phone, usually while doing something else. It has to
   load fast and make the play button obvious within a second.
   =========================================================================== */

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  /* Faint forest wash so the page has atmosphere without an image request. */
  background:
    radial-gradient(60% 45% at 50% 0%, var(--ambient-1), transparent 70%),
    var(--bg);
}

.nl {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}

.nl__card {
  width: 100%;
  max-width: 420px;
  padding: var(--space-8);
  border-radius: var(--radius-xl);
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: nw-pop var(--dur-slow) var(--ease-out);
}
.nl__card--wide { max-width: 560px; }
.nl__card--message { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); }

/* --- Artwork -------------------------------------------------------------- */

.nl__art {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  object-fit: cover;
  background: var(--surface-2);
  margin-bottom: var(--space-6);
}
.nl__art--empty {
  display: grid;
  place-items: center;
  color: var(--text-quaternary);
  font-size: 38px;
}
.nl__art--md { width: 108px; aspect-ratio: 1; margin-bottom: 0; flex: none; }
.nl__art--round { width: 108px; margin-inline: auto; border-radius: 50%; }

/* --- Meta ----------------------------------------------------------------- */

.nl__meta { margin-bottom: var(--space-6); }
.nl__meta--left { text-align: left; min-width: 0; }

.nl__title {
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.25;
  /* Long ambient track titles are the norm; clamp rather than truncate so two
     lines still read. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nl__artist { font-size: var(--text-sm); color: var(--text-tertiary); margin-top: var(--space-2); }
.nl__count  { font-size: var(--text-xs); color: var(--text-quaternary); margin-top: var(--space-2); }

/* --- Note from the artist ------------------------------------------------- */

.nl__note-box {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  margin-bottom: var(--space-6);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  text-align: left;
}
.nl__note-box i { color: var(--text-quaternary); font-size: 11px; margin-top: 4px; flex: none; }
.nl__note-box p { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.55; }

/* --- Player --------------------------------------------------------------- */

.nl__player {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.nl__play {
  width: 52px; height: 52px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 16px;
  transition: transform var(--dur-fast) var(--ease-spring), background var(--dur-fast) var(--ease-out);
}
.nl__play:hover  { background: var(--accent-hover); transform: scale(1.05); }
.nl__play:active { transform: scale(0.97); }
/* Optical centring: a play triangle looks left-heavy when geometrically centred. */
.nl__play .fa-play { margin-left: 3px; }

.nl__scrub { flex: 1; min-width: 0; }

.nl__wave { width: 100%; height: 48px; display: block; cursor: pointer; }

.nl__bar {
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  cursor: pointer;
  overflow: hidden;
}
.nl__bar-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: inherit;
  transition: width 100ms linear;
}

.nl__times {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-2);
  font-size: 11px;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}

/* --- Actions -------------------------------------------------------------- */

.nl__actions { display: flex; gap: var(--space-2); justify-content: center; }

/* --- Release ------------------------------------------------------------- */

.nl__release-head {
  display: flex;
  gap: var(--space-5);
  align-items: center;
  margin-bottom: var(--space-6);
  text-align: left;
}

.nl__tracklist {
  list-style: none;
  margin: 0 0 var(--space-6);
  padding: 0;
  text-align: left;
}

.nl__track {
  display: grid;
  grid-template-columns: 22px 34px 1fr auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
}
.nl__track:hover { background: var(--surface-2); }
.nl__track.is-playing { background: var(--accent-tint); }

.nl__track-num {
  font-size: var(--text-xs);
  color: var(--text-quaternary);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.nl__track-play {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-secondary);
  font-size: 10px;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.nl__track:hover .nl__track-play { background: var(--accent); color: var(--accent-fg); }
.nl__track.is-playing .nl__track-play { background: var(--accent); color: var(--accent-fg); }

.nl__track-title {
  font-size: var(--text-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nl__track-time {
  font-size: var(--text-xs);
  color: var(--text-quaternary);
  font-variant-numeric: tabular-nums;
}

/* --- Footer --------------------------------------------------------------- */

.nl__foot {
  padding: var(--space-6);
  text-align: center;
}
.nl__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-quaternary);
  transition: color var(--dur-fast) var(--ease-out);
}
.nl__brand:hover { color: var(--text-secondary); }
.nl__brand img { opacity: 0.7; }
.nl__brand strong { color: var(--text-tertiary); font-weight: 600; }

/* --- Responsive ----------------------------------------------------------- */

@media (max-width: 480px) {
  .nl { padding: var(--space-4); align-items: flex-start; padding-top: var(--space-8); }
  .nl__card { padding: var(--space-5); }
  .nl__title { font-size: var(--text-lg); }
  .nl__play { width: 46px; height: 46px; font-size: 14px; }

  .nl__release-head { flex-direction: column; text-align: center; gap: var(--space-4); }
  .nl__meta--left { text-align: center; }
  .nl__art--md { width: 132px; }
}
