.has-music-player { padding-bottom: 88px; }
.music-player {
  position: fixed;
  z-index: 20;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  width: 318px;
  max-width: calc(100vw - 24px);
  color: #203151;
  font: 11px/1.5 Tahoma, Verdana, sans-serif;
}
.music-player [hidden] { display: none !important; }
.music-player button, .music-player input { font: inherit; }
.music-player button { cursor: pointer; }
.music-player button:disabled { cursor: default; opacity: .45; }
.music-player button:focus-visible, .music-player input:focus-visible { outline: 3px solid #b85220; outline-offset: 3px; }
.music-player svg { display: block; width: 16px; height: 16px; flex-shrink: 0; }
.music-launcher, .music-window {
  border: 1px solid #26385c;
  background: #d5dce8;
  box-shadow: inset 1px 1px #fff, inset -1px -1px #8792a7, 4px 4px 0 #26385c33;
}
.music-launcher { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 12px; margin-left: auto; color: #213b74; }
.music-launcher:hover { background: #e6edfb; }
.music-launcher > svg { width: 20px; height: 20px; }
.music-launcher-name { font: 700 12px/1.3 "Courier New", monospace; letter-spacing: .04em; }
.music-launcher-state { display: flex; align-items: center; gap: 5px; color: #5c6a80; font: 9px/1.3 "Courier New", monospace; }
.music-light { width: 5px; height: 5px; background: #798aa5; }
.music-player[data-playing="true"] .music-light { background: #287b5b; box-shadow: 0 0 0 1px #c4e5cb; }
.music-window { padding: 3px; }
.music-titlebar { display: flex; align-items: center; justify-content: space-between; padding: 4px 5px 4px 8px; color: #fff; background: linear-gradient(90deg, #172f7f, #376cc5); }
.music-titlebar h2 { display: flex; align-items: center; gap: 7px; color: inherit; font: 700 11px/1.5 "Courier New", monospace; letter-spacing: .06em; }
.music-minimize { display: grid; place-items: center; width: 30px; height: 28px; border: 1px solid; border-color: #fff #71809c #71809c #fff; background: #d5dce8; color: #213151; }
.music-body { padding: 10px; }
.music-display { padding: 11px 12px 10px; border: 2px solid; border-color: #7c8ca6 #f5f8ff #f5f8ff #7c8ca6; background: #142b35; color: #b8e7ce; font-family: "Courier New", monospace; }
.music-display-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.music-time { color: #cff9df; font-size: 27px; line-height: 1; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.music-spectrum { display: flex; align-items: flex-end; gap: 3px; height: 26px; opacity: .8; }
.music-spectrum i { display: block; width: 4px; height: 2px; background: repeating-linear-gradient(to top, #9bd1bc 0 3px, transparent 3px 4px); }
.music-track { overflow: hidden; margin: 0; color: #d0edda; font-size: 12px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.music-track-detail { margin: 3px 0 0; color: #94b3ae; font-size: 9px; line-height: 1.5; letter-spacing: .04em; }
.music-seek-row { display: flex; align-items: center; gap: 10px; margin: 9px 0 4px; }
.music-duration { flex-shrink: 0; width: 36px; color: #4e617f; text-align: right; font: 10px/1.5 "Courier New", monospace; font-variant-numeric: tabular-nums; }
.music-range { appearance: none; -webkit-appearance: none; display: block; width: 100%; min-width: 0; height: 24px; margin: 0; background: transparent; accent-color: #294b91; cursor: pointer; }
.music-range:disabled { cursor: default; opacity: .5; }
.music-range::-webkit-slider-runnable-track { height: 5px; border: 1px solid; border-color: #7b8aa3 #fff #fff #7b8aa3; background: #aebbd0; }
.music-range::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 11px; height: 17px; margin-top: -7px; border: 1px solid; border-color: #fff #3f567a #3f567a #fff; border-radius: 0; background: #b8c9e8; }
.music-range::-moz-range-track { height: 4px; border: 1px solid #7b8aa3; background: #aebbd0; }
.music-range::-moz-range-thumb { width: 10px; height: 16px; border: 1px solid #3f567a; border-radius: 0; background: #b8c9e8; }
.music-controls { display: flex; align-items: center; gap: 6px; }
.music-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 38px; min-height: 36px; padding: 6px 9px; border: 1px solid; border-color: #fff #7585a0 #7585a0 #fff; background: #e9eef7; color: #213e79; box-shadow: 0 0 0 1px #abb7ca; }
.music-button:hover:not(:disabled) { background: #fff1b5; }
.music-button:active:not(:disabled), .music-button[aria-pressed="true"] { border-color: #7585a0 #fff #fff #7585a0; background: #c4d3ec; }
.music-play { min-width: 74px; }
.music-track-count { margin-left: auto; color: #4e617f; font: 9px/1.5 "Courier New", monospace; white-space: nowrap; }
.music-volume-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.music-mute { min-width: 30px; min-height: 30px; padding: 4px; border: 0; box-shadow: none; background: transparent; }
.music-volume { flex: 1; }
.music-volume-value { width: 27px; color: #4e617f; font: 10px/1.5 "Courier New", monospace; text-align: right; }
.music-loop { min-height: 30px; margin-left: 6px; padding: 3px 7px; font: 9px/1.5 "Courier New", monospace !important; }
.music-status { min-height: 28px; margin: 9px 0 0; padding-top: 7px; border-top: 1px solid #b5c0d2; color: #50617c; font: 10px/1.4 "Courier New", monospace; overflow-wrap: anywhere; }
.music-status[data-error="true"] { color: #8c2d37; }
@media (max-width: 520px) {
  .music-player { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); }
  .music-button { min-height: 40px; }
  .music-minimize { width: 36px; height: 32px; }
  .music-range { height: 32px; }
}
@media (max-height: 430px) {
  .music-window { max-height: calc(100dvh - 24px); overflow-y: auto; }
}
@media print { .music-player { display: none !important; } }
