:root {
  color-scheme: light;
  --bg: #f4f6f2;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --primary: #b3262d;
  --primary-text: #ffffff;
  --surface: #f8fafc;
  --accent: #1f7a4d;
  --danger: #991b1b;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(31, 122, 77, 0.12), transparent 34%),
    linear-gradient(135deg, #f7f8f5 0%, #eef2f7 100%);
  color: var(--text);
}

.page {
  width: 100%;
  min-height: 100vh;
  padding: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.card {
  width: 100%;
  max-width: 820px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 34px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

.brand {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
}

.brand-logo {
  width: 156px;
  max-height: 120px;
  object-fit: contain;
  flex: 0 0 auto;
}

.code {
  display: inline-block;
  max-width: 100%;
  margin-bottom: 14px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #eef7f1;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

h1 {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.2;
  text-align: center;
}

.description {
  max-width: 560px;
  margin: 0 auto 22px;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
}

.player {
  margin-top: 24px;
  padding: 22px;
  border: 1px solid var(--border);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: var(--surface);
}

audio {
  width: 100%;
  height: 58px;
  margin-top: 18px;
  display: block;
}

button {
  appearance: none;
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 21px 20px;
  font-size: 21px;
  font-weight: 700;
  background: var(--primary);
  color: var(--primary-text);
  cursor: pointer;
}

button:active {
  transform: translateY(1px);
}

.notice {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.error {
  color: var(--danger);
}

.links {
  margin-top: 24px;
  display: grid;
  gap: 12px;
}

.link-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfb 100%);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  overflow-wrap: anywhere;
}

.track-index {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-text);
  font-size: 14px;
  font-weight: 800;
}

.track-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.track-main strong {
  font-size: 17px;
  line-height: 1.25;
}

.track-description,
.file-name {
  color: var(--muted);
  font-size: 13px;
}

.track-url {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listen-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid rgba(179, 38, 45, 0.18);
  background: #fff2f3;
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.listen-link:hover {
  background: var(--primary);
  color: var(--primary-text);
}

.listen-link:active {
  transform: translateY(1px);
}

@media (max-width: 480px) {
  .page {
    padding: 16px;
    align-items: flex-start;
  }

  .card {
    margin-top: 20px;
    padding: 20px;
  }

  .brand {
    font-size: 16px;
  }

  .brand-logo {
    width: 126px;
    max-height: 96px;
  }

  h1 {
    font-size: 24px;
  }

  .player {
    padding: 18px;
  }

  button {
    padding: 19px 18px;
    font-size: 20px;
  }

  .link-row {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
  }

  .track-index {
    width: 38px;
    height: 38px;
  }

  .listen-link {
    grid-column: 1 / -1;
    width: 100%;
  }
}
