:root {
  --brand: #1d4e9e;
  --brand-dark: #153a7a;
  --accent: #ed1c24;
  --bg: #0f1419;
  --panel: #1a2332;
  --text: #e8ecf1;
  --muted: #8b9cb3;
  --border: #2a3a52;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a {
  color: #6eb5ff;
}

.studio-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}

.studio-header h1 {
  margin: 0;
  font-size: 18px;
  flex: 1;
}

.back {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.badge {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  background: #2a3a52;
}

.badge.ok {
  background: #0d5c3a;
  color: #b8f0d4;
}

.badge.err {
  background: #5c1a1a;
  color: #ffc9c9;
}

.studio-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.panel h2 {
  margin: 0 0 8px;
  font-size: 17px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hint {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 16px;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin: 12px 0 6px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

textarea,
input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.btn {
  margin-top: 14px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
}

.btn.accent {
  background: linear-gradient(135deg, var(--accent), #c4161c);
  color: #fff;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.manifest-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.manifest-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.manifest-list .status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #555;
  flex-shrink: 0;
}

.manifest-list .status.done {
  background: #3dd68c;
}

.manifest-list button {
  margin-left: auto;
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}

.result {
  margin-top: 16px;
}

.result.hidden {
  display: none;
}

.result img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.result .err {
  color: #ff8a8a;
  font-size: 14px;
}

.log {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
  white-space: pre-wrap;
  font-family: ui-monospace, monospace;
}
