:root {
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--background);
  font-synthesis: none;
  --accent: #d52d4a;
  --accent-hover: #bb233e;
  --radius: 22px;
  --background: #f4f5f7;
  --ink: #22242b;
  --muted: #70747f;
  --line: rgba(38, 43, 55, 0.09);
  --surface: #fff;
  --soft: #eceef2;
  --glass: rgba(255, 255, 255, 0.68);
  --glass-border: rgba(255, 255, 255, 0.94);
  --shadow: rgba(43, 50, 72, 0.09);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  color: inherit;
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  border: 0;
  background: none;
}
button:disabled {
  cursor: default;
}
button,
a {
  touch-action: manipulation;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
button {
  flex-shrink: 0;
}
h1,
h2,
h3,
p {
  margin: 0;
}
img {
  display: block;
  max-width: 100%;
  object-fit: cover;
}
.icon {
  display: inline-block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  background: currentColor;
  mask: var(--icon) center/contain no-repeat;
  -webkit-mask: var(--icon) center/contain no-repeat;
}
.icon-button {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition:
    background 0.2s,
    transform 0.2s;
}
.icon-button:hover {
  background: var(--soft);
  transform: translateY(-1px);
}
.muted {
  color: var(--muted);
}
.skip-link {
  position: fixed;
  z-index: 100;
  left: 10px;
  top: -60px;
  padding: 12px;
  background: var(--surface);
}
.skip-link:focus {
  top: 10px;
}
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 220px;
  border-radius: 0;
  border-width: 0 1px 0 0;
  padding: 30px 18px;
  display: flex;
  flex-direction: column;
  z-index: 5;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.6px;
  white-space: nowrap;
}
.brand-symbol {
  width: 39px;
  height: 39px;
  background: var(--accent);
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 23px;
  font-weight: 650;
  box-shadow: 0 5px 13px #d52d4a25;
}
.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 1px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 5px;
}
.nav-label {
  font-size: 11px;
  color: var(--muted);
  margin: 49px 14px 14px;
}
.desktop-nav {
  display: grid;
  gap: 7px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  border-radius: 14px;
  padding: 13px 15px;
  font-size: 14px;
  color: var(--muted);
  transition:
    background 0.2s,
    color 0.2s;
}
.nav-item:hover {
  background: var(--soft);
  color: var(--ink);
}
.nav-item.active {
  color: var(--accent);
  font-weight: 650;
  background: var(--selected);
  box-shadow:
    inset 0 1px 0 #ffffff88,
    0 3px 12px var(--shadow);
}
.sidebar-bottom {
  margin-top: auto;
}
.listening-note {
  margin: 20px 11px 36px;
  color: var(--muted);
}
.listening-note > .icon {
  width: 24px;
  height: 24px;
  margin-bottom: 13px;
}
.listening-note p {
  font-size: 11px;
  line-height: 1.9;
}
.listening-note strong {
  font-weight: 500;
  color: var(--ink);
}
.preview-note {
  display: block;
  font-size: 10px;
  letter-spacing: 0.4px;
  color: var(--muted);
  text-align: center;
}
.workspace {
  margin-left: 220px;
  padding: 0 clamp(24px, 2.5vw, 40px) 105px;
  min-width: 0;
}
.topbar {
  height: 101px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.breadcrumb {
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--muted);
}
.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  height: 41px;
  border-radius: 30px;
  width: 300px;
  color: var(--muted);
}
.search > .icon {
  width: 18px;
  height: 18px;
}
.search input {
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  outline-offset: 0;
}
.search input::placeholder {
  color: var(--muted);
}
kbd {
  font-family: inherit;
  font-size: 10px;
  white-space: nowrap;
  border: 1px solid var(--line);
  padding: 2px 4px;
  border-radius: 4px;
}
.mobile-brand,
.mobile-nav {
  display: none;
}
main {
  outline: none;
  min-height: 65dvh;
}
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 13px 0 26px;
}
.page-heading h1 {
  font-size: 32px;
  letter-spacing: -1.2px;
  font-weight: 730;
}
.page-heading p {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}
.date-note {
  font-size: 11px;
  color: var(--muted);
  padding-bottom: 3px;
}
.hero {
  height: 330px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  color: white;
  isolation: isolate;
  background: #42595c;
}
.hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  object-position: center 49%;
}
.hero:after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(12, 34, 41, 0.7), rgba(12, 34, 41, 0.14) 70%),
    linear-gradient(0deg, rgba(12, 34, 41, 0.22), transparent 80%);
}
.hero-copy {
  height: 100%;
  padding: 34px 38px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 550;
}
.hero .eyebrow {
  opacity: 0.85;
  margin-bottom: auto;
}
.hero h2 {
  font-size: 45px;
  font-weight: 650;
  letter-spacing: -1px;
  margin-bottom: 11px;
  line-height: 1.15;
}
.hero p {
  font-size: 13px;
  color: #ffffffdd;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 21px;
  border-radius: 25px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition:
    transform 0.2s,
    background 0.2s;
}
.button:hover {
  transform: translateY(-2px);
}
.button .icon {
  width: 17px;
  height: 17px;
}
.button.primary {
  background: var(--accent);
  color: #fff;
}
.button.primary:hover {
  background: var(--accent-hover);
}
.button.white {
  background: white;
  color: #272c34;
}
.button.ghost {
  border: 1px solid #ffffff65;
  background: #ffffff18;
  color: white;
  backdrop-filter: blur(12px);
}
.hero-caption {
  position: absolute;
  bottom: 31px;
  right: 30px;
  font-size: 10px;
  letter-spacing: 1px;
  opacity: 0.8;
}
.section {
  margin-top: 35px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.section-heading h2 {
  font-size: 21px;
  letter-spacing: -0.5px;
  font-weight: 680;
}
.text-button {
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}
.text-button:hover {
  color: var(--accent);
}
.text-button .icon {
  width: 14px;
  height: 14px;
}
.album-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 21px;
}
.album-card {
  min-width: 0;
  text-align: left;
  padding: 0;
  display: block;
}
.album-cover {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 15px;
  background: var(--soft);
  box-shadow: 0 8px 17px var(--shadow);
}
.album-cover img {
  width: 100%;
  height: 100%;
  transition: transform 0.5s;
}
.album-card:hover img {
  transform: scale(1.04);
}
.album-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin-top: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.album-card p {
  color: var(--muted);
  font-size: 11px;
  margin-top: 6px;
}
.cover-play {
  position: absolute;
  right: 11px;
  bottom: 11px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffffd9;
  display: grid;
  place-items: center;
  color: #222;
  opacity: 0;
  transform: translateY(8px);
  transition: 0.2s;
}
.album-card:hover .cover-play,
.album-card:focus-visible .cover-play {
  opacity: 1;
  transform: none;
}
.cover-play .icon {
  width: 18px;
  height: 18px;
}
.songs-heading {
  display: flex;
  gap: 18px;
  align-items: center;
}
.subtle-label {
  font-size: 11px;
  color: var(--muted);
}
.track-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 36px;
  row-gap: 4px;
}
.track {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 7px;
  border-radius: 12px;
  min-width: 0;
}
.track:hover {
  background: var(--row-hover);
}
.track-index {
  width: 18px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}
.track-art {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  flex-shrink: 0;
}
.track-info {
  flex: 1;
  min-width: 0;
  text-align: left;
  padding: 0;
}
.track-info strong {
  font-size: 13px;
  font-weight: 550;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-info small {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 5px;
}
.track-time {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.track .icon-button {
  width: 32px;
  height: 32px;
}
.track .icon {
  width: 18px;
  height: 18px;
}
.is-favorite {
  color: var(--accent);
}
.track.is-current .track-info strong {
  color: var(--accent);
}
.page-footer {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  margin: 44px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
/* Compact player centered within the content area; shared state stays unchanged. */
.mini-player {
  position: fixed;
  z-index: 10;
  bottom: 20px;
  left: calc(50% + 110px);
  transform: translateX(-50%);
  width: min(680px, calc(100% - 268px));
  border-radius: 30px;
  height: 58px;
  padding: 7px 15px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 25px;
}
.mini-player .transport {
  grid-column: 1;
  grid-row: 1;
}
.mini-player .now-playing {
  grid-column: 2;
  grid-row: 1;
}
.mini-player .player-extras {
  grid-column: 3;
  grid-row: 1;
}
.mini-player .timeline,
.mini-player .demo-indicator,
.mini-player .now-playing > .icon-button {
  display: none;
}
.mini-player .transport-buttons {
  gap: 3px;
}
.mini-player .transport-buttons > .play-main {
  background: none;
  color: var(--ink);
}
.mini-player .transport-buttons > .icon-button {
  width: 28px;
  height: 32px;
}
.mini-player .now-playing > img {
  width: 36px;
  height: 36px;
  border-radius: 7px;
}
.mini-player .now-title strong {
  font-size: 12px;
}
.mini-player .now-title small {
  font-size: 10px;
  margin-top: 3px;
}
.mobile-menu-button {
  display: none;
}
.menu-dialog {
  width: min(340px, calc(100% - 32px));
  padding: 23px;
  border-radius: 24px;
}
.menu-nav {
  display: grid;
  gap: 6px;
}
.now-playing {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}
.now-playing > img {
  width: 53px;
  height: 53px;
  border-radius: 11px;
  cursor: pointer;
}
.now-title {
  min-width: 0;
  text-align: left;
  padding: 0;
}
.now-title strong {
  display: block;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.now-title small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px;
}
.now-playing > .icon-button {
  margin-left: 7px;
}
.transport {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.transport-buttons {
  display: flex;
  align-items: center;
  gap: 18px;
}
.transport-buttons > .icon-button {
  width: 29px;
  height: 29px;
}
.transport-buttons > .play-main {
  width: 35px;
  height: 35px;
  background: var(--ink);
  color: var(--background);
}
.transport-buttons > .icon-button .icon {
  width: 18px;
  height: 18px;
}
.transport-buttons > .side-control {
  color: var(--muted);
}
.transport-buttons > .enabled {
  color: var(--accent);
}
.timeline {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
input[type="range"] {
  accent-color: var(--accent);
  height: 4px;
  cursor: pointer;
  min-width: 0;
}
.timeline input {
  width: 100%;
  margin: 8px 0;
}
.player-extras {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.player-extras input {
  width: 68px;
}
.player-extras .icon {
  width: 19px;
  height: 19px;
}
.player-extras .icon-button {
  width: 30px;
  height: 30px;
}
.demo-indicator {
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
}
.detail-toolbar {
  display: flex;
  align-items: center;
  padding-top: 22px;
  margin-bottom: 4px;
}
.back-button {
  width: 38px;
  height: 38px;
  color: var(--ink);
}
.back-button .icon {
  width: 19px;
  height: 19px;
}
.album-header {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  align-items: center;
  padding: 28px 0 16px;
}
.album-header > img {
  width: 240px;
  height: 240px;
  border-radius: 20px;
  box-shadow: 0 15px 40px var(--shadow);
}
.album-header h1 {
  font-size: 42px;
  letter-spacing: -1.3px;
  margin: 13px 0;
}
.album-header p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}
.album-header .album-meta {
  font-size: 11px;
  margin-top: 8px;
}
.album-header .hero-actions {
  margin-top: 22px;
}
.album-tracks {
  grid-template-columns: 1fr;
}
.album-tracks .track {
  padding: 13px 10px;
}
.album-tracks .track-info small {
  display: none;
}
.album-tracks .track-art {
  display: none;
}
.album-tracks .track-index {
  width: 35px;
}
.album-tracks .track-time {
  margin-right: 18px;
}
.empty-state {
  padding: 70px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}
.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 23px;
}
.filter-tabs button {
  padding: 8px 17px;
  border-radius: 20px;
  color: var(--muted);
  font-size: 12px;
}
.filter-tabs button.active {
  background: var(--ink);
  color: var(--background);
}
dialog {
  border: 0;
  color: var(--ink);
  padding: 0;
}
dialog::backdrop {
  background: #14192460;
  backdrop-filter: blur(10px);
}
.settings-dialog {
  width: min(460px, calc(100% - 32px));
  padding: 30px;
  border-radius: 28px;
}
.dialog-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}
.dialog-title .eyebrow {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1px;
}
.dialog-title h2 {
  font-size: 26px;
  margin-top: 9px;
}
.settings-dialog > .muted {
  font-size: 12px;
  line-height: 1.7;
}
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin: 24px 0 9px;
}
.settings-dialog select {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
.setting-preview {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 22px 0;
}
.setting-preview strong {
  font-size: 14px;
}
.setting-preview p {
  color: var(--muted);
  font-size: 11px;
  margin-top: 6px;
}
.setting-help {
  font-size: 11px;
  line-height: 1.9;
  color: var(--muted);
  padding-bottom: 23px;
}
.wide {
  width: 100%;
}
.toast {
  position: fixed;
  bottom: 95px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  padding: 12px 20px;
  border-radius: 18px;
  font-size: 12px;
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.visible {
  opacity: 1;
  transform: translateX(-50%);
}
.player-dialog {
  width: min(1100px, calc(100% - 44px));
  max-height: calc(100dvh - 44px);
  border-radius: 30px;
  background: var(--background);
  overflow: auto;
}
.full-player {
  position: relative;
  padding: 36px 55px 50px;
  isolation: isolate;
  overflow: hidden;
}
.full-player:before {
  content: "";
  position: absolute;
  inset: -30%;
  background-image: var(--cover);
  background-position: center;
  background-size: cover;
  filter: blur(90px);
  opacity: 0.15;
  z-index: -1;
}
.full-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}
.full-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 85px;
  align-items: center;
  margin-top: 34px;
}
.full-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 23px;
  box-shadow: 0 25px 55px #0002;
}
.full-track-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 25px;
}
.full-track-title h2 {
  font-size: 24px;
}
.full-track-title p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 7px;
}
.full-player .transport-buttons {
  margin-top: 14px;
  gap: 28px;
}
.full-player .transport-buttons > .play-main {
  width: 54px;
  height: 54px;
}
.full-player .transport-buttons .icon {
  width: 24px;
  height: 24px;
}
.lyrics {
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: 25px;
  line-height: 1.55;
  font-weight: 650;
  color: var(--muted);
}
.lyrics p.active {
  color: var(--ink);
  font-size: 29px;
}
.lyrics small {
  font-size: 11px;
  font-weight: 400;
  margin-bottom: 10px;
}
.queue-heading {
  margin-bottom: 20px;
}
.queue-list {
  max-height: 55dvh;
  overflow: auto;
}
.queue-list button {
  display: flex;
  width: 100%;
  padding: 12px;
  text-align: left;
  gap: 12px;
  border-radius: 10px;
}
.queue-list button:hover {
  background: var(--soft);
}
.queue-list img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}
.queue-list strong {
  display: block;
  font-size: 13px;
}
.queue-list small {
  display: block;
  font-size: 11px;
  margin-top: 6px;
  color: var(--muted);
}
@media (max-width: 1150px) {
  .sidebar {
    width: 220px;
    left: 0;
    padding: 25px 13px;
  }
  .brand {
    font-size: 18px;
  }
  .brand small {
    font-size: 8px;
  }
  .workspace {
    margin-left: 220px;
    padding-right: 26px;
    padding-left: 26px;
  }
  .breadcrumb {
    display: none;
  }
  .topbar {
    justify-content: flex-end;
  }
  .album-grid {
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .player-extras {
    gap: 6px;
  }
  .player-extras input,
  .demo-indicator {
    display: none;
  }
  .hero {
    height: 310px;
  }
  .full-grid {
    gap: 45px;
  }
  .lyrics {
    font-size: 20px;
  }
  .lyrics p.active {
    font-size: 24px;
  }
}
@media (max-width: 800px) {
  .sidebar {
    display: none;
  }
  .workspace {
    margin: 0;
    padding: env(safe-area-inset-top, 0px)
      max(25px, env(safe-area-inset-right, 0px))
      calc(100px + env(safe-area-inset-bottom, 0px))
      max(25px, env(safe-area-inset-left, 0px));
  }
  .topbar {
    height: 84px;
    justify-content: space-between;
  }
  .mobile-brand {
    display: block;
    font-size: 20px;
    font-weight: 750;
    letter-spacing: -0.5px;
  }
  .search {
    width: 230px;
  }
  .mobile-menu-button {
    display: inline-flex;
  }
  .mobile-brand {
    margin-right: auto;
  }
  .mini-player {
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    left: max(12px, env(safe-area-inset-left, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    transform: none;
    width: auto;
    grid-template-columns: minmax(0, 1fr) auto;
    height: 58px;
    padding: 7px 13px;
    border-radius: 24px;
    gap: 12px;
  }
  .mini-player .now-playing {
    grid-column: 1;
  }
  .mini-player .transport {
    grid-column: 2;
  }
  .mini-player .transport-buttons > .icon-button {
    width: 38px;
    height: 40px;
  }
  .now-playing > img {
    width: 45px;
    height: 45px;
    border-radius: 9px;
  }
  .now-playing > .icon-button {
    display: none;
  }
  .mini-player .transport {
    display: block;
  }
  .mini-player .timeline,
  .mini-player .side-control,
  .mini-player .prev-control,
  .player-extras {
    display: none;
  }
  .mini-player .transport-buttons {
    gap: 10px;
  }
  .mini-player .transport-buttons > .play-main {
    background: none;
    color: var(--ink);
  }
  .toast {
    bottom: calc(83px + env(safe-area-inset-bottom, 0px));
  }
  .page-heading {
    margin-top: 12px;
  }
  .track-list {
    column-gap: 14px;
  }
  .full-player {
    padding: 24px 32px 35px;
  }
  .full-grid {
    gap: 30px;
  }
  .lyrics {
    font-size: 18px;
  }
  .lyrics p.active {
    font-size: 21px;
  }
  .full-track-title h2 {
    font-size: 21px;
  }
  .album-header {
    grid-template-columns: 190px 1fr;
    gap: 25px;
  }
  .album-header > img {
    width: 190px;
    height: 190px;
  }
  .album-header h1 {
    font-size: 31px;
  }
}
@media (max-width: 560px) {
  .workspace {
    padding: env(safe-area-inset-top, 0px)
      max(20px, env(safe-area-inset-right, 0px))
      calc(100px + env(safe-area-inset-bottom, 0px))
      max(20px, env(safe-area-inset-left, 0px));
  }
  .topbar {
    height: auto;
    padding-top: 12px;
    flex-wrap: wrap;
    gap: 10px;
    position: relative;
  }
  .mobile-brand {
    font-size: 20px;
    line-height: 40px;
  }
  .top-actions {
    width: 100%;
    gap: 9px;
  }
  .top-actions > .icon-button {
    position: absolute;
    top: 12px;
    right: 0;
  }
  .top-actions > #appearance {
    right: 49px;
  }
  .search {
    width: 100%;
    height: 40px;
  }
  .search kbd {
    display: none;
  }
  .page-heading {
    margin: 27px 0 20px;
  }
  .page-heading h1 {
    font-size: 28px;
  }
  .page-heading p {
    font-size: 12px;
  }
  .date-note {
    display: none;
  }
  .hero {
    height: 310px;
    border-radius: 19px;
  }
  .hero > img {
    object-position: 60% center;
  }
  .hero-copy {
    padding: 25px;
  }
  .hero h2 {
    font-size: clamp(28px, 8.7vw, 36px);
  }
  .hero p {
    font-size: 11px;
  }
  .hero .eyebrow {
    font-size: 10px;
  }
  .hero-caption {
    display: none;
  }
  .hero-actions {
    margin-top: 24px;
    gap: 8px;
  }
  .button {
    font-size: 12px;
    padding: 11px 17px;
  }
  .section {
    margin-top: 29px;
  }
  .section-heading h2 {
    font-size: 20px;
  }
  .album-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 16px;
  }
  .home-albums {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    margin-right: -20px;
    padding-right: 20px;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
  }
  .home-albums .album-card,
  .home-albums .album-card:last-child {
    display: block;
    flex: 0 0 155px;
    scroll-snap-align: start;
  }
  .album-cover {
    border-radius: 13px;
  }
  .album-card h3 {
    font-size: 13px;
    margin-top: 10px;
  }
  .album-card p {
    font-size: 11px;
  }
  .track-list {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .track {
    padding: 8px 0;
  }
  .track-art {
    width: 43px;
    height: 43px;
  }
  .songs-heading {
    gap: 10px;
  }
  .subtle-label {
    font-size: 10px;
  }
  .page-footer {
    gap: 15px;
    font-size: 9px;
    margin-top: 32px;
  }
  .album-header {
    display: flex;
    flex-direction: column;
    gap: 24px;
    text-align: center;
    padding-top: 28px;
  }
  .album-header > img {
    width: 210px;
    height: 210px;
  }
  .album-header h1 {
    font-size: 30px;
  }
  .album-header .hero-actions {
    justify-content: center;
  }
  .album-tracks .track-index {
    width: 20px;
  }
  .album-tracks .track-time {
    margin-right: 0;
  }
  .player-dialog {
    width: calc(100% - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 24px;
  }
  .full-player {
    padding: 20px 26px 30px;
  }
  .full-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-top: 20px;
  }
  .full-cover {
    width: min(100%, 300px);
    margin: auto;
  }
  .full-track-title {
    margin: 21px 0;
  }
  .lyrics {
    border-top: 1px solid var(--line);
    padding-top: 24px;
    gap: 14px;
    font-size: 17px;
  }
  .lyrics p.active {
    font-size: 20px;
  }
  .lyrics small {
    margin-bottom: 0;
  }
  .settings-dialog {
    padding: 25px;
  }
  .filter-tabs {
    gap: 5px;
  }
  .filter-tabs button {
    padding: 8px 12px;
  }
  .track-info strong {
    font-size: 12px;
  }
  .now-title strong {
    max-width: 170px;
  }
}

/* Standalone uses the same layout; only actual device safe areas add space. */
@media (display-mode: standalone) {
  body {
    min-height: 100dvh;
  }
}
@media (max-width: 800px) and (min-width: 561px) {
  .topbar {
    height: auto;
    padding-top: 12px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .top-actions {
    margin-left: auto;
  }
}
@media (max-width: 560px) {
  .mobile-menu-button {
    width: 32px;
    height: 40px;
  }
  .mobile-brand {
    padding-right: 90px;
  }
}

/* Home adapts to the available content width, with complete rows at each size. */
@media (min-width: 561px) {
  .home-albums { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 1.5vw, 24px); }
}
@media (min-width: 1440px) {
  .home-albums { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (min-width: 1800px) {
  .track-list:not(.album-tracks) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 801px) and (max-width: 1050px) {
  .track-list:not(.album-tracks) { grid-template-columns: 1fr; }
  .hero-copy { padding: 30px; }
  .hero h2 { font-size: clamp(32px, 4vw, 40px); }
  .hero-caption, .date-note { display: none; }
}
@media (min-width: 561px) and (max-width: 800px) {
  .topbar { display: grid; grid-template-columns: 36px minmax(0, 1fr); }
  .top-actions { grid-column: 1 / -1; width: 100%; margin-left: 0; }
  .search { flex: 1; width: auto; }
  .page-heading { margin-top: 25px; }
}
