:root {
  --bg: #f4f5f7; --card: #ffffff; --ink: #191c20; --muted: #656b74; --line: #dfe2e7;
  --accent: #1f3a5f; --accent-ink: #ffffff; --ok: #2f7d4f; --warn: #b7791f; --bad: #b4332f;
  --soft: #eceff3; --radius: 14px;
  font-family: ui-sans-serif, -apple-system, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121417; --card: #1b1e22; --ink: #eef0f3; --muted: #9aa1ab; --line: #2e333a;
    --accent: #7fa7d9; --accent-ink: #0d1520; --ok: #5cbf86; --warn: #e3a94a; --bad: #ef6a5f; --soft: #24282e;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.45; }
body.center { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
h1 { font-size: 20px; margin: 0; letter-spacing: .01em; overflow-wrap: anywhere; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 12px; font-weight: 600; }
p { margin: 0 0 10px; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--bad); font-weight: 600; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; min-width: 0; }
.narrow { width: min(440px, 100%); }
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; min-width: 0; }
.brand p { margin: 2px 0 0; overflow-wrap: anywhere; }
.logo { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-weight: 800; font-size: 20px; flex: none; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0; }
input, textarea { width: 100%; margin-top: 6px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font: inherit; }
textarea { min-height: 120px; resize: vertical; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; }
button { font: inherit; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--soft);
  color: var(--ink); cursor: pointer; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
button.wide { width: 100%; margin-top: 8px; }
button.ghost { background: transparent; }
button.danger { color: var(--bad); }
button:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }

header.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px;
  max-width: 980px; margin: 0 auto; }
header.top .brand { margin: 0; }
main.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px 40px; display: grid; gap: 14px; }
.grid2 { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 720px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 3px 10px; border-radius: 99px; background: var(--soft); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--bad); }
.stat { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.stat > :last-child { text-align: right; overflow-wrap: anywhere; }
.stat:last-child { border-bottom: 0; }
.draft { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.draft .meta { font-size: 13px; color: var(--muted); display: grid; gap: 2px; overflow-wrap: anywhere; }
.draft pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; background: var(--soft); padding: 10px;
  border-radius: 8px; margin: 8px 0 0; }
.list { font-size: 14px; }
.list .item { padding: 8px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.list .item:last-child { border-bottom: 0; }
.list .when { color: var(--muted); font-size: 12px; }
.empty { color: var(--muted); font-style: italic; }
.warnbox { border-left: 3px solid var(--warn); padding: 8px 12px; background: var(--soft); border-radius: 6px; margin-bottom: 10px; }
iframe.preview { width: 100%; height: 260px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.copy { display: flex; gap: 8px; align-items: center; }
.copy code { flex: 1; background: var(--soft); padding: 9px 10px; border-radius: 8px; }
.toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 10px; max-width: calc(100% - 32px); display: none; }
details summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-top: 10px; }
ol.how { padding-left: 20px; margin: 8px 0 0; }
ol.how li { margin-bottom: 4px; }
