:root {
  color-scheme: dark;
  --bg: #07110f;
  --panel: #101a17;
  --panel-2: #17231f;
  --line: rgba(217, 232, 221, 0.16);
  --text: #f3f7f2;
  --muted: #aab9b0;
  --green: #7ee19d;
  --gold: #f1c76c;
  --blue: #7cbcff;
  --red: #ff867c;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 18% 8%, rgba(126, 225, 157, 0.12), transparent 28rem),
    radial-gradient(circle at 82% 2%, rgba(124, 188, 255, 0.09), transparent 26rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 42px),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 20px;
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 38px;
  border: 1px solid rgba(126, 225, 157, 0.42);
  border-radius: 8px;
  background: rgba(126, 225, 157, 0.1);
  color: var(--green);
  font-size: 0.82rem;
}

.nav-links {
  gap: 22px;
  color: var(--muted);
  font-size: 0.94rem;
}

.dashboard {
  padding: 24px 0 58px;
}

.hero-panel,
.controls,
.recordings-panel,
.player-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 26, 23, 0.88);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 26px;
}

.hero-panel.simple-hero {
  max-width: none;
}

.eyebrow,
.label,
.controls span,
.player-meta span {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 720px;
  margin-bottom: 14px;
  font-size: clamp(2.6rem, 7vw, 5.7rem);
  line-height: 0.96;
}

.lede {
  max-width: 560px;
  margin-bottom: 0;
  color: #cad7d0;
  font-size: 1.08rem;
  line-height: 1.55;
}

.controls {
  display: grid;
  grid-template-columns: minmax(180px, 0.34fr) minmax(180px, 0.34fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
  padding: 16px;
}

.controls label {
  display: grid;
  gap: 8px;
}

.controls input,
.controls select {
  min-width: 0;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #08110f;
  color: var(--text);
  padding: 0 12px;
}

.controls button,
.player-actions button,
.recording-card button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #06100b;
  cursor: pointer;
  font-weight: 840;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.46fr);
  gap: 16px;
  margin-top: 16px;
}

.recordings-panel,
.player-panel {
  padding: 18px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 4px 0 0;
  font-size: 1.45rem;
}

#resultCount {
  color: var(--green);
}

.recording-list {
  display: grid;
  gap: 10px;
}

.recording-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.recording-card.is-active {
  border-color: rgba(126, 225, 157, 0.52);
  background: rgba(126, 225, 157, 0.08);
}

.time-block {
  min-width: 88px;
}

.time-block strong {
  display: block;
  font-size: 1.2rem;
}

.time-block span,
.clip-meta,
.clip-tags {
  color: var(--muted);
  font-size: 0.86rem;
}

.clip-main h3 {
  margin: 0 0 5px;
  font-size: 1.05rem;
}

.clip-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.clip-tags span {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.recording-card button {
  min-width: 76px;
}

.player-panel {
  position: sticky;
  top: 16px;
  align-self: start;
}

.waveform {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 118px;
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(126, 225, 157, 0.08), transparent),
    #08110f;
  overflow: hidden;
}

.waveform::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 50%;
  height: 1px;
  background: rgba(217, 232, 221, 0.18);
}

.waveform span {
  position: relative;
  z-index: 1;
  display: block;
  width: 4px;
  height: var(--bar, 44%);
  min-height: 8px;
  border-radius: 4px;
  background: linear-gradient(
    180deg,
    rgba(126, 225, 157, 0.18),
    var(--green) 46%,
    #d9ffe5 50%,
    var(--green) 54%,
    rgba(126, 225, 157, 0.18)
  );
  box-shadow: 0 0 14px rgba(126, 225, 157, 0.18);
}

audio {
  width: 100%;
}

.player-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.player-meta div {
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.player-meta strong {
  display: block;
  margin-top: 8px;
}

.player-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.player-actions button {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--line);
}

.player-note {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

@media (max-width: 920px) {
  .hero-panel,
  .controls,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .player-panel {
    position: static;
  }
}

@media (max-width: 620px) {
  .app-shell {
    width: min(100% - 22px, 1180px);
  }

  .topbar {
    min-height: 68px;
  }

  .nav-links {
    display: none;
  }

  .hero-panel,
  .recordings-panel,
  .player-panel {
    padding: 14px;
  }

  h1 {
    font-size: clamp(2.3rem, 13vw, 3.65rem);
  }

  .recording-card {
    grid-template-columns: 1fr;
  }

  .time-block {
    min-width: 0;
  }
}
