:root {
  color-scheme: dark;
  --bg: #070707;
  --panel: #121214;
  --panel-2: #1b1c20;
  --line: #303137;
  --text: #f3f1ec;
  --muted: #aaa7a0;
  --subtle: #74716b;
  --accent: #e5b85d;
  --accent-2: #78c6a3;
  --danger: #dd6b6b;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

button,
input,
textarea {
  font: inherit;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0 22px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1;
  letter-spacing: 0;
}

.status-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 22px 0 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.status-band div {
  min-width: 0;
  padding: 14px 16px;
  background: var(--panel);
}

.label {
  display: block;
  margin-bottom: 4px;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-band strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 15px;
}

.intro {
  padding: 14px 0 22px;
  color: var(--muted);
  line-height: 1.45;
}

.toolbar {
  display: flex;
  align-items: end;
  gap: 10px;
  margin-bottom: 18px;
}

.primary-button,
.ghost-button,
.pick-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 14px;
  color: var(--text);
  cursor: pointer;
}

.primary-button {
  border-color: #d6a94a;
  background: var(--accent);
  color: #171309;
  font-weight: 800;
}

.ghost-button,
.pick-button {
  background: var(--panel-2);
}

.pick-button.is-picked {
  border-color: var(--accent-2);
  background: #143326;
  color: #d9f7e8;
}

.search {
  display: grid;
  gap: 6px;
  margin-left: auto;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.search input {
  width: min(320px, 42vw);
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: #0d0d0f;
  color: var(--text);
  text-transform: none;
}

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

.sample {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.sample-main {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.sample-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.sample h2 {
  font-size: 22px;
  line-height: 1.1;
}

.sample-heading span {
  color: var(--subtle);
  font-size: 13px;
}

.sample p {
  color: var(--muted);
  line-height: 1.4;
}

audio {
  width: 100%;
  height: 40px;
}

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

.audio-grid > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.audio-label {
  color: var(--subtle);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--subtle);
  font-size: 12px;
}

.meta-row span {
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  background: #0d0d0f;
}

.script-line {
  min-height: 54px;
  padding-top: 2px;
}

textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #09090a;
  color: var(--text);
}

.is-hidden {
  display: none;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 24px, 560px);
    padding-top: 18px;
  }

  .topbar,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .status-band,
  .audio-grid,
  .sample-list {
    grid-template-columns: 1fr;
  }

  .search {
    margin-left: 0;
  }

  .search input {
    width: 100%;
  }
}
