:root {
  --bg: #0f1217;
  --bg-soft: #181c23;
  --text: #edf2f7;
  --muted: #9ba6b2;
  --accent: #25c2a0;
  --accent-2: #1ca37f;
  --brass: #b08d57;
  --danger: #ff6b6b;
  --border: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scrollbar-gutter: stable;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 194, 160, 0.2), transparent 45%),
    radial-gradient(circle at bottom right, rgba(28, 163, 127, 0.18), transparent 50%),
    var(--bg);
  background-size: 150% 150%, 160% 160%, auto;
  background-position: 0% 0%, 100% 100%, 0% 0%;
  min-height: 100vh;
}

@keyframes background-flow {
  0% {
    background-position: 0% 0%, 100% 100%, 0% 0%;
  }
  100% {
    background-position: 18% 12%, 82% 88%, 0% 0%;
  }
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.player-header {
  align-items: flex-end;
}

.player-header .row {
  align-items: flex-end;
  margin-left: auto;
  justify-content: flex-end;
}

.header-login-btn {
  width: 42px;
  min-width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-decoration: none;
}

.header-login-btn svg {
  width: 22px;
  height: 22px;
}

.brand h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.brand-logo {
  display: block;
  width: min(350px, 36vw);
  height: auto;
}

.brand-link {
  text-decoration: none;
  color: inherit;
}

.brand p {
  margin: 0.4rem 0 0;
  color: var(--muted);
}

.pill {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.3fr 1fr;
  align-items: start;
}

.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border: none;
  border-radius: 14px;
  padding: 1rem;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.22),
    0 2px 8px rgba(0, 0, 0, 0.16);
}

#uploadPanel.is-drop-hover {
  border-color: rgba(37, 194, 160, 0.9);
  box-shadow:
    0 0 0 1px rgba(37, 194, 160, 0.5) inset,
    0 14px 34px rgba(0, 0, 0, 0.24),
    0 2px 10px rgba(0, 0, 0, 0.18);
}

.search {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.85rem;
}

.search-wrap {
  position: relative;
}

.search-wrap .search {
  padding-right: 2.35rem;
}

.search-favorite-toggle {
  position: absolute;
  right: 0.55rem;
  top: calc(50% - 0.42rem);
  transform: translateY(-50%);
  z-index: 2;
}

.track-list {
  max-height: 68vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.track-list-wrap {
  position: relative;
  min-height: 0;
  --list-fade-strength: 0;
}

.track-list-wrap .track-list {
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 82%,
    rgba(0, 0, 0, calc(1 - (0.92 * var(--list-fade-strength)))) 96%,
    rgba(0, 0, 0, calc(1 - var(--list-fade-strength))) 100%
  );
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 82%,
    rgba(0, 0, 0, calc(1 - (0.92 * var(--list-fade-strength)))) 96%,
    rgba(0, 0, 0, calc(1 - var(--list-fade-strength))) 100%
  );
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.track-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.01);
  transition: border-color 120ms ease, transform 120ms ease;
}

.track-item:hover {
  border-color: rgba(37, 194, 160, 0.6);
}

.track-item.active {
  border-color: var(--accent);
  background: rgba(37, 194, 160, 0.14);
}

.track-title {
  margin: 0;
  font-weight: 600;
  display: flex;
  align-items: baseline;
  gap: 0;
  min-width: 0;
}

.track-title-main {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 0 1 auto;
}

.track-duration {
  flex: 0 0 auto;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  opacity: 0.98;
  min-width: 0;
  text-align: left;
  margin-left: 0.25ch;
}

.track-duration::before {
  content: "- ";
}

.track-private-lock {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  line-height: 1;
  flex: 0 0 auto;
  margin-left: 0.35rem;
}

.track-private-lock svg {
  width: 0.82rem;
  height: 0.82rem;
  display: block;
}

.track-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.track-main {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  flex: 1 1 auto;
}

.track-cover {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  flex: 0 0 auto;
  overflow: hidden;
  background-clip: padding-box;
  transform: translateZ(0);
}

.track-cover-fallback {
  background-image: linear-gradient(140deg, #1f6756, #113453 55%, #2a4b2a);
}

.track-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.track-favorite {
  min-height: auto;
  min-width: 0;
  padding: 0.18rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--brass);
  opacity: 0.78;
}

.track-favorite.is-on {
  color: var(--brass);
  opacity: 1;
}

.track-favorite:hover {
  background: rgba(176, 141, 87, 0.12);
}

.track-favorite svg {
  width: 1rem;
  height: 1rem;
  display: block;
}

.track-share,
.track-download {
  min-height: 42px;
  padding: 0.65rem 0.95rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.track-download,
.track-share-icon {
  min-height: auto;
  min-width: 0;
  padding: 0.2rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--brass);
}

.track-download:hover,
.track-share-icon:hover {
  background: rgba(176, 141, 87, 0.12);
}

.track-download svg,
.track-share-icon svg {
  width: 1.02rem;
  height: 1.02rem;
  display: block;
}

.admin-track-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
}

.admin-select-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  flex: 0 0 auto;
  min-width: 26px;
}

.drag-handle {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1;
  user-select: none;
  cursor: grab;
}

.admin-track-item.dragging .drag-handle {
  cursor: grabbing;
}

.bulk-actions-bar .secondary {
  min-height: 36px;
  padding: 0.45rem 0.7rem;
  font-size: 0.9rem;
}

.bulk-actions-bar .secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.admin-track-buttons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
}

.admin-track-buttons .secondary {
  width: 128px;
  min-width: 128px;
  min-height: 42px;
}

.admin-track-item .track-row {
  align-items: center;
}

.admin-original-file {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.admin-original-file-row {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.15rem;
}

.track-meta {
  color: var(--muted);
  margin-top: 0.2rem;
  font-size: 0.92rem;
}

.track-artist,
.track-uploaded {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.track-uploaded {
  font-size: 0.76rem;
}

.track-text {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.player-card {
  position: relative;
  display: block;
}

.player-idle {
  position: absolute;
  inset: 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.996);
  transition: opacity 240ms ease, transform 300ms ease;
  background:
    radial-gradient(circle at top left, rgba(37, 194, 160, 0.2), transparent 45%),
    radial-gradient(circle at bottom right, rgba(28, 163, 127, 0.18), transparent 50%),
    var(--bg);
  background-size: 150% 150%, 160% 160%, auto;
  background-position: 0% 0%, 100% 100%, 0% 0%;
}

.player-idle::before,
.player-idle::after {
  content: "";
  position: absolute;
  inset: -8% -8%;
  pointer-events: none;
}

.player-card.is-idle .player-idle {
  opacity: 1;
  transform: scale(1);
}

.player-card.is-idle .now-cover,
.player-card.is-idle .wave-player-box {
  opacity: 0;
  pointer-events: none;
}

.player-card.is-idle .now-cover {
  transform: translateY(-12px) scale(0.992);
}

.player-card.is-idle .wave-player-box {
  transform: translateY(12px) scale(0.992);
}

.player-card.is-transitioning-out-idle .player-idle {
  opacity: 0;
  transform: scale(1.01);
}

.player-card.is-ejecting .player-idle {
  opacity: 0;
  transform: scale(1.01);
}

.player-card.is-ejecting .now-cover {
  opacity: 0;
  transform: translateY(-24px) scale(0.992);
  pointer-events: none;
}

.player-idle::before {
  /* Wavy line field (subtle, same palette as page background). */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 700' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%2325c2a0' stroke-opacity='0.07' stroke-width='1.2'%3E%3Cpath d='M20 0 C120 120 120 260 20 380 C-70 500 -60 620 20 700'/%3E%3Cpath d='M70 0 C170 120 170 260 70 380 C-20 500 -10 620 70 700'/%3E%3Cpath d='M120 0 C220 120 220 260 120 380 C30 500 40 620 120 700'/%3E%3Cpath d='M170 0 C270 120 270 260 170 380 C80 500 90 620 170 700'/%3E%3Cpath d='M220 0 C320 120 320 260 220 380 C130 500 140 620 220 700'/%3E%3Cpath d='M270 0 C370 120 370 260 270 380 C180 500 190 620 270 700'/%3E%3Cpath d='M320 0 C420 120 420 260 320 380 C230 500 240 620 320 700'/%3E%3Cpath d='M370 0 C470 120 470 260 370 380 C280 500 290 620 370 700'/%3E%3Cpath d='M420 0 C520 120 520 260 420 380 C330 500 340 620 420 700'/%3E%3Cpath d='M470 0 C570 120 570 260 470 380 C380 500 390 620 470 700'/%3E%3Cpath d='M520 0 C620 120 620 260 520 380 C430 500 440 620 520 700'/%3E%3Cpath d='M570 0 C670 120 670 260 570 380 C480 500 490 620 570 700'/%3E%3Cpath d='M620 0 C720 120 720 260 620 380 C530 500 540 620 620 700'/%3E%3Cpath d='M670 0 C770 120 770 260 670 380 C580 500 590 620 670 700'/%3E%3Cpath d='M720 0 C820 120 820 260 720 380 C630 500 640 620 720 700'/%3E%3Cpath d='M770 0 C870 120 870 260 770 380 C680 500 690 620 770 700'/%3E%3Cpath d='M820 0 C920 120 920 260 820 380 C730 500 740 620 820 700'/%3E%3Cpath d='M870 0 C970 120 970 260 870 380 C780 500 790 620 870 700'/%3E%3Cpath d='M920 0 C1020 120 1020 260 920 380 C830 500 840 620 920 700'/%3E%3Cpath d='M970 0 C1070 120 1070 260 970 380 C880 500 890 620 970 700'/%3E%3Cpath d='M1020 0 C1120 120 1120 260 1020 380 C930 500 940 620 1020 700'/%3E%3Cpath d='M1070 0 C1170 120 1170 260 1070 380 C980 500 990 620 1070 700'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 140% 110%;
  background-repeat: no-repeat;
  background-position: -8% 50%;
  opacity: 0.1;
  transform: scale(1.02);
}

.player-idle::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 700' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%231ca37f' stroke-opacity='0.05' stroke-width='1'%3E%3Cpath d='M45 0 C145 110 145 270 45 390 C-45 520 -35 620 45 700'/%3E%3Cpath d='M95 0 C195 110 195 270 95 390 C5 520 15 620 95 700'/%3E%3Cpath d='M145 0 C245 110 245 270 145 390 C55 520 65 620 145 700'/%3E%3Cpath d='M195 0 C295 110 295 270 195 390 C105 520 115 620 195 700'/%3E%3Cpath d='M245 0 C345 110 345 270 245 390 C155 520 165 620 245 700'/%3E%3Cpath d='M295 0 C395 110 395 270 295 390 C205 520 215 620 295 700'/%3E%3Cpath d='M345 0 C445 110 445 270 345 390 C255 520 265 620 345 700'/%3E%3Cpath d='M395 0 C495 110 495 270 395 390 C305 520 315 620 395 700'/%3E%3Cpath d='M445 0 C545 110 545 270 445 390 C355 520 365 620 445 700'/%3E%3Cpath d='M495 0 C595 110 595 270 495 390 C405 520 415 620 495 700'/%3E%3Cpath d='M545 0 C645 110 645 270 545 390 C455 520 465 620 545 700'/%3E%3Cpath d='M595 0 C695 110 695 270 595 390 C505 520 515 620 595 700'/%3E%3Cpath d='M645 0 C745 110 745 270 645 390 C555 520 565 620 645 700'/%3E%3Cpath d='M695 0 C795 110 795 270 695 390 C605 520 615 620 695 700'/%3E%3Cpath d='M745 0 C845 110 845 270 745 390 C655 520 665 620 745 700'/%3E%3Cpath d='M795 0 C895 110 895 270 795 390 C705 520 715 620 795 700'/%3E%3Cpath d='M845 0 C945 110 945 270 845 390 C755 520 765 620 845 700'/%3E%3Cpath d='M895 0 C995 110 995 270 895 390 C805 520 815 620 895 700'/%3E%3Cpath d='M945 0 C1045 110 1045 270 945 390 C855 520 865 620 945 700'/%3E%3Cpath d='M995 0 C1095 110 1095 270 995 390 C905 520 915 620 995 700'/%3E%3Cpath d='M1045 0 C1145 110 1145 270 1045 390 C955 520 965 620 1045 700'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 150% 115%;
  background-repeat: no-repeat;
  background-position: 6% 50%;
  opacity: 0.06;
  filter: blur(0.4px);
  transform: scale(1.03);
}

@keyframes idle-swirl-a {
  0% {
    background-position: -12% 48%;
    transform: scale(1.02);
  }
  100% {
    background-position: 2% 52%;
    transform: scale(1.05);
  }
}

@keyframes idle-swirl-b {
  0% {
    background-position: 10% 51%;
    transform: scale(1.01);
  }
  100% {
    background-position: -5% 49%;
    transform: scale(1.04);
  }
}

.now-cover {
  --cover-overlay-inset: 16px;
  width: 100%;
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 1px solid var(--border);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 220ms ease, transform 260ms ease;
  overflow: hidden;
  background-clip: padding-box;
  isolation: isolate;
  cursor: default;
}

.now-cover.has-track {
  cursor: pointer;
}

.now-cover-fallback {
  background-image: linear-gradient(145deg, #1f6756, #113453 58%, #2a4b2a);
}

.now-cover-meta {
  position: absolute;
  top: var(--cover-overlay-inset);
  left: var(--cover-overlay-inset);
  right: var(--cover-overlay-inset);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 16px;
  z-index: 4;
  pointer-events: none;
  border: 1px solid rgba(171, 216, 206, 0.1);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(20, 44, 47, 0.22), rgba(21, 51, 54, 0.22));
  box-shadow: 0 8px 20px rgba(3, 11, 15, 0.08);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  visibility: visible;
  transition:
    opacity 260ms ease,
    transform 320ms ease,
    visibility 0s linear 0s;
}

.now-cover-copy {
  max-width: min(68%, 24rem);
}

.now-cover-title {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1;
  text-shadow: 0 1px 10px rgba(7, 14, 16, 0.28);
}

.now-cover-artist {
  margin: 0.5rem 0 0;
  font-size: 1rem;
  line-height: 1.08;
  color: rgba(232, 238, 242, 0.82);
  text-shadow: 0 1px 10px rgba(7, 14, 16, 0.28);
}

.now-cover-times {
  display: inline-flex;
  gap: 0.28rem;
  align-items: flex-start;
  color: rgba(234, 240, 244, 0.84);
  font-size: 1rem;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 1px 10px rgba(7, 14, 16, 0.28);
}

.now-title {
  display: none;
}

.now-artist {
  display: none;
}

.now-credits {
  display: none;
}

.now-privacy {
  display: none;
}

.wave-player-box {
  --waveform-height: clamp(46px, 6.5vw, 66px);
  position: absolute;
  left: var(--cover-overlay-inset);
  right: var(--cover-overlay-inset);
  bottom: var(--cover-overlay-inset);
  border: 1px solid var(--border);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(20, 44, 47, 0.26), rgba(21, 51, 54, 0.26));
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 220ms ease, transform 260ms ease;
  overflow: hidden;
  z-index: 3;
  border-color: rgba(171, 216, 206, 0.1);
  box-shadow: 0 8px 20px rgba(3, 11, 15, 0.1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  visibility: visible;
  transition:
    opacity 260ms ease,
    transform 320ms ease,
    visibility 0s linear 0s;
}

.now-cover.cover-overlays-hidden .now-cover-meta {
  opacity: 0;
  transform: translateY(calc(-100% - 12px));
  visibility: hidden;
  transition:
    opacity 260ms ease,
    transform 320ms ease,
    visibility 0s linear 320ms;
}

.now-cover.cover-overlays-hidden .wave-player-box {
  opacity: 0;
  transform: translateY(calc(100% + 12px));
  visibility: hidden;
  transition:
    opacity 260ms ease,
    transform 320ms ease,
    visibility 0s linear 320ms;
}

.wave-controls {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  align-items: center;
  justify-items: center;
  gap: 6px;
}

.wave-controls-row {
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 0;
  gap: 0;
  margin: 0;
}

.icon-btn {
  width: 24px;
  min-width: 24px;
  height: 24px;
  padding: 0.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: none;
  background: transparent;
  border-radius: 8px;
  color: var(--text);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.wave-times {
  display: none;
}

.waveform {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: var(--waveform-height);
  height: var(--waveform-height);
  max-height: var(--waveform-height);
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(83, 205, 178, 0.06), rgba(0, 0, 0, 0));
}

.waveform > *,
.waveform > div,
.waveform canvas {
  height: 100% !important;
  max-height: 100% !important;
}

.waveform > *,
.waveform > div {
  border-radius: 10px;
}

.waveform-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  backdrop-filter: blur(1px);
  background: linear-gradient(90deg, rgba(8, 16, 21, 0.68), rgba(19, 43, 52, 0.6));
  pointer-events: none;
}

.waveform-loading-spinner {
  width: 0.92rem;
  height: 0.92rem;
  border-radius: 999px;
  border: 2px solid rgba(133, 232, 210, 0.32);
  border-top-color: rgba(133, 232, 210, 0.95);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

a {
  color: var(--accent);
}

button,
.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.65rem 0.95rem;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 600;
  background: var(--accent);
  color: #05241b;
  transition: background 120ms ease;
  text-decoration: none;
  display: inline-block;
}

button:hover,
.btn:hover {
  background: var(--accent-2);
}

.secondary {
  border-color: var(--border);
  color: var(--text);
  background: transparent;
}

.secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

button.icon-btn,
.icon-btn {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0.15rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

button.icon-btn:hover,
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

button.icon-btn.is-on,
.icon-btn.is-on {
  background: rgba(255, 255, 255, 0.08);
}

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

.error {
  color: var(--brass);
  margin: 0;
}

.player-page-error {
  color: var(--brass);
  text-align: center;
  margin: 1rem 0 0;
}

.site-footer {
  margin-top: 1.2rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
  color: rgba(20, 52, 47, 0.95);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.player-list-tools {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.45rem;
}

.favorite-filter-btn {
  min-height: 34px;
  padding: 0.4rem 0.8rem;
  font-size: 0.86rem;
}

.favorite-filter-btn.is-on {
  border-color: rgba(37, 194, 160, 0.8);
  color: var(--accent);
}

.form {
  display: grid;
  gap: 0.75rem;
}

label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.93rem;
  color: var(--muted);
}

.label-head {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.audio-hint {
  white-space: nowrap;
}

input,
textarea {
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  padding: 0.7rem 0.8rem;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

.row {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  flex-wrap: wrap;
}

.form-actions {
  margin-top: 0.45rem;
  justify-content: space-between;
  align-items: center;
}

.upload-panel-logo {
  width: min(190px, 38%);
  height: auto;
  opacity: 0.9;
  margin-right: 0.45rem;
}

.auth-only-panel {
  min-height: 180px;
  display: grid;
  place-items: center;
}

.auth-only-content {
  display: grid;
  gap: 0.7rem;
  width: min(360px, 100%);
}

.google-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff, #ebf0f7);
  color: #1b2532;
  padding: 0.8rem 1rem;
  font-weight: 700;
}

.google-login-btn:hover {
  background: linear-gradient(180deg, #ffffff, #dee7f3);
}

.google-login-icon {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: #fff;
  color: #2a6df6;
  display: inline-grid;
  place-items: center;
  font-weight: 800;
}

.admin-header-actions {
  justify-content: flex-end;
}

.admin-header-actions .btn,
.admin-header-actions button {
  width: 140px;
  min-width: 140px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.upload-progress-wrap {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.6rem;
}

.upload-progress {
  width: 100%;
  height: 0.75rem;
  accent-color: var(--accent);
}

.file-picker-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

@media (max-width: 900px) {
  .player-card {
    display: block;
  }

  .player-header .row {
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    margin-left: auto;
  }

  .brand-logo {
    width: min(520px, 62vw);
    margin-right: 0.75rem;
  }

  .grid {
    grid-template-columns: 1fr;
    row-gap: 0;
  }

  .grid > .player-card {
    order: 1;
    overflow: hidden;
    max-height: 2000px;
    opacity: 1;
    position: relative;
    transition:
      max-height 320ms ease,
      opacity 220ms ease,
      padding 220ms ease,
      margin-bottom 220ms ease,
      border-color 220ms ease;
    margin-bottom: 1rem;
  }

  .grid > .player-card.is-idle {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-color: transparent;
    margin-bottom: 0;
    pointer-events: none;
  }

  .grid > .panel:first-child {
    order: 2;
  }

  .track-list {
    max-height: 56vh;
  }

  .now-cover {
    --cover-overlay-inset: 12px;
    aspect-ratio: 1 / 1;
    min-height: 0;
  }

  .now-cover-meta {
    top: var(--cover-overlay-inset);
    left: var(--cover-overlay-inset);
    right: var(--cover-overlay-inset);
    padding: 12px 14px;
  }

  .now-cover-copy {
    max-width: min(68%, 15rem);
  }

  .now-cover-title {
    font-size: 1.38rem;
  }

  .now-cover-artist {
    font-size: 0.92rem;
  }

  .now-cover-times {
    gap: 0.18rem;
    font-size: 0.84rem;
  }

  .wave-player-box {
    --waveform-height: 42px;
    padding: 10px;
    gap: 8px;
  }

  .now-credits,
  .now-privacy {
    display: none;
  }

  .wave-controls-row {
    min-height: 30px;
    padding: 0;
  }

  .wave-controls {
    gap: 4px;
  }

  .waveform {
    min-height: var(--waveform-height);
  }

  .icon-btn {
    width: 20px;
    min-width: 20px;
    height: 20px;
    border-radius: 8px;
  }

  .icon-btn svg {
    width: 16px;
    height: 16px;
  }

  .track-title {
    gap: 0;
  }

  .track-duration {
    min-width: 6ch;
  }

  .admin-select-wrap {
    min-width: 22px;
  }
}

@media (max-width: 1200px) and (min-width: 901px) {
  .now-cover-title {
    font-size: clamp(2.8rem, 3.5vw, 3.25rem);
  }

  .now-cover-artist {
    font-size: clamp(1.85rem, 2.2vw, 2.1rem);
  }

  .now-cover-times {
    font-size: clamp(1.6rem, 1.85vw, 1.85rem);
  }

  .waveform {
    min-height: var(--waveform-height);
  }
}
