:root {
  color-scheme: dark;
  --bg: #060605;
  --panel: rgba(18, 16, 13, .72);
  --ink: #fff5e7;
  --muted: #b7aa98;
  --dim: #786f62;
  --line: rgba(238, 224, 199, .18);
  --gold: #d6b66f;
  --teal: #8fb8b1;
  --red: #b95442;
  --sans: -apple-system, BlinkMacSystemFont, "Noto Sans TC", "PingFang TC", Inter, sans-serif;
  --serif: Didot, Baskerville, Georgia, "Noto Serif TC", serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100svh;
  background:
    radial-gradient(circle at 72% 16%, rgba(143, 184, 177, .14), transparent 28%),
    radial-gradient(circle at 14% 82%, rgba(185, 84, 66, .11), transparent 26%),
    linear-gradient(145deg, #030303, #100e0b 58%, #050504);
  color: var(--ink);
  font-family: var(--sans);
}

.sound-page {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.stage {
  width: min(1120px, 100%);
  min-height: calc(100svh - 36px);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(320px, 1fr);
  gap: 22px;
  align-items: end;
  padding: clamp(20px, 4vw, 44px);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 245, 231, .04), rgba(255, 245, 231, .015));
  overflow: hidden;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.76' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.copy, .console, .layers, .back, canvas { position: relative; z-index: 1; }

.copy {
  align-self: center;
  max-width: 560px;
}

.kicker {
  margin: 0 0 16px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(48px, 8vw, 104px);
  line-height: .94;
  letter-spacing: 0;
}

.statement {
  max-width: 460px;
  margin: 22px 0 0;
  color: #eadfcd;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.62;
}

canvas {
  width: 100%;
  height: min(62svh, 620px);
  min-height: 360px;
  align-self: center;
}

.console {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(16px);
}

button {
  min-height: 44px;
  border: 1px solid rgba(214, 182, 111, .36);
  background: rgba(214, 182, 111, .1);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.play {
  min-width: 92px;
  padding: 0 18px;
  color: #1d160c;
  background: var(--gold);
  border-color: var(--gold);
  font-weight: 900;
}

.arc {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--gold);
}

.chapters {
  display: grid;
  grid-template-columns: repeat(5, 48px);
  gap: 6px;
}

.chapters button {
  padding: 0;
  color: var(--muted);
  background: rgba(255, 245, 231, .04);
  border-color: var(--line);
  font-weight: 850;
}

.chapters button.active {
  color: var(--ink);
  border-color: rgba(143, 184, 177, .62);
  background: rgba(143, 184, 177, .13);
}

.layers {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.layers div {
  min-height: 112px;
  padding: 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

dt {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
}

dd {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.62;
}

.back {
  position: absolute;
  top: 18px;
  right: 18px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  border-bottom: 1px solid rgba(214, 182, 111, .42);
}

@media (max-width: 820px) {
  .sound-page { padding: 10px; }
  .stage {
    min-height: calc(100svh - 20px);
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 56px 16px 16px;
  }
  .copy { align-self: end; }
  h1 { font-size: clamp(44px, 15vw, 68px); line-height: .98; }
  .statement { font-size: 16px; }
  canvas {
    height: 34svh;
    min-height: 260px;
  }
  .console {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .play { width: 100%; }
  .chapters {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .layers {
    grid-template-columns: 1fr 1fr;
  }
  .layers div {
    min-height: 96px;
    padding: 12px;
  }
  dd { font-size: 12px; }
}
