:root {
  --ink: #14110e;
  --panel: #1f1a15;
  --panel-2: #2a231c;
  --line: rgba(243, 230, 212, 0.12);
  --cream: #f3e6d4;
  --muted: #b8a894;
  --copper: #d4894a;
  --copper-deep: #9a5a24;
  --live: #e24b3b;
  --ok: #7cb07a;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(212, 137, 74, 0.16), transparent 50%),
    radial-gradient(900px 400px at 100% 0%, rgba(226, 75, 59, 0.08), transparent 45%),
    var(--ink);
  color: var(--cream);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}

body {
  padding: 28px clamp(16px, 4vw, 48px) 64px;
}

a {
  color: inherit;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--copper);
  display: grid;
  place-items: center;
  position: relative;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  border: 1.5px solid var(--copper);
  border-radius: 50%;
}

.brand-mark::before {
  inset: 7px;
}

.brand-mark::after {
  inset: 14px;
  background: var(--copper);
}

.brand h1,
.page-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 560;
  letter-spacing: -0.03em;
  margin: 0;
}

.brand h1 {
  font-size: 1.35rem;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

nav {
  display: flex;
  gap: 8px;
}

nav a {
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

nav a.active,
nav a:hover {
  color: var(--cream);
  border-color: rgba(212, 137, 74, 0.55);
  background: rgba(212, 137, 74, 0.12);
}

.grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 22px;
}

.panel {
  background: linear-gradient(180deg, var(--panel), #181410);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.panel h2,
.page-title {
  font-family: "Fraunces", Georgia, serif;
  margin: 0 0 8px;
}

.lede {
  color: var(--muted);
  margin: 0 0 22px;
  line-height: 1.55;
}

.meter {
  height: 88px;
  border-radius: 14px;
  background: #0d0b09;
  border: 1px solid var(--line);
  overflow: hidden;
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.live-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 16px 0 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  color: var(--muted);
}

.pill.live {
  color: #ffd4cf;
  border-color: rgba(226, 75, 59, 0.45);
  background: rgba(226, 75, 59, 0.14);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.pill.live .dot {
  animation: pulse 1.1s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.stat {
  background: var(--panel-2);
  border-radius: 12px;
  padding: 12px 14px;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat strong {
  display: block;
  margin-top: 4px;
  font-size: 1.05rem;
}

.connect-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.connect-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: #0d0b09;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid var(--line);
}

code,
.copy-target {
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 0.82rem;
  color: #f0c89a;
  word-break: break-all;
}

button,
.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--copper);
  color: #1a110a;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

button.ghost,
.btn.ghost {
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--line);
}

button.danger {
  background: transparent;
  color: #ffb4ac;
  border: 1px solid rgba(226, 75, 59, 0.4);
}

.hint {
  margin-top: 18px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(212, 137, 74, 0.08);
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.92rem;
}

.recordings {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-family: "Fraunces", Georgia, serif;
}

.meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

audio {
  width: 100%;
  margin-top: 10px;
}

.player-wrap {
  grid-column: 1 / -1;
}

@media (max-width: 880px) {
  .grid,
  .card {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}
