:root {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f6f3ec;
  color: #191917;
  font-family: Arial, Helvetica, sans-serif;
}

.demo-shell {
  width: min(960px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.demo-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
  color: #67645d;
  font-size: 14px;
}

.demo-nav a {
  color: #191917;
  font-weight: 700;
  text-decoration: none;
}

.demo-nav a:hover,
.demo-nav a:focus-visible {
  color: #d06634;
}

.pmp {
  width: 100%;
  max-width: 820px;
  min-width: 0;
  margin: 0 auto;
  padding: 0 12px;
  font-family: Arial, Helvetica, sans-serif;
}

.pmp * {
  box-sizing: border-box;
}

.pmp-card {
  width: 100%;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #111;
  color: #fff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.pmp-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.pmp-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.pmp-subtitle {
  margin-top: 5px;
  font-size: 13px;
  color: #aaa;
}

.pmp-time {
  font-size: 13px;
  color: #ccc;
  white-space: nowrap;
  padding-top: 4px;
}

.pmp-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(44px, max-content)) minmax(180px, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.pmp-icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-size: 15px;
  cursor: pointer;
  transition: border-color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

.pmp-icon-button:hover {
  opacity: 0.86;
}

.pmp-icon-button:active {
  transform: scale(0.97);
}

.pmp-icon-button:focus-visible,
.pmp-track-action:focus-visible,
.pmp input[type="range"]:focus-visible {
  outline: 2px solid #4aa0a9;
  outline-offset: 3px;
}

.pmp-icon-button.is-active,
.pmp-track-action.is-active {
  background: #ffb347;
  color: #111;
}

.pmp-icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.pmp-master {
  display: grid;
  grid-template-columns: auto minmax(110px, 1fr) 44px;
  gap: 10px;
  align-items: center;
  color: #ccc;
  font-size: 12px;
}

.pmp-master-value {
  text-align: right;
  color: #aaa;
}

.pmp-progress-wrap {
  margin-bottom: 12px;
}

.pmp input[type="range"] {
  width: 100%;
  accent-color: #e8b95e;
}

.pmp-progress {
  display: block;
}

.pmp-progress:disabled {
  opacity: 0.48;
}

.pmp-meter {
  height: 8px;
  overflow: hidden;
  margin-bottom: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.pmp-meter-bar {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: #4aa0a9;
  transition: width 0.06s linear, background-color 0.12s ease;
}

.pmp-meter-bar.is-hot {
  background: #e67746;
}

.pmp-status {
  min-height: 18px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #aaa;
}

.pmp-status.is-error {
  color: #ffb199;
}

.pmp-tracks {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pmp-track {
  display: grid;
  grid-template-columns: 150px 1fr auto auto;
  gap: 10px;
  align-items: center;
  min-height: 64px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.pmp-track-name {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pmp-volume-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pmp-volume-value {
  width: 38px;
  text-align: right;
  font-size: 12px;
  color: #aaa;
}

.pmp-track-action {
  min-width: 62px;
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}

.pmp-track-action:hover {
  border-color: rgba(255, 255, 255, 0.32);
}

.pmp-loading {
  padding: 22px;
  border-radius: 8px;
  background: #111;
  color: #aaa;
  font-size: 14px;
}

@media (max-width: 700px) {
  .demo-shell {
    width: 100%;
    padding: 18px 0 32px;
  }

  .demo-nav {
    padding: 0 14px;
  }

  .pmp {
    width: 100%;
    max-width: 100%;
    padding: 0 10px;
  }

  .pmp-card {
    width: 100%;
    max-width: 100%;
    padding: 14px;
  }

  .pmp-header {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
  }

  .pmp-title {
    font-size: 19px;
  }

  .pmp-subtitle,
  .pmp-time {
    font-size: 12px;
  }

  .pmp-controls {
    grid-template-columns: repeat(3, 44px);
  }

  .pmp-master {
    grid-column: 1 / -1;
  }

  .pmp-track {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 11px;
  }

  .pmp-track-name {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    font-size: 13px;
  }

  .pmp-volume-wrap {
    width: 100%;
  }

  .pmp-volume-wrap input[type="range"] {
    flex: 1;
    min-width: 0;
  }

  .pmp-track-action {
    width: 100%;
  }
}
