:root {
  color-scheme: light dark;
  --bg: #f4f5f2;
  --card: #ffffff;
  --fg: #1c1f1d;
  --muted: #616862;
  --line: #dde1dc;
  --accent: #1f6f5c;
  --accent-fg: #ffffff;
  --accent-soft: #e3f1ec;
  --error: #b3261e;
  --live: #1f6f5c;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131514;
    --card: #1c1f1d;
    --fg: #e9ece8;
    --muted: #9aa29b;
    --line: #2e3330;
    --accent: #4fb596;
    --accent-fg: #0e1a16;
    --accent-soft: #1e332c;
    --error: #f2b8b5;
    --live: #4fb596;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.who { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.95rem; }

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

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

h1 { font-size: 1.5rem; margin: 0 0 8px; }
h2 { font-size: 1.15rem; margin: 0 0 12px; }
p { margin: 0 0 12px; }
code { font-size: 0.95em; }
.muted { color: var(--muted); }
.center { text-align: center; }
.error { color: var(--error); margin: 12px 0 0; }
.error:empty { display: none; }

.stack { display: flex; flex-direction: column; gap: 8px; }
label { font-weight: 600; }

input, select, button {
  font: inherit;
  color: inherit;
}
input, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

button {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  cursor: pointer;
}
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); font-weight: 600; }
button.link { padding: 0; border: 0; background: none; color: var(--accent); text-decoration: underline; }
button:disabled { opacity: 0.55; cursor: default; }

.site-row { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: center; margin-bottom: 12px; }
.site-row input { grid-column: 2; }
.live { margin: 0; overflow-wrap: anywhere; }
.live a { font-weight: 600; }

a { color: var(--accent); }

.drop {
  margin-top: 16px;
  padding: 32px 16px;
  border: 2px dashed var(--line);
  border-radius: 12px;
  text-align: center;
  transition: background 0.15s, border-color 0.15s;
}
.drop.over { background: var(--accent-soft); border-color: var(--accent); }
.drop.busy { opacity: 0.5; pointer-events: none; }
.drop-title { font-size: 1.2rem; font-weight: 600; margin-bottom: 4px; }
.buttons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

.status { margin-top: 16px; }
progress { width: 100%; height: 10px; }

.done {
  margin-top: 16px;
  padding: 16px;
  border-radius: 10px;
  background: var(--accent-soft);
}
.done-title { font-size: 1.15rem; font-weight: 600; }
.big-link { font-size: 1.1rem; font-weight: 600; overflow-wrap: anywhere; }
.copy-row { display: flex; gap: 8px; margin-bottom: 12px; }
.copy-row input { flex: 1; min-width: 0; font-size: 0.9rem; }
#doneNotes:empty { display: none; }

.versions { list-style: none; margin: 0; padding: 0; }
.versions li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.versions .what { flex: 1 1 260px; min-width: 0; }
.versions .when { font-weight: 600; }
.versions .msg { overflow-wrap: anywhere; }
.versions .actions { display: flex; align-items: center; gap: 12px; }
.badge {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--live);
  color: var(--accent-fg);
  font-size: 0.85rem;
  font-weight: 600;
}
.versions .empty { color: var(--muted); border: 0; }
