:root {
  --bg: #f9fafb;
  --fg: #1f2937;
  --muted: #6b7280;
  --brand: #111827;
  --ok: #057a55;
  --bad: #b91c1c;
  --card: #fff;
  --bd: #e5e7eb;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.55 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}
.wrap {
  max-width: 980px;
  margin: 28px auto;
  padding: 0 16px;
}
h1 {
  text-align: center;
  margin: 6px 0 18px 0;
  font-size: 22px;
}
.card {
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  padding: 16px;
  margin-bottom: 16px;
  overflow-x: auto;
}
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.col {
  flex: 1 1 260px;
}
label {
  font-weight: 600;
  display: block;
  margin: 6px 0;
}
input[type=url],input[type=file],select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--bd);
  border-radius: 10px;
}
input[type=url]:focus,select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
  outline: 0;
}
.inline {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.muted {
  color: var(--muted);
}
.btn {
  display: inline-block;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: #111827;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.btn.secondary {
  background: #334155;
}
.btn.ghost {
  background: #e5e7eb;
  color: #111827;
}
.btn.linklike {
  background: transparent;
  color: #111827;
  border: 1px solid var(--bd);
}
.btn:hover {
  background: #1f2937;
  transform: translateY(-1px);
}
.btn.ghost:hover {
  background: #e5e7eb;
  transform: translateY(-1px);
}
.pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.ok {
  background: #dcfce7;
  color: #065f46;
}
.warn {
  background: #fee2e2;
  color: #991b1b;
}
textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 220px;
  max-height: 420px;
  font-family: ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  border: 1px solid var(--bd);
  border-radius: 10px;
  padding: 12px;
  white-space: pre;
  overflow: auto;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 860px) {
{
    grid-template-columns: 1fr;
  }
}
.small {
  font-size: 13px;
}
.note {
  background: #fff6d5;
  border: 1px solid #facc15;
  padding: 10px;
  border-radius: 10px;
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
details summary {
  list-style: none;
}
details summary::-webkit-details-marker {
  display: none;
}
details[open] summary::after {
  content: "▲";
  margin-left: 8px;
  font-size: 11px;
  opacity: .7;
}
details summary::after {
  content: "▼";
  margin-left: 8px;
  font-size: 11px;
  opacity: .7;
}
.toolbar .right {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
footer.minify-footer {
  max-width: 980px;
  margin: 24px auto;
  padding: 12px 16px;
  border-top: 1px solid #e5e7eb;
  color: #6b7280;
  font: 13px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
.footer-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.footer-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #f9fafb;
  color: #111827;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.footer-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}