:root {
  color-scheme: light dark;
  --border: #d0d0d0;
  --muted: #666;
}

body {
  font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 64px;
  line-height: 1.4;
}

header h1 {
  margin-bottom: 0;
}

.subtitle {
  color: var(--muted);
  margin-top: 4px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin: 20px 0;
}

.card h2 {
  margin-top: 0;
  font-size: 1.05rem;
}

form label {
  display: block;
  margin: 10px 0;
  font-weight: 600;
  font-size: 0.9rem;
}

form select,
form textarea,
form input {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 6px 8px;
  font: inherit;
  box-sizing: border-box;
}

button {
  margin-top: 10px;
  padding: 8px 14px;
  cursor: pointer;
}

.status {
  font-size: 0.85rem;
  color: var(--muted);
  min-height: 1.2em;
}

#preview img,
#preview video {
  max-width: 100%;
  max-height: 240px;
  margin-top: 10px;
  border-radius: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 10px;
}

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

.status-scheduled { color: #b8860b; }
.status-published { color: #2e7d32; }
.status-failed { color: #c62828; }
.status-processing { color: #1565c0; }

.hidden {
  display: none;
}

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

.checkbox-label {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  font-weight: normal !important;
  margin-right: 16px !important;
}

.checkbox-label input {
  width: auto !important;
}

#pending-table img,
#pending-table video {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
}

#pending-table input[type="text"] {
  font-size: 0.85rem;
  padding: 4px 6px;
  width: 100%;
  box-sizing: border-box;
}

#pending-table input[type="checkbox"] {
  width: auto;
}

.preview-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 160px;
}

.remove-btn {
  margin-top: 0;
  padding: 4px 8px;
  font-size: 0.8rem;
  margin-right: 4px;
}

.time-cell input[type="datetime-local"] {
  font-size: 0.8rem;
  padding: 3px 4px;
  margin-bottom: 4px;
  width: 100%;
  box-sizing: border-box;
}

#group-controls {
  margin-top: 12px;
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

#group-controls .hint {
  margin: 0;
  flex: 1;
  min-width: 220px;
}

#group-btn {
  margin-top: 0;
}
