:root {
  --canvas: #eef0e9;
  --ink: #1f2620;
  --body: #4b5249;
  --muted: #747b70;
  --line: #d9ddd2;
  --card: #f7f8f3;
  --panel: #172019;
  --panel-2: #212c23;
  --panel-ink: #e9eee3;
  --amber: #f2b705;
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --text: "Figtree", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font: 400 16px/1.55 var(--text);
  overflow-x: hidden;
}
h1, h2 { font-family: var(--display); color: var(--ink); font-weight: 500; margin: 0; letter-spacing: -0.02em; }
button, input { font: inherit; }

.top {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1160px; margin: 0 auto; padding: 18px 20px 6px;
}
.mark { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font: 600 19px/1 var(--display); }
.mark svg { width: 26px; height: 26px; color: var(--ink); }
.support { color: var(--ink); font-weight: 500; text-decoration: none; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: 14px; }
.support:hover { border-color: var(--ink); }

.layout {
  max-width: 1160px; margin: 0 auto; padding: 8px 20px 40px;
  display: grid; gap: 28px;
}
@media (min-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; padding-top: 24px; }
  .instrument { position: sticky; top: 20px; align-self: start; }
}

.instrument h1 { font-size: clamp(32px, 7.4vw, 52px); line-height: 1.02; max-width: 14ch; }
.lede { margin: 12px 0 20px; max-width: 46ch; font-size: 17px; }

.scope {
  position: relative; border-radius: 22px; overflow: hidden;
  background: var(--panel); aspect-ratio: 16 / 10; min-height: 220px;
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 18px 40px -24px rgba(23,32,25,.55);
}
.scope canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.now {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 20px 18px;
  background: linear-gradient(to top, rgba(23,32,25,.92) 35%, rgba(23,32,25,0));
  display: flex; flex-direction: column; gap: 2px;
}
.now-label { font: 500 clamp(26px, 6vw, 36px)/1.1 var(--display); color: var(--panel-ink); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.now-sub { color: #aab3a4; font-size: 14px; }
.now.live .now-label::before {
  content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: var(--amber); margin-right: 10px; vertical-align: middle;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .35; } }

.controls { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.listen {
  flex: 1 1 220px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--amber); color: #1d1a0c; font-weight: 600; font-size: 17px;
  transition: transform .12s ease, background .2s ease;
}
.listen:active { transform: scale(.98); }
.listen .dot { width: 12px; height: 12px; border-radius: 50%; background: #1d1a0c; }
.listen.on { background: var(--ink); color: var(--panel-ink); }
.listen.on .dot { border-radius: 2px; background: var(--amber); }
.listen:disabled { opacity: .6; cursor: progress; }
.file {
  flex: 1 1 160px; position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--ink);
  color: var(--ink); font-weight: 500; cursor: pointer;
}
.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file:focus-within { outline: 2px solid var(--amber); outline-offset: 2px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 15px; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--ink); }
.status { min-height: 1.5em; margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.status.err { color: #a2372a; }

.heard-head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.heard h2 { font-size: 26px; }
.ghost { background: none; border: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px 0; font-size: 15px; }

.list { list-style: none; margin: 0; padding: 0; }
.row {
  display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 4px 12px; align-items: start;
  padding: 14px 4px; border-bottom: 1px solid var(--line);
  transition: background .4s ease;
}
.row .swatch { width: 12px; height: 12px; border-radius: 50%; margin-top: 7px; }
.row .name { font: 500 19px/1.3 var(--display); color: var(--ink); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.row .group { font-size: 13px; color: var(--muted); }
.row .hint { grid-column: 2 / 4; font-size: 14px; margin: 2px 0 0; }
.row .meta { text-align: right; font-size: 13px; color: var(--muted); white-space: nowrap; }
.row .meta b { display: block; font: 500 15px/1.3 var(--text); color: var(--ink); }
.row .bar { grid-column: 2 / 4; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 6px; }
.row .bar i { display: block; height: 100%; border-radius: 4px; }
.row.live { background: linear-gradient(90deg, rgba(242,183,5,.16), rgba(242,183,5,0) 70%); }
.row.live .name::after { content: "Hearing now"; margin-left: 10px; font: 600 11px/1 var(--text); color: #6b5200; background: rgba(242,183,5,.35); padding: 4px 7px; border-radius: 999px; vertical-align: 3px; }

.empty { padding: 22px 0 6px; max-width: 52ch; }
.empty p { margin: 0 0 10px; }
.small { font-size: 14px; color: var(--muted); }

.log { margin-top: 34px; padding: 22px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.log h2 { font-size: 22px; margin-bottom: 8px; }
.log p { margin: 0 0 14px; }
.log-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pay, .save {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px; border-radius: 999px;
  background: var(--ink); color: var(--panel-ink); text-decoration: none; font-weight: 600; border: 0; cursor: pointer;
}
.pay:hover, .save:hover { background: #2d382e; }
.place { flex: 1 1 200px; min-width: 0; min-height: 48px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.outings { list-style: none; margin: 16px 0 8px; padding: 0; }
.outings li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.outings li b { color: var(--ink); font-weight: 600; }

.foot { max-width: 1160px; margin: 0 auto; padding: 0 20px 40px; font-size: 13px; color: var(--muted); }
.foot p { max-width: 70ch; margin: 0; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.foot p + p { margin-top: 6px; }
.foot a { color: inherit; }
