:root {
  --bg-deep: #010420;
  --bg-mid: #030c3a;
  --bg-glow: #07185e;
  --ink: #eaf3ff;
  --muted: #7d98c6;
  --cyan: #6fd4ff;
  --blue: #3f7dff;
  --hairline: rgba(120, 190, 255, 0.26);
  --glass: rgba(4, 14, 62, 0.55);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

body {
  background: radial-gradient(ellipse 85% 75% at 64% 50%, var(--bg-glow) 0%, var(--bg-mid) 42%, var(--bg-deep) 100%) fixed, var(--bg-deep);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

#flow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Back: frosted circle, same material as the player */
.back {
  position: fixed;
  top: 14px;
  left: clamp(16px, 3vw, 48px);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background: rgba(250, 250, 252, 0.9);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18), 0 1px 2px rgba(0, 0, 0, 0.08);
  color: #3a3a3c;
  cursor: pointer;
  z-index: 4;
  transition: opacity 0.25s, transform 0.25s;
}
.back svg { width: 22px; height: 22px; }
.back:hover { transform: scale(1.05); }
.back:active { transform: scale(0.94); }
.back:focus-visible { outline: 2px solid rgba(0, 122, 255, 0.6); outline-offset: 3px; }
.back[hidden] {
  display: grid;
  opacity: 0;
  transform: scale(0.85);
  visibility: hidden;
  transition: opacity 0.25s, transform 0.25s, visibility 0s 0.25s;
}

/* Logo: same size and spot as the back button; shown on the home screen, where Back is hidden */
.logo {
  position: fixed;
  top: 14px;
  left: clamp(16px, 3vw, 48px);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 0.5px solid rgba(255, 255, 255, 0.55);
  background: rgba(250, 250, 252, 0.9);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18), 0 1px 2px rgba(0, 0, 0, 0.08);
  color: #3a3a3c;  /* same as the back button's chevron */
  z-index: 3;
  transition: opacity 0.25s, transform 0.25s;
}
.logo svg { width: 22px; height: 22px; }
.back:not([hidden]) ~ .logo { opacity: 0; transform: scale(0.85); }

/* Get Premium: same frosted material and rounding as the back button */
.premium {
  position: fixed;
  top: 14px;
  right: clamp(16px, 3vw, 48px);
  width: 180px;
  height: 44px;
  padding: 0 22px;
  border: 0.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 22px;
  background: rgba(250, 250, 252, 0.9);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18), 0 1px 2px rgba(0, 0, 0, 0.08);
  color: #1d1d1f;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  z-index: 4;
  transition: transform 0.2s, background-color 0.2s;
}
.premium:hover { background: #fff; transform: scale(1.03); }
.premium:active { transform: scale(0.97); }
.premium:focus-visible { outline: 2px solid rgba(0, 122, 255, 0.6); outline-offset: 3px; }

/* The "APOLYO" wordmark: one style for the header and the Premium modal */
.wordmark {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.85;
  text-shadow: 0 0 18px rgba(80, 160, 255, 0.7);
}
.brand {
  position: fixed;
  top: 28px;
  left: calc(clamp(16px, 3vw, 48px) + 60px);
}

.hint {
  position: fixed;
  left: clamp(16px, 3vw, 48px);
  bottom: 20px;
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  opacity: 0.7;
}
.has-player .hint { display: none; }
.hint kbd {
  font: inherit;
  padding: 1px 5px;
  border: 1px solid var(--hairline);
  border-radius: 4px;
}

/* ---------- search ---------- */
.search {
  position: fixed;
  left: clamp(16px, 3vw, 48px);
  top: 50%;
  transform: translateY(-50%);
  width: clamp(150px, 22vw, 320px);
  z-index: 2;
}
.search input {
  width: 100%;
  height: 48px;
  padding: 0 46px 0 42px;  /* room for the search icon (left) and layout switch (right) */
  border-radius: 24px;
  border: 0;
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  outline: none;
  box-shadow: inset 0 0 22px rgba(60, 120, 255, 0.08);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus {
  border-color: rgba(111, 212, 255, 0.7);
  box-shadow: 0 0 28px rgba(63, 125, 255, 0.35), inset 0 0 22px rgba(60, 120, 255, 0.12);
}
.search > svg {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  z-index: 1;
}
.empty {
  position: absolute;
  top: 60px;
  left: 18px;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- node labels ---------- */
#labels {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.node {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 8px 4px 6px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0;
  will-change: transform, opacity;
  transition: background-color 0.2s;
}
.node:hover, .node:focus-visible {
  background: rgba(80, 150, 255, 0.08);
  outline: none;
}
.node:focus-visible { box-shadow: 0 0 0 1px rgba(111, 212, 255, 0.55); }
.node.is-gone { pointer-events: none; }
/* Live artist / album whose data is still being fetched */
.node.is-loading .node__meta::after {
  content: " · loading";
  animation: loading-pulse 1s ease-in-out infinite alternate;
}
@keyframes loading-pulse { from { opacity: 0.35; } to { opacity: 1; } }

.node__name {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #eef5ff;
  text-shadow: 0 0 14px rgba(80, 160, 255, 0.55);
}
.node__meta {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.node--album .node__name { font-size: 14px; }
.node--album .node__name { font-weight: 300; }
/* Artist names use the genre labels' weight */
.node--artist .node__name,
.node--similar .node__name { font-weight: 600; }

.node--track {
  flex-direction: row;
  align-items: baseline;
  gap: 10px;
  padding: 2px 8px 2px 6px;
}
.node--track .node__num {
  width: 16px;
  font-size: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.node--track .node__name { font-size: 13px; font-weight: 600; }
.node--track .node__meta {
  letter-spacing: 0.04em;
  text-transform: none;
  font-variant-numeric: tabular-nums;
}

/* Category hubs: Albums, Bio, Tours, Movies, News */
.node--category .node__name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.node--category.is-empty { cursor: default; opacity: 0.55; }
.node--category.is-empty:hover { background: none; }
.node--category.is-empty .node__meta { font-style: italic; }
.node--category .node__meta {
  letter-spacing: 0.04em;
  text-transform: none;
}

/* Artists: circular photo beside the name */
.node--has-avatar {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding-left: 4px;
}
.node__avatar {
  flex: none;
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.85);
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.45),
    0 0 22px rgba(60, 130, 255, 0.22);
  transition: box-shadow 0.25s;
}
.node__avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: avatar-in 0.4s ease-out;
}
@keyframes avatar-in { from { opacity: 0; } }

/* Cover art thumbnails on albums and singles */
.node--has-art {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding-left: 4px;
}
.node__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.node__art {
  flex: none;
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 7px;
  object-fit: cover;
  background: #0b1540;
  box-shadow:
    0 0 0 0.5px rgba(255, 255, 255, 0.16),
    0 6px 16px rgba(0, 0, 0, 0.45),
    0 0 22px rgba(60, 130, 255, 0.22);
}
.node--single .node__art,
.node--song .node__art { width: 36px; height: 36px; border-radius: 5px; }
.node--song .node__name { font-size: 13.5px; font-weight: 400; }
.node--song .node__meta { letter-spacing: 0.04em; text-transform: none; }
.node--song.is-playing .node__meta { color: var(--cyan); }

/* Albums: large cover card, title beneath. --art is set by layout (150px max). */
.node--album.node--has-art {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: max(calc(var(--art, 150px) + 8px), 158px);  /* titles stay readable when covers shrink */
  white-space: normal;
}
.node--album .node__art {
  width: var(--art, 150px);
  height: var(--art, 150px);
  border-radius: 10px;
}
.node--album .node__text { max-width: 100%; }
.node--album .node__meta { white-space: nowrap; }
.node--album .node__name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  overflow: hidden;
}
.node.is-selected .node__art {
  box-shadow:
    0 0 0 1px rgba(111, 212, 255, 0.7),
    0 6px 16px rgba(0, 0, 0, 0.45),
    0 0 26px rgba(80, 180, 255, 0.55);
}

/* Tours: clickable rows that fan out to a details card and two actions */
.node--tour .node__name { font-size: 13.5px; font-weight: 400; }
.node--tour .node__meta { letter-spacing: 0.06em; text-transform: none; }

.node--tourinfo {
  width: 260px;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: rgba(6, 18, 70, 0.6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  white-space: normal;
  cursor: default;
}
.node--tourinfo:hover { background: rgba(6, 18, 70, 0.6); }
.node--tourinfo .node__name { font-size: 15px; font-weight: 400; margin-bottom: 2px; }
.node__row { display: grid; grid-template-columns: 62px 1fr; gap: 8px; font-size: 12.5px; }
.node__label {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 2px;
}
.node__value { color: #d8e6fb; }
.node__value.is-live { color: #7dffb2; }
.node__value.is-past { color: var(--muted); }

.node--action {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-width: 150px;
  padding: 9px 18px 9px 14px;
  border-radius: 999px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
  text-decoration: none;
  transition: transform 0.15s, background-color 0.2s, box-shadow 0.2s;
}
.node--action .node__name { font-size: 13.5px; font-weight: 600; text-shadow: none; letter-spacing: 0; }
.node__icon { display: grid; place-items: center; width: 18px; height: 18px; }
.node__icon svg { width: 18px; height: 18px; }
.node--action:active { transform: scale(0.96); }
/* Both actions use the same hollow outline style */
.node--tickets,
.node--remind {
  border: 1px solid rgba(160, 210, 255, 0.45);
  background: rgba(8, 24, 80, 0.55);
  color: var(--ink);
}
.node--tickets:hover,
.node--remind:hover { background: rgba(40, 90, 200, 0.35); }
.node--remind.is-on {
  border-color: rgba(111, 212, 255, 0.9);
  background: rgba(63, 125, 255, 0.35);
  box-shadow: 0 0 18px rgba(80, 180, 255, 0.45);
}
.node--remind.is-on .node__icon svg { fill: currentColor; }
.node.is-selected.node--tickets .node__name,
.node.is-selected.node--remind .node__name { text-shadow: none; }

/* Collabs: compact rows so several columns fit side by side */
.node--collab { max-width: 290px; }
.node--collab .node__text { min-width: 0; }
.node--collab .node__name,
.node--collab .node__meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Singles: playable, title-first with year · peak · duration */
.node--single .node__name { font-size: 13.5px; font-weight: 400; }
.node--single .node__meta {
  letter-spacing: 0.04em;
  text-transform: none;
  font-variant-numeric: tabular-nums;
}
.node--single.is-playing .node__meta { color: var(--cyan); }

/* Leaf items: bio facts, tours, movies, news */
.node--item { cursor: default; }
.node--item .node__name { font-size: 13.5px; font-weight: 400; }
.node--item .node__meta { letter-spacing: 0.06em; text-transform: none; }
.node--fact .node__meta {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.node--wrap { width: 300px; white-space: normal; }
.node--wrap .node__name {
  font-size: 13px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}
.node--fact.node--wrap .node__name {
  -webkit-line-clamp: 8;
  line-clamp: 8;
  color: #d8e6fb;
  text-shadow: none;
}
.node--link {
  cursor: pointer;
  text-decoration: none;
}
.node--link .node__meta::after {
  content: " ↗";
  opacity: 0;
  transition: opacity 0.2s;
}
.node--link:hover .node__meta::after,
.node--link:focus-visible .node__meta::after { opacity: 1; }
.node--link:hover .node__name { color: #fff; }

.node.is-selected .node__name {
  color: #fff;
  text-shadow: 0 0 16px rgba(111, 212, 255, 0.95);
}
.node.is-playing .node__num { color: var(--cyan); }

/* ---------- player: frosted-glass pill ---------- */
.player {
  --p-ink: #1d1d1f;
  --p-dim: #8a8a8e;
  --p-track: rgba(0, 0, 0, 0.14);
  --p-fill: rgba(0, 0, 0, 0.5);
  --p-red: #fa2d48;
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(700px, calc(100vw - 32px));
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 18px 0 20px;
  border-radius: 999px;
  border: 0.5px solid rgba(255, 255, 255, 0.55);
  background: rgba(250, 250, 252, 0.9);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.18),
    0 1px 2px rgba(0, 0, 0, 0.08),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.9);
  color: var(--p-ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", sans-serif;
  z-index: 3;
  animation: player-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.player[hidden] { display: none; }
@keyframes player-in {
  from { opacity: 0; transform: translate(-50%, 14px); }
}

.player__btn {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--p-ink);
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s, color 0.15s;
}
.player__btn:hover { opacity: 0.7; }
.player__btn:active { transform: scale(0.92); }
.player__btn:focus-visible { outline: 2px solid rgba(0, 122, 255, 0.6); outline-offset: 3px; }
.player__btn svg { display: block; }

.player__controls { display: flex; align-items: center; gap: 12px; flex: none; }
.player__btn--toggle { width: 26px; height: 26px; color: var(--p-dim); }
.player__btn--toggle svg { width: 18px; height: 18px; }
.player__btn--toggle[aria-pressed="true"] { color: var(--p-red); }
.player__btn--skip { width: 30px; height: 28px; }
.player__btn--skip svg { width: 28px; height: 22px; }
.player__btn--play { width: 34px; height: 34px; }
.player__btn--play svg { width: 26px; height: 30px; }
.player .icon-play { display: none; }
.player.is-paused .icon-play { display: block; }
.player.is-paused .icon-pause { display: none; }

.player__now {
  flex: 1 1 auto;
  max-width: 740px;
  min-width: 0;
  display: grid;
  grid-template-columns: 42px 1fr;
  grid-template-rows: 42px 3px;
  column-gap: 14px;
  row-gap: 5px;
  align-items: center;
  padding-top: 8px;
}
.player__art {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #2b2b2e;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
/* Art and title go to where the song is playing from */
.player__art:hover { transform: scale(1.06); box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.18), 0 4px 14px rgba(0, 0, 0, 0.35); }
.player__art:active { transform: scale(0.96); }
.player__art:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.player__go { cursor: pointer; }
.player__go:hover { text-decoration: underline; text-underline-offset: 2px; }
.player__text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.player__title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player__sub {
  font-size: 14.5px;
  font-weight: 400;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player__bar {
  grid-column: 1 / -1;
  height: 3px;
  border-radius: 3px;
  background: var(--p-track);
  overflow: hidden;
  cursor: pointer;
}
.player__fill {
  height: 100%;
  border-radius: inherit;
  background: var(--p-fill);
  transform-origin: left;
  transform: scaleX(0);
}

.player__extras { display: flex; align-items: center; gap: 4px; flex: none; }
.player__badge { color: #c4c4c7; display: grid; place-items: center; margin-right: 2px; }
.player__badge svg { width: 22px; height: 22px; }
.player__btn--icon { width: 30px; height: 30px; }
.player__btn--icon svg { width: 20px; height: 20px; }
.player__btn--wide { margin-left: 2px; }
.player__btn--airplay { color: var(--p-red); }
.player .icon-mute { display: none; }
.player.is-muted .icon-mute { display: block; }
.player.is-muted .icon-vol { display: none; }

/* Full icon set fits at 700px; on narrower windows drop the secondary icons, keeping volume. */
@media (max-width: 760px) {
  .player__badge,
  .player__extras > .player__btn:not(#player-volume) { display: none; }
}

@media (max-width: 700px) {
  .node__name { font-size: 13px; }
  .node--album .node__name { font-size: 12.5px; }
  .node--track .node__name { font-size: 12px; }
  .node__meta { font-size: 9.5px; }
  .node--wrap { width: 220px; }
  .node__avatar { width: 40px; height: 40px; font-size: 12px; }
  .node--single .node__art { width: 38px; height: 38px; }
  .node--single .node__art { width: 30px; height: 30px; }
  .search, .flow-down .search {
    top: 60px;
    left: 16px;
    right: 16px;
    width: auto;
    transform: none;
  }
  .search input { height: 46px; font-size: 14px; }
  .hint { display: none; }
  .player { height: 60px; gap: 14px; padding: 0 18px 0 16px; bottom: 12px; }
  .player__btn--toggle, .player__extras { display: none; }
  .player__controls { gap: 12px; order: 2; }
  .player__now { grid-template-columns: 38px 1fr; grid-template-rows: 38px 3px; column-gap: 10px; }
  .player__art { width: 38px; height: 38px; }
  .player__title { font-size: 14px; }
  .player__sub { font-size: 13px; }
}

/* ---------- Premium plan modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 16px;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 4, 24, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.2s;
}
.plan {
  --accent: #8ccfff;
  position: relative;
  width: min(440px, 100%);
  padding: 28px 30px 22px;
  border-radius: 18px;
  background: #212126;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 0.5px rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.2s, transform 0.2s;
}
.modal.is-open .modal__backdrop { opacity: 1; }
.modal.is-open .plan { opacity: 1; transform: none; }

.plan__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}
.plan__close svg { width: 16px; height: 16px; }
.plan__close:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }

.plan__brand { display: flex; align-items: center; gap: 14px; }
/* Same size, material and line M as the header logo */
.plan__mark {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background: rgba(250, 250, 252, 0.9);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18), 0 1px 2px rgba(0, 0, 0, 0.08);
  color: #3a3a3c;
}
.plan__mark svg { width: 22px; height: 22px; }
.plan__title {
  margin: 18px 0 4px;
  font-size: 50px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: #ffa000;
}
.plan__price { margin: 10px 0 0; font-size: 21px; font-weight: 700; display: flex; align-items: baseline; gap: 10px; }
/* Old price: a slanted strike instead of the flat underline-style one */
.plan__was { position: relative; color: #8e8e96; font-weight: 500; text-decoration: none; }
.plan__was::after {
  content: "";
  position: absolute;
  left: -3px;
  right: -3px;
  top: 50%;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transform: rotate(-14deg);
}
.plan__now { color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.plan__rule { margin: 22px 0 18px; border: 0; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.plan__benefits { margin: 0 0 26px; padding-left: 22px; font-size: 17px; font-weight: 600; line-height: 1.55; }
.plan__benefits li::marker { color: rgba(255, 255, 255, 0.9); }

.plan__cta {
  width: 100%;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 29px;
  background: #fff;
  color: #1f1f1f;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s, background-color 0.2s;
}
.plan__cta:hover { background: #f1f3f4; transform: scale(1.01); }
.plan__cta:active { transform: scale(0.98); }
.plan__cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.plan__cta:disabled { cursor: default; transform: none; filter: none; }
.plan__cta.is-done { background: #9be7b4; }
.plan__g { width: 22px; height: 22px; }

.plan__status { margin: 14px 0 0; font-size: 14px; line-height: 1.45; text-align: center; color: #d6e6ff; }
.plan__status[data-tone="error"] { color: #ffb4a8; }
.plan__status[data-tone="success"] { color: #9be7b4; }
.plan__fine { margin: 16px 0 0; font-size: 13px; line-height: 1.45; text-align: center; color: #a3a3ab; }

/* After a new sign-up: only the check, the message and Close */
.plan.is-joined > :not(.plan__done) { display: none; }
.plan__done { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 14px 0 4px; text-align: center; }
.plan__done[hidden] { display: none; }
.plan__check {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #34c759;
  color: #fff;
  box-shadow: 0 10px 28px rgba(52, 199, 89, 0.35);
  animation: plan-pop 0.35s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.plan__check svg { width: 40px; height: 40px; }
.plan__place { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.plan__place[hidden] { display: none; }
.plan__place-label { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #a3a3ab; }
.plan__place-num { font-size: 40px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; color: #fff; }
.plan__done-msg { margin: 0; max-width: 32ch; font-size: 17px; font-weight: 600; line-height: 1.45; }
.plan__done-close { margin-top: 6px; }
@keyframes plan-pop { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .plan__check { animation: none; } }

@media (max-width: 480px) {
  .plan { padding: 24px 22px 18px; }
  .plan__title { font-size: 42px; }
  .plan__benefits { font-size: 16px; }
}

/* ---------- Top-down flow (portrait, or ?flow=down) ---------- */
/* Search sits in the header row: same top and height as the back/logo and Get Premium buttons, in the
   space between the MUSE wordmark and Get Premium (centred there, up to 560px wide). */
.flow-down .search {
  top: 14px;
  left: calc(clamp(16px, 3vw, 48px) + 60px + 66px + 24px);   /* logo/back + gap + wordmark + gap */
  right: calc(clamp(16px, 3vw, 48px) + 180px + 24px);         /* Get Premium + gap */
  width: auto;
  max-width: 560px;
  margin-inline: auto;
  transform: none;
}
.flow-down .search input { height: 44px; }
/* Labels sit centred under their dot */
.flow-down .node { text-align: center; align-items: center; }
.flow-down .node--wrap,
.flow-down .node--tourinfo,
.flow-down .node--track,
.flow-down .node--has-art:not(.node--album),
.flow-down .node--has-avatar { text-align: left; }
.flow-down .node--album.node--has-art { align-items: center; }
.flow-down .node--album .node__text { align-items: center; text-align: center; }
.flow-down .node.is-side { text-align: left; align-items: flex-start; }
/* Phones: no room in the header row, so the search stays just below it */
@media (max-width: 700px) {
  .flow-down .search { top: 60px; left: 16px; right: 16px; max-width: none; margin-inline: 0; }
  .flow-down .search input { height: 48px; }
}

/* "…" layout switch: dots turn vertical when the fan-out flows down */
/* Layout switch inside the right of the search box: dots turn vertical when the fan-out flows down */
.search__flow {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transform: translateY(-50%);
  z-index: 1;
  transition: background-color 0.2s, color 0.2s;
}
.search__flow:hover { background: rgba(120, 190, 255, 0.14); color: var(--ink); }
.search__flow:focus-visible { outline: 2px solid rgba(111, 212, 255, 0.7); outline-offset: 1px; }
.search__flow svg { width: 18px; height: 18px; transition: transform 0.25s ease; }
.flow-down .search__flow svg { transform: rotate(90deg); }
/* Phones: artist rows stay narrow enough for two columns (long names end in "…") */
@media (max-width: 700px) {
  .flow-down .node--artist,
  .flow-down .node--similar { max-width: 158px; }
  .flow-down .node--artist .node__text,
  .flow-down .node--similar .node__text { min-width: 0; }
  .flow-down .node--artist .node__name,
  .flow-down .node--similar .node__name,
  .flow-down .node--artist .node__meta,
  .flow-down .node--similar .node__meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* Glow only on the selected label: on unselected ones it merged into a box-shaped halo */
/* Text sits in front of the fibers: a letter-shaped halo in the background colour (as map labels use
   over roads) hides strands right around each glyph, with no box. Selected/hovered names add their glow. */
.node__name, .node__meta, .node__num, .node__label, .node__value {
  text-shadow: 0 0 2px #030c3a, 0 0 4px #030c3a, 0 0 7px rgba(3, 12, 58, 0.9), 0 0 12px rgba(3, 12, 58, 0.6);
}
.node.is-selected .node__name,
.node:hover .node__name {
  text-shadow: 0 0 2px #030c3a, 0 0 4px #030c3a, 0 0 7px rgba(3, 12, 58, 0.9), 0 0 16px rgba(111, 212, 255, 0.85);
}
/* Dimmed (unselected) items: no text shadow or halo */
.node.is-dimmed .node__name, .node.is-dimmed .node__meta, .node.is-dimmed .node__num,
.node.is-dimmed .node__label, .node.is-dimmed .node__value { text-shadow: none; }
