/* Try BGM — U-NEXT-inspired design prototype */

:root {
  --bg: #0b0d12;
  --bg-elevated: #12161f;
  --bg-card: #171c27;
  --bg-card-hover: #1e2533;
  --border: #2a3142;
  --text: #f2f4f8;
  --muted: #9aa6bc;
  --accent: #4d8dff;
  --accent-2: #7c5cff;
  --accent-soft: rgba(77, 141, 255, 0.16);
  --ok: #3dd68c;
  --warn: #f0b429;
  --danger: #f07178;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --topbar-h: 112px;
  --player-h: 76px;
  --max: 1280px;
  --font: "Segoe UI", "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(77, 141, 255, 0.14), transparent 55%),
    radial-gradient(900px 400px at 90% 0%, rgba(124, 92, 255, 0.12), transparent 50%),
    var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding-bottom: calc(var(--player-h) + 24px);
}

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

a:hover {
  text-decoration: underline;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(11, 13, 18, 0.82);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.25rem 0.55rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
}

.brand {
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand-sub {
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.25;
  max-width: 14rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search input {
  width: 100%;
  max-width: 420px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  outline: none;
}

.search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-elevated);
  flex-shrink: 0;
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  line-height: 1.2;
  min-width: 2.5rem;
}

.lang-sep {
  color: var(--muted);
  opacity: 0.55;
  font-size: 0.72rem;
  user-select: none;
  pointer-events: none;
  line-height: 1;
}

.lang-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.lang-btn.is-active {
  color: #fff;
  background: rgba(77, 141, 255, 0.32);
}

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

.btn-text:hover {
  color: var(--text);
}

/* Genre nav — U-NEXT style chips */
.genre-nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem 0.75rem;
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.genre-nav::-webkit-scrollbar {
  height: 4px;
}

.genre-chip {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.38rem 0.85rem;
  font-size: 0.82rem;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.15s ease;
}

.genre-chip:hover,
.genre-chip.is-active {
  color: var(--text);
  border-color: rgba(77, 141, 255, 0.55);
  background: var(--accent-soft);
}

/* Main */
.main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem 1.25rem 2rem;
}

.view[hidden] {
  display: none !important;
}

/* Hero — single unified banner (landscape + character bg, text overlay) */
.hero,
.hero-unified {
  position: relative;
  display: block;
  margin-bottom: 1.5rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  overflow: hidden;
  min-height: 300px;
  box-shadow: var(--shadow);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Character is centered in the artwork — keep framing centered */
  object-position: center center;
  transform: none;
}

/* Shade only left and right edges — keep center clear for the character */
.hero-bg-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(8, 12, 22, 0.88) 0%,
    rgba(8, 12, 22, 0.55) 22%,
    rgba(8, 12, 22, 0.08) 38%,
    rgba(8, 12, 22, 0) 50%,
    rgba(8, 12, 22, 0.08) 62%,
    rgba(8, 12, 22, 0.45) 78%,
    rgba(8, 12, 22, 0.72) 100%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  /* Left copy | open center for character | right steps */
  grid-template-columns: minmax(240px, 1fr) minmax(160px, 0.85fr) minmax(220px, 0.95fr);
  gap: 1rem 1.25rem;
  align-items: end;
  padding: 1.5rem 1.6rem 1.45rem;
  min-height: 300px;
}

.hero-content .hero-copy {
  grid-column: 1;
}

.hero-content .hero-side {
  grid-column: 3;
  justify-self: end;
}

.hero-copy {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  max-width: 36rem;
}

.hero-kicker {
  margin: 0 0 0.5rem;
  color: #9ec0ff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}

.hero-copy h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
}

/* Emphasize "フリー" / "free" in the hero headline */
.hero-copy h1 .hero-em {
  font-weight: 800;
  color: #7eb6ff;
  text-shadow:
    0 0 18px rgba(77, 141, 255, 0.55),
    0 2px 16px rgba(0, 0, 0, 0.45);
}

.hero-lead {
  margin: 0 0 1.15rem;
  color: rgba(230, 236, 248, 0.92);
  max-width: 34rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.hero-lead strong {
  color: #fff;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.hero-unified .btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
  backdrop-filter: blur(6px);
}

.hero-unified .btn-ghost:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}

.hero-side {
  justify-self: end;
  align-self: end;
  width: min(100%, 280px);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(8, 12, 22, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.hero-panel-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.hero-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.hero-steps li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
}

.hero-step-n {
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.hero-chip {
  align-self: flex-start;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 0.32rem 0.65rem;
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.95);
}

.hero-wave {
  position: absolute;
  inset: auto -10% -30% -10%;
  height: 70%;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(77, 141, 255, 0.35), transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(124, 92, 255, 0.3), transparent 55%);
  filter: blur(8px);
  pointer-events: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #3a6fd6);
  color: white;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(77, 141, 255, 0.28);
}

.btn-primary:hover {
  filter: brightness(1.08);
  color: white;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

/* Filters */
.filters {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.filters label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 140px;
}

.filters label span {
  font-size: 0.72rem;
  color: var(--muted);
}

.filters select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.6rem;
}

.status-line {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Rails */
.rails {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.rail {
  min-width: 0;
}

.rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
}

.rail-head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.rail-link {
  font-size: 0.85rem;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.rail-link:hover {
  color: var(--accent);
}

.rail-count {
  color: var(--muted);
  font-size: 0.85rem;
}

/* U-NEXT style horizontal scroller with hover arrows */
.rail-scroller {
  position: relative;
  min-width: 0;
}

.rail-track {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  /* Room for card hover lift so top/bottom are not clipped */
  padding-top: 6px;
  padding-bottom: 10px;
  margin-top: -2px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; /* arrows replace scrollbar */
  -ms-overflow-style: none;
}

.rail-track::-webkit-scrollbar {
  display: none;
  height: 0;
}

.rail-arrow {
  position: absolute;
  top: 6px;
  bottom: 10px;
  z-index: 5;
  width: 44px;
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 2rem;
  font-weight: 300;
  line-height: 1;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, background 0.18s ease;
  padding: 0;
}

.rail-arrow--prev {
  left: 0;
  background: linear-gradient(90deg, rgba(11, 13, 18, 0.92) 0%, rgba(11, 13, 18, 0.55) 55%, transparent 100%);
  border-radius: 8px 0 0 8px;
}

.rail-arrow--next {
  right: 0;
  background: linear-gradient(270deg, rgba(11, 13, 18, 0.92) 0%, rgba(11, 13, 18, 0.55) 55%, transparent 100%);
  border-radius: 0 8px 8px 0;
}

/* Show arrows on rail hover when not [hidden] */
.rail-scroller:hover .rail-arrow:not([hidden]),
.rail-scroller:focus-within .rail-arrow:not([hidden]) {
  opacity: 1;
  pointer-events: auto;
}

.rail-arrow:hover {
  color: #fff;
  filter: brightness(1.15);
}

.rail-arrow:disabled {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Touch / no-hover: show faint arrows when scrollable */
@media (hover: none), (pointer: coarse) {
  .rail-scroller.is-scrollable .rail-arrow:not([hidden]) {
    opacity: 0.75;
    pointer-events: auto;
  }
}

/* Cards */
.card {
  flex: 0 0 220px;
  scroll-snap-align: start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  /* Small lift; parent .rail-track has padding so it won't clip */
  transform: translateY(-3px);
  border-color: rgba(77, 141, 255, 0.4);
  background: var(--bg-card-hover);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

/* Title + play: graphic background only on this row */
.card-title-row {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  margin: -0.15rem -0.35rem 0.15rem;
  padding: 0.45rem 0.5rem 0.45rem 0.55rem;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
}

.card-title-row .cover-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
}

.card-title-row .card-title,
.card-title-row .play-fab {
  position: relative;
  z-index: 1;
}

.card-title-row .card-title {
  flex: 1 1 auto;
  min-width: 0;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.play-fab {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  margin-top: 0;
  border-radius: 50%;
  border: none;
  background: white;
  color: #0b0d12;
  font-size: 0.82rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: grid;
  place-items: center;
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.play-fab:hover {
  transform: scale(1.06);
}

.play-fab.is-playing {
  background: var(--accent);
  color: white;
}

.card-body {
  padding: 0.75rem 0.85rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.card-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}

.card-artist {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.card-mood {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: #c5cee0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.45rem;
}

.pill {
  font-size: 0.68rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}

.pill.accent {
  color: #b7d0ff;
  border-color: rgba(77, 141, 255, 0.35);
  background: var(--accent-soft);
}

.pill.popular-pill {
  color: #ffd89a;
  border-color: rgba(255, 180, 80, 0.4);
  background: rgba(255, 160, 60, 0.12);
}

.card-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
  margin-top: 0.7rem;
}

.card-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.card-actions-row--page {
  justify-content: flex-start;
}

.btn-official-page {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #b7d0ff;
  text-decoration: none;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(77, 141, 255, 0.35);
  background: rgba(77, 141, 255, 0.1);
  white-space: nowrap;
}

.btn-official-page:hover {
  color: #fff;
  border-color: rgba(77, 141, 255, 0.65);
  background: rgba(77, 141, 255, 0.2);
  text-decoration: none;
}

.btn-official-page-icon {
  font-size: 0.85rem;
  line-height: 1;
}

/* Grid mode */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.9rem;
  /* Avoid clipping card hover lift */
  padding-top: 4px;
  padding-bottom: 6px;
}

.card-grid .card {
  flex: none;
  width: auto;
}

.grid-section {
  margin-top: 0.5rem;
  padding: 1rem 0 0.5rem;
  border-top: 1px solid var(--border);
}

.grid-section[hidden],
.rails[hidden] {
  display: none !important;
}

.grid-section .rail-head h2 {
  font-size: 1.2rem;
}

.grid-section .card-grid {
  margin-top: 0.75rem;
}

.empty {
  color: var(--muted);
  text-align: center;
  padding: 2rem 1rem;
}

/* Page */
.page-head {
  margin-bottom: 1.25rem;
}

.page-head h1 {
  margin: 0.6rem 0 0.25rem;
  font-size: 1.5rem;
}

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

.about-brand-line {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  margin: 0.45rem 0 0;
}

.about-brand-sub {
  color: var(--muted);
  font-size: 0.92rem;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  max-width: 40rem;
}

.about-card ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.about-card li {
  margin: 0.45rem 0;
}

.about-card strong {
  color: var(--text);
}

/* Footer */
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid transparent;
}

/* Player bar */
.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: rgba(14, 17, 24, 0.94);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.35);
}

.player[hidden] {
  display: none !important;
}

.player-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.65rem 1rem;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 0.85rem;
  align-items: center;
}

.player-art {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #12161f;
  flex-shrink: 0;
  overflow: hidden;
}

.player-title {
  font-weight: 700;
  font-size: 0.92rem;
}

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

.player-controls {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 220px;
}

.player-time {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--muted);
  flex: 1;
}

.player-time input[type="range"] {
  flex: 1;
  min-width: 80px;
  height: 1.4rem;
  cursor: pointer;
  accent-color: var(--accent);
  /* Easier to grab; avoid accidental zero from tiny hit area */
  touch-action: none;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.icon-btn:hover {
  border-color: var(--accent);
}

.player-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--player-h) + 18px);
  transform: translateX(-50%) translateY(20px);
  background: #1e2a40;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
  z-index: 60;
}

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

/* Scroll to top — glyph matches rail arrows (‹ ›): light triangle, white */
.scroll-top {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 55;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 999px;
  background: rgba(11, 13, 18, 0.88);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  transition: opacity 0.18s ease, background 0.18s ease, filter 0.18s ease, bottom 0.2s ease;
}

.scroll-top[hidden] {
  display: none !important;
}

.scroll-top:hover {
  color: #fff;
  filter: brightness(1.15);
  background: rgba(11, 13, 18, 0.96);
}

.scroll-top:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 2px;
}

/* Same glyph as .rail-arrow--next (›); rotate 90° CCW → points up */
.scroll-top-icon {
  display: block;
  font-size: 2rem;
  font-weight: 300;
  line-height: 1;
  transform: rotate(-90deg);
  user-select: none;
}

/* Lift above mini player bar when it is open */
body.has-player .scroll-top {
  bottom: calc(var(--player-h) + 1rem);
}

/* Responsive */
@media (max-width: 900px) {
  .topbar-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand actions"
      "search search";
  }

  .brand {
    grid-area: brand;
  }

  .topbar-actions {
    grid-area: actions;
  }

  .search {
    grid-area: search;
  }

  .search input {
    max-width: none;
  }

  .hero-content {
    grid-template-columns: 1fr;
    min-height: 340px;
    align-items: start;
  }

  .hero-content .hero-copy,
  .hero-content .hero-side {
    grid-column: 1;
  }

  .hero-side {
    justify-self: stretch;
    width: auto;
  }

  .hero-bg-img {
    object-position: center center;
    transform: none;
  }

  .hero-bg-shade {
    background: linear-gradient(
      180deg,
      rgba(8, 12, 22, 0.55) 0%,
      rgba(8, 12, 22, 0.75) 55%,
      rgba(8, 12, 22, 0.9) 100%
    );
  }

  .player-inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "art meta actions"
      "controls controls controls";
  }

  .player-art {
    grid-area: art;
  }

  .player-meta {
    grid-area: meta;
  }

  .player-actions {
    grid-area: actions;
  }

  .player-controls {
    grid-area: controls;
    min-width: 0;
  }

  .player-actions .btn-ghost {
    display: none;
  }
}

@media (max-width: 560px) {
  .brand-sub {
    display: none;
  }

  .brand-lockup--header {
    height: 34px;
    max-width: min(180px, 92vw);
  }

  .brand-lockup--about {
    height: 40px;
    max-width: min(236px, 96vw);
  }

  .card {
    flex-basis: 180px;
  }

  .hero-copy {
    padding: 1.2rem;
  }
}
