.player-dock {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 60;
  width: 100%;
  padding: 16px clamp(16px, 2vw, 28px) calc(16px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, auto) minmax(0, 1fr);
  grid-template-areas:
    "now center toolbar"
    "seek seek seek";
  gap: 18px;
  align-items: center;
  color: #f4f6f2;
  background:
    radial-gradient(circle at top left, rgba(54, 162, 97, 0.3), transparent 24%),
    radial-gradient(circle at 82% 20%, rgba(180, 125, 55, 0.22), transparent 24%),
    linear-gradient(135deg, #0f1d17 0%, #162a22 50%, #173126 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-inline: 0;
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 24px 56px rgba(15, 24, 19, 0.28);
}

.player-dock.is-live {
  background:
    radial-gradient(circle at top left, rgba(214, 82, 60, 0.26), transparent 24%),
    radial-gradient(circle at 82% 20%, rgba(255, 184, 92, 0.18), transparent 24%),
    linear-gradient(135deg, #241512 0%, #2d1914 50%, #392019 100%);
}

.player-dock.is-verse {
  background:
    radial-gradient(circle at top left, rgba(180, 125, 55, 0.26), transparent 24%),
    radial-gradient(circle at 82% 20%, rgba(82, 150, 120, 0.16), transparent 24%),
    linear-gradient(135deg, #171713 0%, #242217 50%, #2d2717 100%);
}

.player-dock.is-expanded {
  inset: 0;
  min-height: 100dvh;
  padding:
    clamp(20px, 3vw, 34px)
    clamp(18px, 3.2vw, 38px)
    calc(clamp(20px, 3vw, 34px) + env(safe-area-inset-bottom, 0px));
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: clamp(18px, 2vw, 28px);
  align-items: stretch;
  align-content: stretch;
  border-radius: 0;
  overflow: auto;
  background:
    radial-gradient(circle at 15% 18%, rgba(54, 162, 97, 0.34), transparent 28%),
    radial-gradient(circle at 82% 16%, rgba(180, 125, 55, 0.22), transparent 24%),
    linear-gradient(180deg, #0b1511 0%, #102019 44%, #13261e 100%);
}

.player-dock.is-expanded .player-artwork {
  flex-basis: clamp(180px, 24vw, 260px);
  width: clamp(180px, 24vw, 260px);
  height: clamp(180px, 24vw, 260px);
  border-radius: 50%;
  padding: 24px;
  align-items: center;
  justify-content: flex-end;
}

.player-dock.is-expanded .player-copy h2 {
  font-size: clamp(30px, 4.2vw, 52px);
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  text-align: center;
  line-height: 1.18;
}

.player-dock.is-expanded .player-now {
  grid-row: 2;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  align-self: center;
  gap: 22px;
  width: min(720px, 100%);
  margin: 0 auto;
  text-align: center;
}

.player-dock.is-expanded .player-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.player-dock.is-expanded .player-copy p,
.player-dock.is-expanded .player-mode {
  text-align: center;
}

.player-dock.is-expanded .player-mode {
  margin-inline: auto;
}

.player-dock.is-expanded .player-copy p {
  max-width: 58ch;
}

.player-dock.is-expanded .player-toolbar {
  grid-row: 1;
  width: 100%;
  justify-content: space-between;
  align-items: flex-start;
}

.player-dock.is-expanded .player-center {
  grid-row: 3;
  width: min(760px, 100%);
  margin: 0 auto;
  gap: 16px;
}

.player-dock.is-expanded .player-artwork-image {
  inset: 16px;
  width: calc(100% - 32px);
  height: calc(100% - 32px);
  border-radius: 50%;
}

.player-dock.is-expanded .player-artwork-icon,
.player-dock.is-expanded .player-artwork-label {
  align-self: center;
  text-align: center;
}

.player-dock.is-expanded .player-artwork-label {
  max-width: 76%;
  font-size: 13px;
  line-height: 1.35;
  text-transform: none;
}

.player-dock.is-expanded .player-status-row {
  justify-content: center;
}

.player-dock.is-expanded .player-controls {
  width: min(560px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.player-dock.is-expanded .player-button {
  width: 100%;
  min-width: 0;
  min-height: 62px;
  padding: 0 14px;
}

.player-dock.is-expanded .player-button--primary {
  min-height: 72px;
}

.player-dock.is-expanded .player-picker-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: min(760px, 100%);
}

.player-dock.is-expanded .player-seek,
.player-dock.is-expanded .player-live {
  grid-row: 4;
  width: min(760px, 100%);
  margin: 0 auto;
}

.player-dock.is-expanded .player-live {
  align-items: center;
}

.player-dock.is-expanded .player-live p {
  text-align: center;
}

.player-now,
.player-center,
.player-toolbar {
  min-width: 0;
}

.player-now {
  display: flex;
  align-items: center;
  gap: 16px;
  grid-area: now;
}

.player-artwork {
  position: relative;
  flex: 0 0 88px;
  width: 88px;
  height: 88px;
  border-radius: 26px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 14px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(30, 91, 67, 0.96), rgba(15, 34, 27, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 28px rgba(0, 0, 0, 0.18);
}

.player-artwork::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 11, 9, 0.04), rgba(5, 11, 9, 0.42));
}

.player-artwork[data-kind="radio"] {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(155, 60, 43, 0.96), rgba(40, 18, 15, 0.94));
}

.player-artwork[data-kind="verse"] {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(151, 111, 44, 0.96), rgba(39, 31, 17, 0.94));
}

.player-artwork-image {
  position: absolute;
  inset: 11px;
  width: calc(100% - 22px);
  height: calc(100% - 22px);
  object-fit: contain;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.player-artwork-icon,
.player-artwork-label {
  position: relative;
  z-index: 1;
  color: #fff;
}

.player-artwork-icon {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.player-artwork-label {
  margin-top: 6px;
  font-size: 11px;
  opacity: 0.78;
  text-transform: uppercase;
}

.player-copy {
  min-width: 0;
}

.player-copy p {
  margin: 6px 0 0;
  color: rgba(244, 246, 242, 0.72);
}

.player-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  justify-self: center;
  grid-area: center;
  width: 100%;
}

.player-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  align-self: start;
  grid-area: toolbar;
  gap: 8px;
}

.player-status-row {
  width: 100%;
  display: flex;
  justify-content: center;
}

.player-state-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
  font-weight: 700;
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.player-dock:not(.is-expanded) .player-artwork-icon,
.player-dock:not(.is-expanded) .player-artwork-label {
  display: none;
}

.player-picker-group {
  display: none;
  gap: 12px;
}

.player-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.player-picker-label {
  color: rgba(244, 246, 242, 0.76);
  font-size: 12px;
  font-weight: 700;
}

.field-select--player {
  min-height: 48px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: none;
}

.field-select--player option {
  color: #16241f;
}

.player-tool {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 700;
}

.player-tool--icon {
  width: 52px;
  min-width: 52px;
  min-height: 52px;
  padding: 0;
  border-radius: 18px;
  font-size: 24px;
  line-height: 1;
  display: inline-grid;
  place-items: center;
}

.player-tool--danger {
  color: #ffd9d1;
  border-color: rgba(255, 120, 102, 0.18);
  background: rgba(255, 120, 102, 0.12);
}

.player-button {
  min-width: 48px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.player-button--icon {
  width: 52px;
  min-width: 52px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
  display: inline-grid;
  place-items: center;
}

.player-button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  box-shadow: none;
}

.player-button--primary {
  min-width: 62px;
  min-height: 62px;
  background: linear-gradient(135deg, #2daa63, #17884b);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 24px rgba(38, 170, 94, 0.28);
}

.player-dock.is-live .player-button--primary {
  background: linear-gradient(135deg, #e46f4e, #b84d34);
  box-shadow: 0 12px 24px rgba(228, 111, 78, 0.26);
}

.player-dock.is-verse .player-button--primary {
  background: linear-gradient(135deg, #c99a42, #997225);
  box-shadow: 0 12px 24px rgba(201, 154, 66, 0.24);
}

.player-seek {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  grid-area: seek;
  width: min(760px, 100%);
  justify-self: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.player-seek input {
  width: 100%;
  accent-color: #2daa63;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

.player-seek input::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.player-seek input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  margin-top: -5px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #2daa63;
  border: 2px solid #fff;
  box-shadow: 0 0 0 5px rgba(45, 170, 99, 0.16);
}

.player-seek input::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.player-seek input::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #2daa63;
  border: 2px solid #fff;
  box-shadow: 0 0 0 5px rgba(45, 170, 99, 0.16);
}

.player-live {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  grid-area: seek;
  width: min(760px, 100%);
  justify-self: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.player-live[hidden] {
  display: none;
}

.player-live p {
  margin: 0;
  text-align: center;
  color: rgba(244, 246, 242, 0.74);
  line-height: 1.8;
  font-size: 13px;
}

.player-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: #ffb39f;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 179, 159, 0.18);
  font-weight: 700;
}

.player-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #d6523c;
  box-shadow: 0 0 0 6px rgba(214, 82, 60, 0.16);
}

@media (max-width: 980px) {
  .player-dock {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "now toolbar"
      "center center"
      "seek seek";
  }

  .player-center,
  .player-seek,
  .player-live {
    width: 100%;
  }
}
