* {
  box-sizing: border-box;
}

:root {
  --bg: #111;
  --panel: #111;
  --text: #eee;
  --muted: #aaa;
  --border: #555;
  --button-bg: #eee;
  --button-text: #111;
  --button-border: #999;
  --accent-border: #777;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: monospace;
}

body {
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

#status {
  position: fixed;
  top: 5px;
  right: 10px;
  color: #aaa;
  font-size: 13px;
  opacity: 0.85;
  z-index: 20;
}

.site-header {
  max-width: 560px;
  margin: 0 auto;
  padding: 18px 16px 10px;
}

.title-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.emoji {
  font-size: 26px;
  line-height: 1;
}

.site-title {
  font-size: 24px;
  font-weight: bold;
}

.site-subtitle {
  color: var(--muted);
  font-size: 13px;
  margin-top: 5px;
}

.main-world {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 0 10px 90px;
}

.panel {
  border: 1px solid var(--border);
  background: var(--panel);
}

.hero {
  padding: 18px;
  margin: 8px 0 12px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: 22px;
}

.hero p {
  margin: 0;
  color: #ddd;
  line-height: 1.5;
}

.hero-meta {
  margin-top: 12px;
  color: #888;
  font-size: 13px;
  line-height: 1.5;
}

.controls {
  padding: 8px;
}

.controls input,
.controls select {
  width: 100%;
  margin: 5px 0;
  padding: 10px;
  border: 1px solid #888;
  background: #eee;
  color: #111;
  border-radius: 2px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 2px 8px;
}

.section-head h2 {
  margin: 0;
  font-size: 20px;
}

.section-head span {
  color: #888;
  font-size: 13px;
}

.track-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.track {
  border: 1px solid var(--border);
  padding: 10px;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
}

.cover {
  width: 58px;
  height: 58px;
  border: 1px solid #555;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a1a;
  overflow: hidden;
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-placeholder {
  font-size: 24px;
}

.track-main {
  min-width: 0;
}

.track-title {
  font-size: 16px;
  font-weight: bold;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.track-meta {
  margin-top: 4px;
  color: #999;
  font-size: 12px;
  line-height: 1.4;
}

.track-note {
  margin-top: 7px;
  color: #777;
  font-size: 12px;
  line-height: 1.35;
}

.track-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 6px;
  border: 1px solid var(--button-border);
  background: var(--button-bg);
  color: var(--button-text);
  text-decoration: none;
  cursor: pointer;
}

.action-btn:disabled,
.action-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.empty {
  padding: 20px;
  text-align: center;
  color: #999;
}

.hidden {
  display: none !important;
}

.player {
  position: fixed;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  width: min(540px, calc(100% - 20px));
  padding: 10px;
  z-index: 30;
}

.player-title {
  font-size: 13px;
  margin-bottom: 8px;
  color: #ddd;
  overflow-wrap: anywhere;
}

.player audio {
  width: 100%;
}

footer {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 30px 16px;
  color: #777;
  text-align: center;
  border-top: 1px solid #333;
  line-height: 1.6;
}

.footer-links {
  margin-top: 6px;
}

.footer-links a {
  color: #aaa;
  text-decoration: none;
}

@media (min-width: 700px) {
  .main-world,
  .site-header,
  footer {
    width: min(760px, 100%);
  }

  .track {
    grid-template-columns: 72px 1fr;
    padding: 12px;
  }

  .cover {
    width: 72px;
    height: 72px;
  }
}
