:root {
  color-scheme: light;
  --bg: #f3f7f8;
  --surface: #ffffff;
  --surface-strong: #edf4f6;
  --ink: #16232a;
  --muted: #5d6c73;
  --line: #d6e1e5;
  --accent: #0b7a8e;
  --accent-strong: #075d6d;
  --accent-soft: #dff2f5;
  --pulse: #f0b429;
  --shadow: 0 18px 50px rgba(21, 48, 58, 0.12);
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(11, 122, 142, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(11, 122, 142, 0.05) 1px, transparent 1px),
    var(--bg);
  background-size: 32px 32px;
  font-family: "Zen Kaku Gothic New", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.site-header,
main,
.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.18rem;
  font-weight: 600;
  font-family: var(--mono);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background:
    linear-gradient(90deg, transparent 20%, var(--surface) 20% 30%, transparent 30% 45%, var(--surface) 45% 55%, transparent 55% 70%, var(--surface) 70% 80%, transparent 80%),
    var(--accent);
  box-shadow: 0 8px 20px rgba(11, 122, 142, 0.22);
}

.policy {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.92rem;
  font-weight: 700;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 22px 0 18px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.now-playing {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 26px rgba(21, 48, 58, 0.08);
  color: var(--muted);
  font-size: 0.92rem;
}

.meter {
  display: grid;
  grid-template-columns: repeat(8, 4px);
  gap: 3px;
  align-items: center;
  height: 28px;
}

.meter i {
  display: block;
  width: 4px;
  height: 8px;
  border-radius: 99px;
  background: var(--accent);
  opacity: 0.42;
}

body.is-playing .meter i {
  animation: level 850ms ease-in-out infinite;
}

.meter i:nth-child(2n) {
  animation-delay: 120ms;
}

.meter i:nth-child(3n) {
  animation-delay: 240ms;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 14px;
}

.tab {
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.tab:hover,
.tab:focus-visible,
.tab.is-active {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.track-panel,
.license-summary,
.license-doc {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2,
.panel-head p {
  margin: 0;
}

.panel-head p {
  color: var(--muted);
  font-size: 0.92rem;
}

.track-list {
  display: grid;
}

.track {
  display: grid;
  grid-template-columns: 48px minmax(160px, 1.2fr) minmax(180px, 1fr) 180px 108px;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.track:last-child {
  border-bottom: 0;
}

.track.is-current {
  background: linear-gradient(90deg, rgba(11, 122, 142, 0.11), transparent 70%);
}

.play-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}

.play-button:hover,
.play-button:focus-visible {
  background: var(--accent-strong);
}

.play-button svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.track-title {
  display: block;
  margin-bottom: 2px;
  font-weight: 800;
}

.track-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.track-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 0.84rem;
}

.tag {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface-strong);
}

.progress-wrap {
  display: grid;
  gap: 4px;
}

.progress {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.time-row {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-family: var(--mono);
  font-size: 0.78rem;
}

.download {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent-strong);
  background: #fff;
  font-weight: 800;
  text-decoration: none;
  transition: transform 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.download svg {
  width: 15px;
  height: 15px;
}

.download:hover,
.download:focus-visible {
  background: var(--accent-soft);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(11, 122, 142, 0.18);
}

.license-summary {
  margin-top: 18px;
  padding: 20px;
}

.license-summary h2 {
  margin-bottom: 12px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.summary-grid h3,
.license-doc h2 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.summary-grid p,
.license-doc p {
  color: var(--muted);
}

code {
  padding: 0.1em 0.35em;
  border-radius: 5px;
  background: var(--surface-strong);
  color: var(--ink);
}

.text-link {
  color: var(--accent-strong);
  font-weight: 800;
}

.booth-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 8px;
  background: #18333c;
  color: #fff;
}

.booth-banner p {
  margin-bottom: 2px;
  color: #c7dde2;
}

.booth-banner strong {
  font-size: 1.2rem;
}

.booth-banner a {
  flex: 0 0 auto;
  padding: 9px 14px;
  border-radius: 8px;
  background: #fff;
  color: #18333c;
  font-weight: 800;
  text-decoration: none;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 36px;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

.license-page {
  padding-top: 20px;
}

.license-page h1 {
  margin: 14px 0 16px;
}

.license-doc {
  padding: 24px;
}

@keyframes level {
  0%,
  100% {
    height: 8px;
    opacity: 0.42;
  }
  50% {
    height: 26px;
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 860px) {
  .intro,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .now-playing {
    min-width: 0;
  }

  .track {
    grid-template-columns: 42px minmax(0, 1fr) 94px;
    gap: 10px;
  }

  .track-meta,
  .progress-wrap {
    grid-column: 2 / -1;
  }
}

@media (max-width: 520px) {
  .site-header,
  .site-footer,
  .booth-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header,
  main,
  .site-footer {
    width: min(100% - 20px, 1120px);
  }

  h1 {
    font-size: 1.75rem;
  }

  .tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .tab {
    flex: 0 0 auto;
  }

  .panel-head,
  .track {
    padding-left: 12px;
    padding-right: 12px;
  }

  .track {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .download {
    grid-column: 2;
    width: 100%;
  }
}
