:root {
  --navy: #1a2744;
  --navy-2: #243556;
  --ink: #1c2434;
  --muted: #5b6578;
  --line: #e4dccb;
  --paper: #f6f0e4;
  --card: #fffdf8;
  --accent: #2f6fed;
  --shadow: 0 10px 30px rgba(26, 39, 68, 0.08);
  --radius: 18px;
  --pad: 20px;
  --player-h: 196px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "SF Pro Rounded", "Nunito", ui-rounded, system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #dce8ff 0%, transparent 50%),
    radial-gradient(900px 400px at 110% 0%, #ffe7c8 0%, transparent 46%),
    var(--paper);
  min-height: 100dvh;
  padding-bottom: calc(var(--player-h) + var(--safe-bottom) + 24px);
}

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

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: calc(12px + var(--safe-top)) var(--pad) 12px;
  background: rgba(246, 240, 228, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 16px; }
.brand-text small { color: var(--muted); font-size: 12px; }

.nav {
  display: flex;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}
.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--navy-2);
  background: transparent;
  font-weight: 650;
  font-size: 15px;
}
.nav a.active, .nav a:hover { background: #fff; box-shadow: var(--shadow); }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  padding: 12px 11px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--navy);
  margin: 5px 0;
  border-radius: 2px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 14px var(--pad) 0;
  color: var(--muted);
  font-size: 14px;
}
.crumbs a { color: var(--accent); font-weight: 650; }
.crumbs span.sep { opacity: 0.5; }

main { padding: 18px var(--pad) 32px; max-width: 1100px; margin: 0 auto; }

.hero h1 { margin: 8px 0 6px; font-size: clamp(28px, 5vw, 42px); }
.hero p { margin: 0 0 22px; color: var(--muted); font-size: 17px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  min-height: 150px;
  transition: transform 0.15s ease;
}
.card:hover { transform: translateY(-2px); }
.card .badge {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  overflow: hidden;
}
.card h2 { margin: 8px 0 0; font-size: 22px; }
.card .sub { color: var(--muted); font-size: 14px; }
.card .count {
  margin-top: auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy-2);
}

.tracks { display: flex; flex-direction: column; gap: 8px; }
.track {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 12px;
  text-align: left;
  width: 100%;
}
.track:hover { border-color: #cfd8ea; }
.track.active {
  border-color: var(--accent);
  background: #eef4ff;
}
.track-n {
  min-width: 42px;
  height: 42px;
  padding: 0 8px;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.track.active .track-n { background: var(--accent); }
.track-title { font-weight: 700; font-size: 16px; }
.track-play {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: #eef2f8;
  color: var(--navy);
  display: grid;
  place-items: center;
  pointer-events: none;
}
.track.active .track-play { background: var(--accent); color: #fff; }
.track svg { width: 18px; height: 18px; fill: currentColor; }

.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: var(--navy);
  color: #fff;
  padding: 12px var(--pad) calc(12px + var(--safe-bottom));
  box-shadow: 0 -12px 30px rgba(0,0,0,0.18);
}
.player-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.player-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px 18px;
  align-items: center;
}
.player-kicker { font-size: 12px; opacity: 0.7; }
.player-title { font-weight: 750; font-size: 15px; }
.player-controls { display: flex; align-items: center; gap: 8px; }
.icon-btn, .play-btn {
  display: inline-grid;
  place-items: center;
  padding: 0;
  line-height: 0;
  border: 0;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-radius: 999px;
  width: 40px;
  min-width: 40px;
  height: 40px;
}
.icon-btn { font-weight: 800; font-size: 13px; line-height: 1; }
.play-btn { width: 52px; height: 52px; background: var(--accent); }
.play-btn svg, .icon-btn svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.play-btn .i-play { transform: translateX(1px); }
.play-btn .i-pause { display: none; }
.play-btn.playing .i-play { display: none; }
.play-btn.playing .i-pause { display: block; }

.player-progress {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  gap: 10px;
  align-items: center;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  width: 100%;
}
.seek {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.seek:focus { outline: none; }
.seek::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    #8cb4ff var(--progress, 0%),
    rgba(255, 255, 255, 0.22) var(--progress, 0%)
  );
}
.seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -5px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.seek::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}
.seek::-moz-range-progress {
  height: 8px;
  border-radius: 999px;
  background: #8cb4ff;
}
.seek::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.player-extra { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.speeds { display: flex; gap: 6px; flex-wrap: wrap; }
.speeds button {
  border: 0;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 800;
}
.speeds button.active { background: #fff; color: var(--navy); }
.loop { display: flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }

@media (max-width: 860px) {
  .player-row {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .player-controls, .player-extra { justify-content: center; }
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    padding: 10px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav.open { display: flex; flex-direction: column; }
  .nav a { padding: 12px 14px; }
}

@media (max-width: 560px) {
  :root { --player-h: 280px; --pad: 14px; }
  .brand-text small { display: none; }
  .track { grid-template-columns: auto 1fr; }
  .track-play { display: none; }
}
