body { background-image: none; background: #080808; }
main { padding: .5rem 0; }
.timer-container { max-width: 1280px; padding: clamp(.6rem, 2vw, 1.5rem); }
.timer-card { border: 1px solid #452020; padding: clamp(.8rem, 2vw, 1.5rem); }
.timer-display { font-size: clamp(5rem, 20vw, 15rem); font-variant-numeric: tabular-nums; margin: 1rem 0; color: #ff4545; }
.timer-header { margin-bottom: 1rem; }
.timer-controls { margin: 1rem 0; flex-wrap: wrap; gap: .7rem; }
.timer-presets { flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.timer-round { margin-bottom: .5rem; }
.timer-settings { margin: 1rem 0 0; padding: .7rem; gap: .6rem; grid-template-columns: repeat(auto-fit,minmax(155px,1fr)); }
.setting-group { padding: .7rem; }
.timer-configuration summary { cursor: pointer; padding: .8rem; color: #ddd; }
.jukebox {
  color: #fff;
  background: linear-gradient(135deg, #12151f, #17101d 65%, #160e13) padding-box,
    linear-gradient(120deg, #00d9f3, #ff64c4 44%, #ffe15b 72%, #ff3154) border-box;
  border: 2px solid transparent; border-radius: 16px; padding: 1rem;
  box-shadow: 0 0 18px #00d9ff0d, 0 0 22px #ff31540d;
}
.jukebox h2 { font-size: 1.25rem; }
.jukebox-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.request-controls { display:flex; gap:.6rem; align-items:center; }
.jukebox-art { width:52px; height:52px; object-fit:contain; flex-shrink:0; }
.jukebox #jukebox-install { background:#241829; border-color:#ff64c4; font-size:.9rem; margin-top:.8rem; }
#install-help { color:#fff; font-size:.9rem; padding:.8rem 0; max-width:650px; }
.btn-back { color:#ddd !important; border:1px solid #555; }
.jukebox button { padding: .7rem 1rem; border: 1px solid #ff3154; border-radius: 8px; background: #751626; color: white; cursor:pointer; }
.jukebox #request-open, .jukebox #search-button { background:#123c48; border-color:#00d9f3; box-shadow:0 0 10px #00d9ff18; }
.jukebox #voice-button { background:#241829; border-color:#ff64c4; }
.jukebox #add-song { background:#571326; border-color:#ff3154; }
.jukebox button:hover:not(:disabled) { filter:brightness(1.2); }
.jukebox button:focus-visible, .jukebox input:focus-visible { outline:2px solid #ffe15b; outline-offset:3px; }
.jukebox-heading { padding-bottom:.8rem; border-bottom:1px solid #ff315477; }
.jukebox-art { filter:drop-shadow(0 0 6px #00d9ff30); }
.jukebox h2, .jukebox h3, .jukebox p, .jukebox small, .jukebox label, .jukebox a { color:#fff; }
.jukebox button:disabled { opacity: .5; }
.jukebox input { min-width: 0; flex: 1; padding: .7rem; background: #0d111b; border: 1px solid #00d9ff66; color: white; border-radius: 8px; }
.jukebox form { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1rem 0; }
.jukebox-status { color: #fff; font-size: .9rem; }
.song { display: flex; align-items: center; gap: .7rem; margin: .6rem 0; }
.song img { width: 64px; height: 48px; object-fit: cover; border-radius: 5px; }
.song small { display: block; color: #fff; }
#queue { padding-left: 1.5rem; max-height: 220px; overflow: auto; }
#matches button { width: 100%; text-align: left; background: #11151f; border-color:#ff64c477; margin: .2rem 0; }
#current-song { margin-top:.8rem; padding:.7rem; background:#11151f; border:1px solid #00d9ff66; border-radius:12px; overflow-wrap:anywhere; }
#queue li { padding:.1rem .5rem; margin:.35rem 0; border-left:2px solid #ffe15b; background:#11151f; border-radius:0 8px 8px 0; overflow-wrap:anywhere; }
#song-confirmation { padding:.8rem; border:1px solid #ff64c477; border-radius:12px; background:#17111e; }
#request-panel { scroll-margin-top: 100px; }
#request-message { min-height: 1.5rem; }
@media(max-width: 600px) { .btn-timer { font-size: 1.1rem; padding: .9rem 1.3rem; } .timer-phase { font-size: 1.5rem; } .preset-btn { padding: .6rem .8rem; } .jukebox-heading button { width: 100%; } }
/* Phone and tablet layout: timer first, comfortable touch controls below. */
.song > div { min-width: 0; overflow-wrap: break-word; }
.song img { flex-shrink: 0; }
#install-help, .jukebox-status { overflow-wrap: break-word; }
@media (max-width: 768px) {
  .timer-container, .timer-card, .jukebox { min-width: 0; }
  .jukebox button, .preset-btn, .btn-timer, .timer-configuration summary,
  #install-help summary { min-height: 44px; touch-action: manipulation; }
  .jukebox input, .setting-group input { font-size: 16px; min-height: 44px; }
  .request-controls { width: 100%; }
  #request-open { flex: 1; }
  .jukebox h2 { margin-bottom: 0; }
  .jukebox form input { flex-basis: 100%; width: 100%; }
  #voice-button, #search-button { flex: 1; }
  #song-confirmation button { margin: .25rem 0; }
  #jukebox-install { width: 100%; }
}
@media (max-width: 480px) {
  .timer-container { padding: .5rem; }
  .timer-card { padding: .75rem; border-radius: 14px; margin-bottom: 1rem; }
  .timer-header h1 { font-size: 1.6rem; }
  .timer-display { font-size: 22vw; margin: .8rem 0; white-space: nowrap; }
  .timer-round { font-size: 1.1rem; }
  .timer-controls .btn-timer { flex: 1; padding: .8rem .5rem; letter-spacing: 0; }
  .timer-presets { gap: .4rem; }
  .preset-btn { flex: 1 1 40%; }
  .timer-settings { grid-template-columns: minmax(0, 1fr); padding: .5rem; }
  .jukebox { padding: .75rem; border-radius: 14px; }
  .jukebox-art { width: 48px; height: 48px; }
  #song-confirmation button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .timer-card *, .jukebox * { transition: none; scroll-behavior: auto; }
}
