:root {
  --background: #10151a;
  --panel: #182029;
  --border: #26313d;
  --text: #e6edf3;
  --muted: #93a1b0;
  --accent: #1f9e57;
  --error: #d9534f;
}

* {
  box-sizing: border-box;
}

/* Several selectors below set `display: grid`/`flex` on elements that also
   use the `hidden` attribute (label, .actions). Without this, the attribute
   is ignored: author rule always beats the browser's default stylesheet. */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  padding: 1rem;
  background: var(--background);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, sans-serif;
}

header {
  max-width: 720px;
  margin: 0 auto 0.5rem;
}

header h1 {
  margin: 0;
  font-size: 1.4rem;
}

main {
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
}

h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.row {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

@media (min-width: 560px) {
  .row {
    grid-template-columns: 1fr 1fr;
  }
}

label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--muted);
}

select,
input[type="date"],
input[type="text"] {
  width: 100%;
  padding: 0.6rem;
  background: var(--background);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
}

.plays-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.select-all {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
}

#play-list {
  list-style: none;
  margin: 0.5rem 0;
  padding: 0;
  max-height: 22rem;
  overflow-y: auto;
}

#play-list li {
  border-bottom: 1px solid var(--border);
}

.play-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#play-list label {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
  /* Large tap target: mobile is the likely usage. */
  padding: 0.7rem 0.2rem;
  color: var(--text);
  font-size: 1rem;
}

input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent);
  flex: none;
}

.badge {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.8rem;
}

.preview-toggle {
  flex: none;
  width: auto;
  padding: 0.4rem 0.7rem;
  background: var(--background);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
}

.preview {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  padding: 0 0.2rem 0.75rem;
}

.preview video {
  flex: 1;
  min-width: 0;
  width: 100%;
  border-radius: 8px;
  background: #000;
}

@media (max-width: 480px) {
  .preview {
    flex-direction: column;
  }
}

.options {
  display: grid;
  gap: 0.6rem;
  margin: 1rem 0;
}

.options label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-size: 0.95rem;
}

button {
  width: 100%;
  padding: 0.8rem;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

button:disabled {
  opacity: 0.5;
  cursor: default;
}

.progress {
  margin: 0 0 0.75rem;
  font-variant-numeric: tabular-nums;
}

.actions {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.actions a {
  display: block;
  padding: 0.7rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  text-align: center;
  text-decoration: none;
}

.notice {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.failures {
  margin: 0 0 0.75rem;
  padding-left: 1.2rem;
  color: var(--error);
  font-size: 0.85rem;
}

.clip {
  margin-bottom: 1.25rem;
}

.clip h3 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.clip video {
  width: 100%;
  border-radius: 8px;
  background: #000;
}
