:root {
  --bg: #0f1115;
  --card: #181b22;
  --text: #eef1f6;
  --muted: #9aa3b2;
  --line: #2a3140;
  --accent: #5b8cff;
  --accent-press: #3f6fe0;
  --ok: #3ecf8e;
  --err: #ff6b6b;
  --radius: 12px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font); }
.wrap { max-width: 720px; margin: 0 auto; padding: 20px 16px 64px; }
h1 { font-size: 1.5rem; line-height: 1.25; margin: 0 0 8px; font-weight: 700; }
.sub { margin: 0 0 20px; color: var(--muted); font-size: 0.95rem; }
.tool { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
input {
  flex: 1 1 220px; min-width: 0; width: 100%;
  background: #0c0e13; color: var(--text);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; font-size: 16px; /* 16px avoids iOS zoom */
}
button {
  border: 0; border-radius: 10px; padding: 12px 16px;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 0.95rem;
  cursor: pointer; white-space: nowrap;
}
button:hover { background: var(--accent-press); }
button:disabled { opacity: 0.55; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.actions button { background: #243049; }
.actions button:hover { background: #2e3c5c; }
.status { min-height: 1.25em; margin: 10px 0 0; font-size: 0.9rem; color: var(--muted); }
.status.err { color: var(--err); }
.status.ok { color: var(--ok); }
.result { margin-top: 16px; }
.meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 4px; white-space: pre-wrap; }
.out {
  margin: 0; padding: 14px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); white-space: pre-wrap; word-break: break-word;
  max-height: 55vh; overflow: auto; font-size: 0.95rem; line-height: 1.5;
}
.body { margin-top: 40px; color: #d5dae3; font-size: 0.95rem; line-height: 1.55; }
.body h2 { font-size: 1.15rem; margin: 28px 0 10px; color: var(--text); }
.body h3 { font-size: 1rem; margin: 18px 0 6px; color: var(--text); }
.body p, .body li { color: var(--muted); }
.body a { color: var(--accent); }
.note { font-size: 0.85rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
code { font-size: 0.85em; word-break: break-all; }
@media (max-width: 480px) {
  .wrap { padding: 14px 12px 48px; }
  h1 { font-size: 1.3rem; }
  .row { flex-direction: column; }
  button, .actions button { width: 100%; }
}
