:root {
  color-scheme: light;
  --bg: #f7f7f9;
  --card: #ffffff;
  --text: #1f2933;
  --muted: #6b7280;
  --primary: #2563eb;
  --danger: #b91c1c;
  --border: #e5e7eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", "Liberation Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
}

header {
  background: var(--primary);
  color: #fff;
  padding: 16px;
}

header h1 {
  margin: 0;
  font-size: 20px;
}

main {
  padding: 16px;
  max-width: 720px;
  margin: 0 auto;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.card h2 {
  margin-top: 0;
  font-size: 18px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

input,
textarea,
button {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 16px;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

button {
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
}

button.secondary {
  background: #6b7280;
}

button.danger {
  background: var(--danger);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

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

.status {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}

.status.error {
  color: var(--danger);
}

.status.success {
  color: #047857;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

.hidden {
  display: none;
}

.preview {
  width: 100%;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

.preview video,
.preview canvas {
  width: 100%;
  display: block;
}

.actions {
  display: grid;
  gap: 8px;
}

@media (min-width: 600px) {
  .actions {
    grid-template-columns: repeat(3, 1fr);
  }
}

.link {
  display: inline-block;
  margin-top: 8px;
  color: var(--primary);
  text-decoration: none;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 20;
}

.overlay.hidden {
  display: none;
}

.dialog {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  max-width: 420px;
  width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--border);
  text-align: left;
  padding: 8px;
  vertical-align: top;
}

th {
  font-size: 14px;
  color: var(--muted);
}

.table-actions {
  display: grid;
  gap: 6px;
}

@media (min-width: 600px) {
  .table-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}
