:root {
  --bg: #ffffff;
  --text: #1f2328;
  --muted: #667085;
  --border: #d0d5dd;
  --accent: #5b4fe9;
  --accent-text: #ffffff;
  --error: #b42318;
  --success-bg: #ecfdf3;
  --success-text: #067647;
  --notice-bg: #f4f3ff;
  --field-bg: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1d21; --text: #e6e7ea; --muted: #9aa0ab; --border: #3a3d45;
    --accent: #8b80ff; --accent-text: #111; --error: #ff8a80;
    --success-bg: #12301f; --success-text: #75e0a7; --notice-bg: #25233d; --field-bg: #24262b;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 13px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
main { padding: 14px 14px 20px; }
h1 { font-size: 15px; margin: 0 0 10px; }
h2 { font-size: 13px; margin: 16px 0 6px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.error { color: var(--error); }
label { display: block; font-weight: 600; margin: 0 0 12px; }
label .muted { font-weight: 400; }
input, select, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 7px 8px; font: inherit; font-weight: 400;
  color: var(--text); background: var(--field-bg); border: 1px solid var(--border); border-radius: 6px;
}
textarea { resize: vertical; min-height: 120px; font-size: 12.5px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.row { display: flex; gap: 8px; }
.row label { flex: 1; min-width: 0; }
.row .narrow { flex: 0 0 96px; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.hint.warn { color: var(--error); }
label.check { display: flex; align-items: center; gap: 6px; font-weight: 400; }
label.check input { width: auto; margin: 0; }
button {
  width: 100%; padding: 9px 12px; border: 0; border-radius: 6px; background: var(--accent); color: var(--accent-text);
  font: inherit; font-weight: 600; cursor: pointer;
}
button:disabled { opacity: .6; cursor: default; }
button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--border); }
.notice { background: var(--notice-bg); border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; }
.notice.success { background: var(--success-bg); color: var(--success-text); margin-top: 12px; }
.notice a { color: inherit; font-weight: 600; }
footer { display: flex; justify-content: space-between; gap: 8px; margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--border); }
footer a, #admin a { color: var(--accent); text-decoration: none; font-size: 12px; margin-left: 10px; }
#admin ul { list-style: none; padding: 0; margin: 0; }
#admin li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 12px; overflow-wrap: anywhere; }
