* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: #141210;
  color: #f3e9d2;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
}

.radio {
  width: 100%;
  max-width: 640px;
  background: #1f1b17;
  border: 2px solid #4a3b2c;
  border-radius: 10px;
  padding: 1.5rem;
}

h1 {
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d9a441;
  margin-bottom: 1rem;
}

input[type="range"] {
  flex: 1;
  min-width: 0;
  width: 100%;
  accent-color: #d9a441;
  cursor: pointer;
}

button {
  background: #2e261f;
  color: #f3e9d2;
  border: 1px solid #5c4936;
  border-radius: 4px;
  padding: 0.4rem 0.75rem;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

button:hover {
  background: #3d3228;
}

button.active {
  background: #d9a441;
  color: #141210;
  border-color: #d9a441;
  font-weight: 700;
}

#powerBtn:not(.active) {
  border-color: #a87b2d;
  animation: power-breathe 2.4s ease-in-out infinite;
}

@keyframes power-breathe {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(217, 164, 65, 0.15);
    border-color: #7c5c28;
  }
  50% {
    box-shadow: 0 0 12px 2px rgba(217, 164, 65, 0.45);
    border-color: #d9a441;
  }
}

@media (prefers-reduced-motion: reduce) {
  #powerBtn:not(.active) {
    animation: none;
    border-color: #d9a441;
  }
}

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.volume-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1 1 140px;
  min-width: 0;
  font-size: 0.8rem;
  color: #b59e7a;
}

@media (max-width: 560px) {
  body {
    padding: 0.75rem;
    align-items: flex-start;
  }

  .radio {
    padding: 1rem;
    border-radius: 8px;
  }

  h1 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }

  .bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .bar > button {
    min-height: 40px;
    font-size: 0.85rem;
    padding: 0.45rem 0.5rem;
  }

  .volume-wrap {
    grid-column: 1 / -1;
    padding-top: 0.25rem;
    min-height: 38px;
  }
}
