.sound-card,
.sound-dock {
  --sound-ink: #f4e8ce;
  left: max(16px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  border: 1px solid #f4e8ce66;
  border-radius: 28px;
  background: #112e2bea;
  color: var(--sound-ink);
  font-family: var(--sans);
}

.sound-card {
  position: absolute;
  z-index: 3;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 7px;
  width: min(258px, calc(100% - 32px));
  padding: 3px 5px 3px 7px;
  text-align: left;
}

.sound-transport { display: flex; align-items: center; }
.sound-title {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 600 14px/1.1 var(--serif);
}

.sound-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: inherit;
}
.sound-icon:hover:not(:disabled),
.sound-icon[aria-expanded="true"] { background: #f4e8ce1c; }
.sound-icon:disabled { opacity: .45; cursor: default; }
.sound-icon:focus-visible,
.sound-range:focus-visible { outline: 2px solid var(--sound-ink); outline-offset: 2px; }
.sound-icon svg { width: 18px; height: 18px; fill: currentColor; }
.sound-card .sound-icon { width: 37px; }
.sound-card .sound-skip { width: 28px; }
.sound-skip svg { width: 15px; height: 15px; }
.sound-play { position: relative; }
.sound-play::before { content: ""; position: absolute; width: 29px; height: 29px; border: 1px solid #f4e8ce81; border-radius: 50%; pointer-events: none; }
[data-playing="true"] { --sound-play-display: none; --sound-pause-display: inline; }
[data-muted="true"] { --sound-waves-display: none; --sound-muted-display: inline; }
.sound-play-icon { display: var(--sound-play-display, inline); }
.sound-pause-icon { display: var(--sound-pause-display, none); }
.sound-waves { display: var(--sound-waves-display, inline); }
.sound-muted { display: var(--sound-muted-display, none); }

.sound-range {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: linear-gradient(var(--sound-ink), var(--sound-ink)) center / calc(100% - 8px) 1px no-repeat;
  cursor: pointer;
}
.sound-range:disabled { opacity: .45; cursor: default; }
.sound-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  background: var(--sound-ink);
}
.sound-range::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  background: var(--sound-ink);
}
.sound-position { height: 16px; background-size: calc(100% - 5px) 1px; }
.sound-position::-webkit-slider-thumb { width: 7px; height: 7px; }
.sound-position::-moz-range-thumb { width: 7px; height: 7px; }

.sound-volume { position: relative; flex: none; }
.sound-volume-panel {
  --sound-ink: #263a31;
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: calc(100% + 8px);
  width: 146px;
  padding: 8px 12px 5px;
  border: 1px solid #d7c5a9;
  border-radius: 9px;
  background: #f0e4ce;
  color: var(--sound-ink);
  box-shadow: 0 3px 14px #182d2640;
}
.sound-volume-panel label { display: block; font: 750 10px/1.25 var(--sans); }

.sound-dock {
  position: fixed;
  z-index: 40;
  display: flex;
  padding: 2px;
  box-shadow: 0 3px 14px #182d2640;
}
.sound-dock .sound-volume { position: static; }
.sound-dock .sound-volume-panel { left: 0; right: auto; }
.sound-dock[hidden],
.sound-volume-panel[hidden],
.cover-closed .sound-dock,
.menu-open .sound-dock,
.dialog-open .sound-dock { display: none; }

@media (max-width: 760px) {
  .sound-card { width: min(258px, calc(100% - 153px)); column-gap: 2px; padding-inline: 5px; }
  .sound-card .sound-volume > .sound-icon { width: 34px; }
  .sound-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
    font-size: 13px;
  }
}
@media (max-width: 380px) {
  .sound-card { width: min(238px, calc(100% - 32px)); }
  .sound-card .sound-volume { position: static; }
  .sound-card .sound-volume-panel { left: 0; right: auto; }
}
