/* Maxximixx — radio players */
:root {
  --bg: #000;
  --bg-soft: #0a0a0a;
  --bg-elev: #131313;
  --line: #1f1f1f;
  --line-strong: #2a2a2a;
  --text: #ffffff;
  --text-dim: #b9b9b9;
  --text-soft: #8a8a8a;
  --accent: #00d4e8;
  --accent-2: #e6125b;
  --purple: #6c2bd9;
  --radius: 14px;
  --radius-lg: 22px;
  --header-h: 84px;
  --player-h: 96px;
  --fav-w: 0px;
  --shadow-card: 0 18px 40px -20px rgba(0,0,0,0.7);
  --font-sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Space Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  padding-bottom: calc(var(--player-h) + 16px + env(safe-area-inset-bottom, 0px));
  transition: background 0.25s ease, color 0.25s ease;
  overscroll-behavior-y: none;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 16px 40px;
  height: var(--header-h);
  background: #000;
  border-bottom: 1px solid var(--line);
}

.header__logoLink {
  display: inline-flex;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.header__logoLink:hover { opacity: 0.85; }
.header__logo {
  height: 40px;
  display: block;
  flex-shrink: 0;
}

.header__premium {
  font-size: 13px;
  letter-spacing: 0.14em;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.15s;
  white-space: nowrap;
}
.header__premium:hover { color: var(--accent); }

.header__search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  transition: border-color 0.15s;
}
.header__search:focus-within {
  border-color: var(--accent);
}
.header__search svg { color: var(--text-soft); flex-shrink: 0; }
.header__searchicon { display: inline-flex; cursor: pointer; }
.header__search input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  /* 16px min prevents iOS Safari from auto-zooming on focus */
  font-size: 16px;
  letter-spacing: 0.04em;
  font-weight: 500;
}
.header__search input::placeholder { color: var(--text-soft); letter-spacing: 0.06em; }

.header__iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text-dim);
  transition: all 0.15s;
}
.header__iconbtn:hover { color: var(--text); border-color: var(--line-strong); }

.header__favsbtn { position: relative; }
.header__favsbtn .header__favsbadge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent-2);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  border: 2px solid #000;
}

/* ---------- Layout ---------- */
.page {
  padding: 32px 40px 48px;
  max-width: 1480px;
  margin: 0 auto;
}

.hero {
  position: relative;
  background: linear-gradient(135deg, #1bd1e6 0%, #21c5dc 60%, #1ab7cd 100%);
  border-radius: var(--radius-lg);
  padding: 56px 64px;
  display: flex;
  align-items: center;
  gap: 32px;
  overflow: hidden;
  min-height: 280px;
  color: #00121a;
}
.hero__copy { flex: 1; max-width: 520px; }
.hero__title {
  font-family: var(--font-display);
  font-size: 56px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  color: #000;
}
.hero__sub {
  font-size: 15px;
  line-height: 1.55;
  color: #001a23;
  margin: 0 0 28px;
  opacity: 0.9;
}
.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  background: #000;
  color: #fff;
  border: 0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: transform 0.15s, background 0.15s;
}
.hero__cta:hover { transform: translateY(-1px); background: #1a1a1a; }

.hero__art {
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 540px;
  height: 360px;
  pointer-events: none;
}

/* ---------- Page heading (support) ---------- */
.page__head {
  margin: 8px 0 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.page__title {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  color: var(--text);
}
.page__sub {
  font-size: 14px;
  color: var(--text-soft);
  margin: 0;
  letter-spacing: 0.04em;
}

/* ---------- Section ---------- */
.section { margin-top: 56px; }
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 20px;
}
.section__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0;
  color: var(--text);
}
.section__title--fav {
  text-transform: none;
  letter-spacing: -0.01em;
}
/* Custom-cased rail titles — render exactly as written (no uppercasing) */
.section__title--free {
  text-transform: none;
  letter-spacing: -0.005em;
  font-size: 20px;
}
/* Big Spotify-style two-line hero rail title */
.section__title--explore {
  text-transform: none;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 22px;
  line-height: 1.15;
}
@media (max-width: 900px) { .section__title--explore { font-size: 21px; } }
.section__hint {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
@media (max-width: 1400px) {
  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .hero { padding: 36px; }
  .hero__title { font-size: 38px; }
  .hero__art { display: none; }
  .header { padding: 12px 16px; gap: 12px; }
  .page { padding: 20px 16px 40px; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  /* Header: drop the Premium link, keep logo + search compact + 2 icons */
  .header { padding: 10px 12px; gap: 8px; height: 64px; flex-wrap: nowrap; }
  .header__logo { height: 24px; }
  .header__premium { display: none; }
  .header__search { height: 38px; padding: 0 10px; min-width: 0; }
  .header__search input { font-size: 16px; letter-spacing: 0.06em; min-width: 0; width: 100%; }
  .header__search input::placeholder { letter-spacing: 0.12em; }
  .header__iconbtn { width: 34px; height: 34px; flex-shrink: 0; }
  :root { --header-h: 64px; }
  /* Tighten section spacing */
  .section { margin-top: 36px; }
  .section__title { font-size: 18px; }
  /* Card title overlay fits 2-column tile width */
  .card__title { font-size: 18px; left: 12px; right: 12px; bottom: 10px; }
  .cover__inner { font-size: clamp(16px, 5vw, 22px); }
  .card__nowplaying-title { font-size: 13px; }
  .card__nowplaying-artist { font-size: 11px; }
  /* Hero compact */
  .hero { padding: 28px 22px; min-height: 220px; }
  .hero__title { font-size: 32px; margin-bottom: 12px; }
  .hero__sub { font-size: 13px; margin-bottom: 18px; }
  .hero__cta { padding: 12px 20px; font-size: 11px; }
  /* Contact form stacks */
  .contact { grid-template-columns: 1fr; }
  .contact__title { font-size: 24px; }
}

/* ---------- Station Card ---------- */
.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  position: relative;
}
.card__cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: #222;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease;
}
.card:hover .card__cover { transform: translateY(-3px); }
.card__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}
.card__title {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.05;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  z-index: 2;
  text-shadow: 0 2px 14px rgba(0,0,0,0.5);
}
.card__playicon { display: none; }
.card__playing {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.card__fav {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 0;
  background: rgba(0,0,0,0.55);
  color: #fff;
  transition: color 0.15s, background 0.15s, transform 0.15s;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.card__fav svg { width: 13px; height: 13px; }
.card__fav:hover { background: rgba(0,0,0,0.75); transform: scale(1.06); }
.card__fav.is-on {
  color: var(--accent-2);
  background: rgba(0,0,0,0.7);
}

.card__meta { padding: 0 4px; text-align: center; }
.card__nowplaying-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card__nowplaying-artist {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-soft);
  line-height: 1.4;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card.is-active .card__nowplaying-title { color: var(--accent-2); }

/* Cover backgrounds — vary by station */
.cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1;
  overflow: hidden;
}
.cover--logo {
  background: #000;
  padding: 8%;
}
.cover__logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.cover__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.cover__inner {
  position: relative;
  z-index: 1;
  font-size: clamp(12px, 1.2vw, 18px);
  color: #fff;
  text-shadow: 0 2px 14px rgba(0,0,0,0.5);
  word-break: break-word;
  hyphens: auto;
}

/* ---------- FAQ ---------- */
.faq { margin-top: 80px; }
.faq__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 26px;
}
.faq__list { display: flex; flex-direction: column; gap: 14px; }
.faq__item {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elev);
  overflow: hidden;
  transition: border-color 0.18s, border-radius 0.18s, background 0.18s;
}
.faq__item.is-open {
  border-radius: 22px;
  border-color: var(--line-strong);
  background: var(--bg-soft);
}
.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 26px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 15px;
  font-weight: 500;
}
.faq__plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 18px;
  color: var(--text-soft);
  flex-shrink: 0;
}
.faq__emoji { font-size: 18px; }
.faq__a {
  padding: 0 32px 22px 60px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.7;
  display: none;
}
.faq__item.is-open .faq__a { display: block; }

/* ---------- Contact form ---------- */
.contact {
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.contact__field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.contact__field--full { grid-column: 1 / -1; }
/* "Submit a request" heading (Beatport-style) above the form */
.contact__head { margin-top: 8px; }
.contact__title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
  margin: 0 0 6px;
}
.contact__note { font-size: 13px; color: var(--text-soft); margin: 0; }
.contact__filename { color: var(--text-dim); font-size: 13px; word-break: break-all; }
.contact__label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.contact__label .req { color: var(--accent-2); margin-left: 4px; }
.contact__input,
.contact__textarea {
  width: 100%;
  min-width: 0;
  background: #fff;
  color: #000;
  border: 0;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 14px;
  font-family: inherit;
}
.contact__textarea { min-height: 130px; resize: vertical; }
.contact__file {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  color: var(--text-dim);
  font-size: 13px;
}
.contact__file label {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 6px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  cursor: pointer;
  color: var(--text);
}
.contact__submit {
  margin-top: 6px;
  justify-self: start;
  padding: 14px 38px;
  background: var(--purple);
  color: #fff;
  border: 0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: transform 0.15s, background 0.15s;
}
.contact__submit:hover { transform: translateY(-1px); background: #5a23b8; }

/* ---------- Footer ---------- */
.footer {
  margin-top: 96px;
  padding: 56px 40px 40px;
  border-top: 1px solid var(--line);
  background: #000;
}
.footer__cols {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 48px;
  max-width: 1480px;
  margin: 0 auto;
}
.footer__head {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 22px;
}
.footer__head::after {
  content: "";
  flex: 1;
  height: 1px;
  background-image: linear-gradient(to right, var(--line-strong) 50%, transparent 0%);
  background-position: top;
  background-size: 6px 1px;
  background-repeat: repeat-x;
}
/* align-items: flex-start so each link's tappable area is only as wide as its
   text — tapping the empty space to the right no longer triggers a link. */
.footer__list { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.footer__list a {
  font-size: 13px;
  color: var(--text-dim);
  transition: color 0.15s;
}
.footer__list a:hover { color: var(--accent); }
.footer__premium { color: var(--accent-2) !important; font-weight: 600; }
.footer__logo { display: block; height: 44px; margin-bottom: 18px; }
.footer__tag {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 26px;
}
.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.footer__contact a {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-dim);
  font-size: 13px;
}
.footer__contact a:hover { color: var(--accent); }
.footer__contact svg { color: var(--accent-2); flex-shrink: 0; }

.footer__bottom {
  max-width: 1480px;
  margin: 48px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.footer__bottom a { color: var(--accent-2); }
.footer__socials { display: flex; gap: 12px; }
.footer__socials a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  color: var(--text-dim);
}
.footer__socials a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Sticky Player ---------- */
.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 56;
  height: calc(var(--player-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(8,8,8,0.96);
  border-top: 1px solid var(--line-strong);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-left: 28px;
  padding-right: 28px;
  gap: 24px;
  color: #fff;
  will-change: transform;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}
.player__left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.player__cover {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
.player__cover .cover__inner { font-size: 13px; }
.player__info { min-width: 0; line-height: 1.2; }
.player__track {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 420px;
}
.player__artist {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 420px;
}
.player__station {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-top: 3px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 420px;
}

.player__center {
  display: flex;
  align-items: center;
  gap: 14px;
}
.player__btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.player__btn:hover { background: rgba(255,255,255,0.08); }
.player__btn.is-on { color: var(--accent); }
.player__play {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
  transition: transform 0.15s, background 0.15s;
}
.player__play:hover { transform: scale(1.05); }
.player__play svg { width: 32px; height: 32px; }

.player__right { display: flex; align-items: center; gap: 18px; justify-content: flex-end; }

/* the .player__left is now a <button> for mobile tap-to-expand */
.player__expandtarget {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0;
  text-align: left;
  cursor: pointer;
}
.player__fav-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  transition: background 0.15s, color 0.15s;
}
.player__fav-inline svg { width: 22px; height: 22px; }
.player__fav-inline:hover { background: rgba(255,255,255,0.08); color: #fff; }
.player__fav-inline.is-on { color: var(--accent-2); }

@keyframes viz {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

.player__volume {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
}
.player__volume input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100px;
  height: 4px;
  /* Level fill colour: neutral grey by default, pink only on hover (set below) */
  --vol-fill: var(--text-dim);
  background: var(--line-strong);
  border-radius: 999px;
  outline: 0;
  cursor: pointer;
  transition: background 0.15s;
}
/* Pink fill only while hovering the volume control (icon + track), not fixed */
.player__volume:hover input[type="range"] {
  --vol-fill: var(--accent-2);
}
.player__volume input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}
.player__volume input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 0;
  cursor: pointer;
}

/* ---------- Share popover ---------- */
.share {
  position: fixed;
  right: 24px;
  bottom: calc(var(--player-h) + 14px);
  width: 300px;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  z-index: 60;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.share__head {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.share__head h3 {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0;
  color: var(--text);
}
.share__list { padding: 8px 0; }
.share__item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 18px;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.share__item:hover { background: var(--bg); color: var(--text); }
.share__item svg { color: var(--accent); flex-shrink: 0; }
.share__link {
  margin: 0 18px 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--text-soft);
  letter-spacing: 0.04em;
  word-break: break-all;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.share__toast {
  position: fixed;
  right: 24px;
  bottom: calc(var(--player-h) + 14px);
  z-index: 70;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #00121a;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.5);
  animation: toast-in 0.25s ease;
}
@keyframes toast-in {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ---------- Hero headphones SVG fallback ---------- */
.hero__hp {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 30px 40px rgba(0,0,0,0.3));
}

/* ---------- Empty / filtered ---------- */
.empty {
  padding: 80px 20px;
  text-align: center;
  color: var(--text-soft);
  font-size: 14px;
  letter-spacing: 0.06em;
}

/* ---------- Sidebar (toggleable right panel, Favoris) ---------- */
.sidebar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  width: min(360px, 92vw);
  bottom: var(--player-h);
  background: #050505;
  border-right: 1px solid var(--line);
  z-index: 55;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(-100%);
  transition: transform 0.28s ease;
  box-shadow: 24px 0 60px rgba(0,0,0,0.5);
}
.sidebar.is-open { transform: translateX(0); }
/* Docked mode: permanent left rail (no shadow). Visibility is driven by the
   .is-open class (present when expanded → translateX(0); absent when collapsed
   → translateX(-100%) from the base rule), so collapse animates smoothly. */
.sidebar--docked { box-shadow: none; }
/* Tab to re-open the collapsed rail */
.fav-expand {
  position: fixed;
  left: 0;
  top: calc(var(--header-h) + 18px);
  z-index: 56;
  width: 26px;
  height: 54px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 12px 12px 0;
  background: var(--bg-elev);
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 6px 0 18px rgba(0,0,0,0.4);
  transition: background 0.15s, color 0.15s;
}
.fav-expand:hover { background: #161616; color: #fff; }
/* Page + footer make room for the docked rail */
body.favs-docked .page,
body.favs-docked .footer { margin-left: var(--fav-w); }
body.favs-docked .page { max-width: none; }
body.favs-docked .cookie { left: calc(var(--fav-w) + 24px); }
/* Always-open docked rail → the header toggle is redundant */
body.favs-docked .header__favsbtn { display: none; }
/* Spotify-style drag-to-resize handle on the rail's right edge */
.sidebar__resize {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 10px;
  cursor: ew-resize;
  z-index: 3;
  touch-action: none;
}
.sidebar__resize::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 3px;
  width: 3px;
  height: 44px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: var(--line-strong);
  transition: background 0.15s, height 0.15s;
}
.sidebar__resize:hover::after { background: var(--accent); height: 60px; }
.sidebar__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 54;
  animation: sidebar-backdrop-in 0.2s ease;
}
@keyframes sidebar-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.sidebar__close {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,0.06);
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.sidebar__close:hover { background: rgba(255,255,255,0.12); color: var(--text); }
/* "Agrandir la bibliothèque" — bigger, clearer, blue on hover (Spotify-style) */
.sidebar__expand { width: 34px; height: 34px; color: var(--text); }
.sidebar__expand svg { width: 19px; height: 19px; }
.sidebar__expand:hover { background: var(--accent); color: #00181c; }
.sidebar__searchbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 16px 8px;
  padding: 8px 12px;
  height: 38px;
  border-radius: 999px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  transition: border-color 0.15s;
}
.sidebar__searchbar:focus-within { border-color: var(--accent); }
.sidebar__searchbar svg { color: var(--text-soft); flex-shrink: 0; }
.sidebar__searchbar > svg { cursor: pointer; }
.sidebar__searchbar input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font-size: 16px;
  letter-spacing: 0.02em;
}
.sidebar__searchbar input::placeholder { color: var(--text-soft); }
.sidebar__searchclear {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}
.sidebar__searchclear:hover { color: #fff; background: rgba(255,255,255,0.08); }
.sidebar__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.sidebar__head .sidebar__title { flex: 1; }
.sidebar__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text);
}
.sidebar__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--accent-2);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
/* Heart + red count badge at the top-right of the "My Maxximixx" column */
.sidebar__favheart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: var(--accent-2);
  flex-shrink: 0;
  transition: transform 0.15s;
}
.sidebar__favheart:hover { transform: scale(1.08); }
.sidebar__favbadge {
  position: absolute;
  top: -4px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent-2);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  border: 2px solid #050505;
}
.sidebar__empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 22px;
  color: var(--text-soft);
  text-align: center;
  gap: 14px;
}
.sidebar__empty svg { width: 32px; height: 32px; color: var(--text-soft); }
.sidebar__empty p { margin: 0; font-size: 15px; line-height: 1.5; }
.sidebar__list {
  list-style: none;
  margin: 0;
  padding: 12px 14px 16px;
  flex: 1;
  overflow-y: auto;
  display: grid;
  /* Compact favorites — a touch smaller than the interface cards */
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 14px 10px;
  align-content: start;
}
/* Docked column: favorites in 3 columns */
.sidebar--docked .sidebar__list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 8px;
}
/* "Voir tout" under the docked preview (max 3 shown) */
.sidebar__more {
  margin: 2px 14px 14px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.sidebar__more:hover { background: #161616; color: #fff; border-color: var(--accent); }
/* Full-page favorites view ("Agrandir") — covers everything */
.favmax {
  position: fixed;
  /* Start below the site header so the top bar (logo + search) stays visible;
     covers the left favorites column + the whole content area below. */
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background: #050505;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--player-h) + env(safe-area-inset-bottom, 0px));
  animation: favmax-in 0.2s ease;
}
@keyframes favmax-in { from { opacity: 0; } to { opacity: 1; } }
.favmax .sidebar__head { padding: 20px 28px; }
.favmax .sidebar__searchbar { margin: 12px 28px; max-width: 520px; }
.favmax__list {
  flex: 1;
  padding: 8px 28px 28px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.sidebar__list {
  scrollbar-width: thin;
  scrollbar-color: #b9b9b9 transparent;
}
.sidebar__list::-webkit-scrollbar { width: 8px; }
.sidebar__list::-webkit-scrollbar-track { background: transparent; }
.sidebar__list::-webkit-scrollbar-thumb {
  background: #b9b9b9;
  border-radius: 999px;
}
.sidebar__list::-webkit-scrollbar-thumb:hover {
  background: #d4d4d4;
}
.sidebar__item {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  transition: transform 0.15s;
}
.sidebar__item:hover { transform: translateY(-2px); }
.sidebar__play {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 0;
  background: transparent;
  border: 0;
  color: inherit;
  text-align: center;
  min-width: 0;
  width: 100%;
  cursor: pointer;
}
.sidebar__cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 10px 20px -10px rgba(0,0,0,0.6);
}
.sidebar__cover .cover { position: absolute; inset: 0; }
.sidebar__meta { min-width: 0; padding: 0 4px; text-align: center; }
.sidebar__name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}
.sidebar__item.is-active .sidebar__name { color: var(--accent-2); }
.sidebar__np {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-soft);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}
.sidebar__fav {
  position: absolute;
  bottom: 8px;
  left: 8px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 0;
  background: rgba(0,0,0,0.55);
  color: var(--accent-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: transform 0.15s, background 0.15s;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.sidebar__fav:hover {
  background: rgba(0,0,0,0.75);
  transform: scale(1.06);
}
.sidebar__fav svg { width: 13px; height: 13px; }

/* ---------- Mobile expanded player (NRJ-style drawer) ---------- */
.player-x {
  position: fixed;
  inset: 0;
  z-index: 80;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(0, 212, 232, 0.18), transparent 60%),
    linear-gradient(180deg, #0a0a0a 0%, #000 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 14px 22px 18px;
  gap: 10px;
  animation: player-x-in 0.28s ease;
  overflow-y: auto;
}
@keyframes player-x-in {
  from { transform: translateY(100%); opacity: 0.4; }
  to   { transform: translateY(0); opacity: 1; }
}

.player-x__top {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 12px;
}
.player-x__close,
.player-x__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,0.06);
  color: #fff;
  transition: background 0.15s, color 0.15s;
}
.player-x__close:hover,
.player-x__icon:hover { background: rgba(255,255,255,0.12); }
.player-x__icon.is-on { color: var(--accent-2); }

.player-x__topcenter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.player-x__logo {
  height: 26px;
  width: auto;
  display: block;
}
.player-x__topstation {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60vw;
}

.player-x__art {
  width: min(75vw, 340px);
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  margin: 6px auto 6px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
  position: relative;
  background: #000;
}
.player-x__art .cover { position: absolute; inset: 0; }

.player-x__meta { text-align: center; padding: 0 8px; }
.player-x__track {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.005em;
  margin: 0;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.player-x__artist {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

.player-x__controls {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
}
.player-x__controls .player-x__sharebtn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
}
.player-x__controls .player-x__sharebtn:hover {
  transform: translateY(-50%) scale(1.05);
}
.player-x__play {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: #000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  transition: transform 0.15s, background 0.15s;
}
.player-x__play:hover { transform: scale(1.05); }

.player-x__sharebtn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--accent-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s, transform 0.15s;
}
.player-x__sharebtn svg { width: 26px; height: 26px; }
.player-x__sharebtn:hover { background: rgba(230, 18, 91, 0.12); transform: scale(1.05); }

/* Drawer is mobile-only; on desktop the inline player has everything */
@media (min-width: 720px) {
  .player-x { display: none; }
  .player__expandtarget { cursor: default; }
}

/* On mobile, tweak the inline player so the swapped text + tap area read well */
@media (max-width: 720px) {
  .player {
    grid-template-columns: 1fr auto;
    padding: 0 14px env(safe-area-inset-bottom, 0px);
    gap: 10px;
  }
  .player__right { display: none; }
  .player__fav-inline { display: none; }
  .player__track { font-size: 13px; max-width: none; }
  .player__station { font-size: 11px; max-width: none; }
}

/* Overrides that must come AFTER the matching base rules above */
@media (max-width: 560px) {
  .share {
    left: 12px;
    right: 12px;
    width: auto;
  }

  /* Footer mobile: stack to 1 column, tighter padding, centered logo block */
  .footer {
    margin-top: 56px;
    padding: 40px 18px 32px;
  }
  .footer__cols {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .footer__head {
    margin-bottom: 14px;
    font-size: 11px;
    letter-spacing: 0.2em;
  }
  .footer__list { gap: 12px; }
  .footer__list a { font-size: 14px; }
  .footer__logo { height: 36px; margin-bottom: 14px; }
  .footer__tag { margin-bottom: 18px; }
  .footer__contact a { font-size: 14px; gap: 12px; }
  .footer__bottom {
    margin-top: 32px;
    padding-top: 20px;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
    font-size: 10px;
    letter-spacing: 0.16em;
    line-height: 1.5;
  }
  .footer__bottom > div:first-child { word-break: break-word; }
  .footer__socials { gap: 10px; }
}

/* On mobile, the favorites sidebar fills the screen width and covers the
   header — but leaves the bottom player visible so the user can keep
   controlling playback. */
@media (max-width: 720px) {
  .sidebar {
    width: 100vw;
    top: 0;
    bottom: calc(var(--player-h) + env(safe-area-inset-bottom, 0px));
  }
  .sidebar__backdrop { display: none; }
}

/* ---------- Categories: "Voir tout" link ---------- */
.section__seeall {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.section__seeall:hover { color: #fff; border-color: var(--accent); background: #161616; }

/* ---------- Category tiles ---------- */
.cat-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: var(--radius);
  color: #fff;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  isolation: isolate;
}
.cat-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.42) 100%);
  z-index: -1;
}
.cat-tile:hover { transform: translateY(-3px); box-shadow: 0 22px 46px -18px rgba(0,0,0,0.85); }
.cat-tile__name {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 14px rgba(0,0,0,0.45);
}
.cat-tile__count {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.82;
}

/* Square variant — small player-format tile in the "What's Your Sound" rail */
.cat-tile--square {
  flex: 0 0 auto;
  width: 132px;
  height: 132px;
  padding: 12px;
}
.cat-tile--square .cat-tile__name { font-size: 16px; line-height: 1.08; }
/* Square category tiles fill the responsive grid on the "View all" page */
.grid--cats .cat-tile--square { flex: initial; width: auto; height: auto; aspect-ratio: 1 / 1; }
.grid--cats .cat-tile__name { font-size: 18px; }

/* Banner variant — wide tile in the all-categories grid */
.cat-tile--banner {
  min-height: 132px;
  padding: 18px 22px;
}
.cat-tile--banner .cat-tile__name { font-size: 26px; }

/* Mood square — player-format visual tile linking to an ambiance page */
.mood-card { flex: 0 0 150px; width: 150px; display: block; }
/* In the all-ambiances grid, let the squares fill the responsive columns */
.grid--vibes .mood-card { flex: initial; width: auto; }
.mood-card__cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background-size: cover;
  background-position: center;
  transition: transform 0.2s ease;
}
.mood-card:hover .mood-card__cover { transform: translateY(-3px); }
.mood-card__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,0.6) 100%);
}
.mood-card__label {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}

/* ---------- Home rails (bounded swipe carousels + Spotify-style arrows) ---------- */
/* Header keeps the title left and the "View all" + arrows stacked on the right. */
.section__head--explore { align-items: flex-start; }
.rail__controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.rail__arrows { display: flex; gap: 8px; }
.rail__arrow {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.rail__arrow:hover { background: var(--accent); border-color: var(--accent); color: #00181c; }
.rail__arrow svg { width: 18px; height: 18px; }

.rail {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}
.rail::-webkit-scrollbar { display: none; height: 0; width: 0; }
.rail__track {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: max-content;
  padding: 6px 2px;
}
.rail__track > .card { flex: 0 0 150px; width: 150px; }
/* 2-row variant — column-flow grid so both rows scroll together */
.rail__grid2 {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, auto);
  grid-auto-columns: 124px;
  gap: 18px 14px;
  width: max-content;
  padding: 6px 2px;
}
@media (max-width: 560px) {
  .rail__arrows { display: none; }
  .rail__track > .card { flex-basis: 132px; width: 132px; }
  .rail__grid2 { grid-auto-columns: 108px; gap: 14px 12px; }
  .cat-tile--square { width: 116px; height: 116px; }
}

/* ---------- Category pages (all categories + single category) ---------- */
/* "View all" page header — back arrow + title kept fixed (sticky) while the
   grid scrolls underneath, on every screen size. */
.catpage__head {
  display: flex;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: var(--header-h);
  z-index: 25;
  margin: 0 -40px 22px;
  padding: 14px 40px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 900px) {
  .catpage__head { margin: 0 -16px 18px; padding: 12px 16px; }
}
/* Favorites page: search on top, then a sticky [back + title] row */
.fav-sticky {
  position: sticky;
  top: var(--header-h);
  z-index: 25;
  background: var(--bg);
  margin: 0 -40px 22px;
  padding: 14px 40px;
  border-bottom: 1px solid var(--line);
}
.fav-sticky .catpage__search { margin: 0 0 12px; max-width: 460px; }
.fav-sticky .catpage__head {
  position: static;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
@media (max-width: 900px) {
  .fav-sticky { margin: 0 -16px 18px; padding: 12px 16px; }
}
.catpage__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--bg-elev);
  /* Fixed blue outline (not just on hover) */
  border: 1px solid var(--accent);
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
}
.catpage__back:hover { background: #161616; border-color: var(--accent); }
.catpage__title {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}
.catpage__title--multi { line-height: 1.1; }
.catpage__count {
  margin-left: auto;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
  white-space: nowrap;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 1180px) { .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px)  { .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }

.catpage__search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 18px;
  margin-bottom: 28px;
  border-radius: 999px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--text-soft);
}
.catpage__search:focus-within { border-color: var(--accent); }
.catpage__search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  /* 16px min prevents iOS Safari from auto-zooming on focus */
  font-size: 16px;
  outline: none;
}
.catpage__search input::placeholder { color: var(--text-soft); }
.catpage__searchclear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  transition: color 0.15s;
}
.catpage__searchclear:hover { color: #fff; }

@media (max-width: 560px) {
  /* Sized so 2-line titles never spill onto a 3rd line on phones */
  .catpage__title { font-size: 24px; }
  .catpage__title--multi { line-height: 1.12; }
  /* Favorites page: 3 columns on mobile (like the docked column) */
  .fav-grid .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; }
  .catpage__count { display: none; }
  .catpage__back { width: 38px; height: 38px; }
  .cat-tile--banner .cat-tile__name { font-size: 22px; }
  .section__title--free { font-size: 16px; }
  /* Phone: big, bold rail titles (independent of the desktop size) */
  .section__title--explore { font-size: 28px; line-height: 1.08; }
  /* Stack so the big title gets full width; View all drops below-right */
  .section__head--explore { flex-direction: column; align-items: stretch; gap: 10px; }
  .section__head--explore .rail__controls { flex-direction: row; align-items: center; align-self: flex-end; }
  .mood-card { flex-basis: 132px; width: 132px; }
  .mood-card__label { font-size: 15px; }
}

/* ---------- Cookie consent banner ---------- */
.cookie {
  position: fixed;
  left: 24px;
  bottom: calc(var(--player-h) + 20px + env(safe-area-inset-bottom, 0px));
  width: min(440px, calc(100vw - 32px));
  z-index: 75;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: 22px 22px 18px;
  box-shadow: 0 24px 60px -16px rgba(0,0,0,0.85);
  animation: cookie-in 0.3s ease;
}
@keyframes cookie-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cookie__title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 10px;
}
.cookie__text { font-size: 13.5px; line-height: 1.55; color: var(--text-dim); margin: 0 0 12px; }
.cookie__list { margin: 0 0 12px; padding-left: 18px; }
.cookie__list li { font-size: 13px; line-height: 1.5; color: var(--text-dim); margin-bottom: 5px; }
.cookie__list strong { color: var(--text); font-weight: 600; }
.cookie__more { font-size: 13px; color: var(--text-soft); margin: 0 0 16px; }
.cookie__more a { color: var(--accent); text-decoration: underline; }
.cookie__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie__btn {
  flex: 1 1 auto;
  min-width: 110px;
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.cookie__btn:hover { background: #1a1a1a; }
.cookie__btn:active { transform: scale(0.98); }
.cookie__btn--primary {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: #fff;
  flex-basis: 100%;
}
.cookie__btn--primary:hover { background: #c70f4e; border-color: #c70f4e; }
.cookie__btn--ghost { border-color: transparent; color: var(--text-soft); }
.cookie__btn--ghost:hover { color: #fff; background: transparent; }

/* Settings panel — per-category preferences */
.cookie__pref {
  display: block;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  cursor: default;
}
label.cookie__pref { cursor: pointer; }
.cookie__prefhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cookie__prefname { font-size: 14px; font-weight: 600; }
.cookie__prefdesc { font-size: 12.5px; line-height: 1.45; color: var(--text-soft); margin: 4px 0 0; }
.cookie__always { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-soft); }
.cookie__switch {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: var(--line-strong);
  position: relative;
  cursor: pointer;
  transition: background 0.15s;
}
.cookie__switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
}
.cookie__switch:checked { background: var(--accent-2); }
.cookie__switch:checked::after { transform: translateX(18px); }
.cookie__pref + .cookie__actions { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 16px; }

@media (max-width: 560px) {
  .cookie {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: calc(var(--player-h) + 12px + env(safe-area-inset-bottom, 0px));
    padding: 18px 18px 16px;
  }
}

/* ---------- Legal / policy pages ---------- */
.legal { max-width: 820px; }
.legal h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin: 30px 0 12px;
}
.legal h2:first-child { margin-top: 0; }
.legal__lead {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin: 0 0 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.legal h3 { font-size: 15px; font-weight: 700; margin: 18px 0 8px; color: var(--text); }
.legal p { font-size: 14.5px; line-height: 1.65; color: var(--text-dim); margin: 0 0 12px; }
.legal ul { margin: 0 0 14px; padding-left: 20px; }
.legal li { font-size: 14px; line-height: 1.6; color: var(--text-dim); margin-bottom: 6px; }
.legal a { color: var(--accent); text-decoration: underline; }

/* Plans / Pricing page */
.plans__lead {
  max-width: 640px;
  margin: 0 0 28px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text-dim);
}
.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
.plan {
  display: flex;
  flex-direction: column;
  padding: 28px 26px;
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  position: relative;
}
.plan--featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(0, 212, 232, 0.08), var(--bg-elev) 42%);
  box-shadow: 0 0 0 1px var(--accent), 0 18px 50px -28px rgba(0, 212, 232, 0.55);
}
.plan__badge {
  position: absolute;
  top: -12px;
  left: 26px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #00191c;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.plan__name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}
.plan__tagline {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-soft);
}
.plan__price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 22px 0 4px;
}
.plan__amount {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--text);
}
.plan__period {
  font-size: 13px;
  color: var(--text-soft);
}
.plan__cta {
  display: block;
  margin: 22px 0 24px;
  padding: 13px 18px;
  border-radius: 999px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--bg-soft);
  border: 1px solid var(--line-strong);
  color: var(--text);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.plan__cta:hover { border-color: var(--accent); color: var(--accent); }
.plan--featured .plan__cta {
  background: var(--accent);
  border-color: var(--accent);
  color: #00191c;
}
.plan--featured .plan__cta:hover { background: #1ae0f2; color: #00191c; }
.plan__features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.plan__features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-dim);
}
.plan__features li svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent);
}
.plans__note {
  max-width: 640px;
  margin: 30px 0 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-soft);
}
.plans__note a { color: var(--accent); text-decoration: underline; }
@media (max-width: 900px) {
  .plans { grid-template-columns: 1fr; gap: 16px; }
  .plan--featured { order: -1; }
}

/* Header account button */
.header__accountbtn { position: relative; }
.header__accountbtn.is-authed { color: var(--text); border-color: var(--line-strong); }

/* Auth modal */
.authmodal__overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  /* flex-start + margin:auto on the card centers it when there's room but lets
     the overlay scroll (instead of clipping the top) on short viewports —
     e.g. phones in landscape or with the keyboard open. */
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
/* Mandatory entry wall: lighter scrim + stronger blur so the players stay
   visible (blurred) behind the sign-up card. */
.authmodal__overlay--wall {
  background: rgba(0, 0, 0, 0.42);
  -webkit-backdrop-filter: blur(11px);
  backdrop-filter: blur(11px);
}
.authmodal {
  position: relative;
  width: 100%;
  max-width: 420px;
  /* auto vertical margins center the card while space allows, then collapse so
     it can scroll into view on short screens (see overlay rule above). */
  margin: auto;
  padding: 34px 30px 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
}
.authmodal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
}
.authmodal__close:hover { color: #fff; }
.authmodal__logo { height: 30px; width: auto; display: block; margin: 0 auto 16px; }
.authmodal__title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 4px;
}
.authmodal__sub { text-align: center; color: var(--text-soft); font-size: 13.5px; margin: 0 0 20px; }
.authfield { display: block; margin-bottom: 14px; }
.authfield span { display: block; font-size: 12px; color: var(--text-soft); margin-bottom: 6px; letter-spacing: 0.04em; }
.authfield input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  outline: none;
}
.authfield input:focus { border-color: var(--accent); }
.authfield__pw { position: relative; }
.authfield__pw input { padding-right: 46px; }
.authfield__eye {
  position: absolute;
  top: 0;
  right: 0;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  color: var(--text-soft);
  cursor: pointer;
}
.authfield__eye:hover { color: var(--text); }
.authmodal__submit {
  width: 100%;
  height: 48px;
  margin-top: 6px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #00191c;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.authmodal__submit:hover:not(:disabled) { background: #1ae0f2; }
.authmodal__submit:disabled { opacity: 0.6; cursor: default; }
.authmodal__toggle { text-align: center; margin-top: 18px; font-size: 13.5px; color: var(--text-soft); }
.authmodal__toggle button {
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}
.authmodal__error {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(230, 18, 91, 0.12);
  border: 1px solid rgba(230, 18, 91, 0.4);
  color: #ff7aa6;
  font-size: 13px;
}
.authmodal__notice {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 212, 232, 0.1);
  border: 1px solid rgba(0, 212, 232, 0.35);
  color: var(--accent);
  font-size: 13px;
}
.authmodal__remember {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 2px 0 16px;
  font-size: 13.5px;
  color: var(--text-dim);
  cursor: pointer;
}
.authmodal__remember input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.authmodal__forgot { text-align: right; margin: -4px 0 14px; }
.authmodal__forgot button {
  border: 0;
  background: none;
  color: var(--text-soft);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  text-decoration: underline;
}
.authmodal__forgot button:hover { color: var(--accent); }
.authmodal__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: var(--text-soft);
  font-size: 12px;
}
.authmodal__divider::before, .authmodal__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.authmodal__social { display: flex; flex-direction: column; gap: 10px; }
.authsoc {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 46px;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.authsoc:hover:not(:disabled) { border-color: var(--line-strong); background: #161616; }
.authsoc:disabled { opacity: 0.6; cursor: default; }
.authsoc__soon {
  position: absolute;
  right: 12px;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--text-soft);
  font-weight: 700;
}
/* Small phones: tighter gutters so the card uses the available width, and a
   safe-area-aware bottom padding so the toggle link clears the home indicator. */
@media (max-width: 560px) {
  .authmodal__overlay { padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); }
  .authmodal { padding: 28px 20px 24px; }
}

/* Account page */
.account { max-width: 560px; }
.account__muted { color: var(--text-soft); font-size: 14.5px; }
.account__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.account__label { color: var(--text-soft); font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }
.account__value { color: var(--text); font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: 10px; }
.account__badge {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: #00191c;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.account__actions { display: flex; align-items: center; gap: 16px; margin-top: 26px; flex-wrap: wrap; }
.account__signout {
  border: 0;
  background: none;
  color: var(--text-soft);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
}
.account__signout:hover { color: #fff; }

/* Account: change-password section */
.account__section { padding: 16px 0; border-bottom: 1px solid var(--line); }
.account__sectionhead { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.account__link {
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  text-decoration: underline;
}
.account__ok { color: var(--accent); font-size: 13.5px; margin: 10px 0 0; }
.account__pwform { margin-top: 14px; max-width: 340px; }
.account__pwactions { display: flex; align-items: center; gap: 14px; margin-top: 4px; flex-wrap: wrap; }
.account__cancel {
  border: 0;
  background: none;
  color: var(--text-soft);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
}
.account__cancel:hover:not(:disabled) { color: #fff; }
.account__cancel:disabled { opacity: 0.6; cursor: default; }

/* Account: delete (danger zone) */
.account__danger { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.account__deletebtn {
  border: 1px solid rgba(230, 18, 91, 0.5);
  background: transparent;
  color: #ff7aa6;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.account__deletebtn:hover:not(:disabled) { border-color: #e6125b; background: rgba(230, 18, 91, 0.12); }
.account__deletebtn--solid { background: #e6125b; border-color: #e6125b; color: #fff; }
.account__deletebtn--solid:hover:not(:disabled) { background: #c50f4e; }
.account__deletebtn:disabled { opacity: 0.6; cursor: default; }
.account__confirm { max-width: 420px; }

/* Ambiance page — empty state (players not yet assigned) */
.vibe-empty {
  padding: 48px 0;
  color: var(--text-soft);
  font-size: 15px;
}

/* Respect the OS "reduce motion" setting: near-instant transitions, no looping
   animations. The equalizer bars are held mid-height instead of pulsing. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .viz-bar { animation: none !important; height: 70% !important; }
}
