:root {
  color-scheme: light;
  --bg: #f6f4ef;
  --text: #201d18;
  --muted: #706a60;
  --line: #d8d0c2;
  --panel: #fffdf8;
  --accent: #1f6f5b;
  --accent-strong: #155343;
  --warn: #9a5b17;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(246, 244, 239, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 22px;
}

h2 {
  font-size: 18px;
}

h3 {
  font-size: 16px;
}

.eyebrow,
.meta,
.reason,
.section-head p {
  color: var(--muted);
  font-size: 13px;
}

main {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 16px;
}

section {
  margin-bottom: 24px;
}

.camera-shell {
  overflow: hidden;
  background: #15130f;
  border: 1px solid var(--line);
  border-radius: 8px;
  aspect-ratio: 4 / 3;
}

video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.controls,
.actions,
.grid {
  display: grid;
  gap: 10px;
}

.controls {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 12px 0;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
}

button,
a.discogs {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  text-align: center;
}

button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

button.primary:active {
  background: var(--accent-strong);
}

button.ghost {
  background: transparent;
}

label {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
}

textarea {
  resize: vertical;
}

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

.photo {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.photo img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.photo span {
  display: block;
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 10px;
}

.candidate-list,
.record-list {
  display: grid;
  gap: 10px;
}

.candidate,
.record {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.candidate-thumb,
.record-thumb {
  width: 84px;
  height: 84px;
  border-radius: 6px;
  object-fit: cover;
  background: #e6dfd2;
}

.candidate .actions {
  grid-template-columns: 1fr auto;
  margin-top: 10px;
}

.record .grid {
  margin-top: 10px;
}

@media (max-width: 680px) {
  .controls,
  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .candidate,
  .record {
    grid-template-columns: 70px 1fr;
  }

  .candidate-thumb,
  .record-thumb {
    width: 70px;
    height: 70px;
  }
}
