:root {
  --navy: #1d3688;
  --navy-deep: #15297a;
  --navy-soft: #eef1fb;
  --accent: #f3692e;
  --ink: #0f1222;
  --muted: #545a72;
  --line: #d9dceb;
  --bg: #f7f8fc;
  --card: #ffffff;
  --ok: #1d6b3a;
  --error: #a3261b;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --navy: #8ea6ff;
    --navy-deep: #b3c2ff;
    --navy-soft: #1b2340;
    --ink: #eef0f8;
    --muted: #a7adc4;
    --line: #2d3452;
    --bg: #0f1222;
    --card: #171b30;
    --ok: #7fd49c;
    --error: #ff9a8f;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 18px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.wrap { max-width: 640px; margin: 0 auto; padding: 20px 16px calc(32px + env(safe-area-inset-bottom)); }
h1 { font-size: 1.45rem; line-height: 1.25; margin: 0 0 8px; color: var(--navy-deep); }
h2 { font-size: 1.05rem; margin: 28px 0 10px; color: var(--muted); font-weight: 600; }
.lead { margin: 0 0 18px; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

textarea {
  width: 100%;
  min-height: 150px;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  resize: vertical;
}
textarea:focus { outline: none; border-color: var(--navy); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.count { color: var(--muted); font-size: 0.9rem; }
button {
  min-height: 52px;
  min-width: 140px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
@media (prefers-color-scheme: dark) { button { color: #0f1222; } }
button:disabled { opacity: 0.6; cursor: default; }
button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.status { min-height: 1.5em; margin: 12px 0 0; }
.status--ok { color: var(--ok); font-weight: 600; }
.status--error { color: var(--error); font-weight: 600; }
.notice { padding: 14px 16px; border-radius: 14px; background: var(--navy-soft); }

.list ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.note { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--muted); }
.tag { padding: 2px 10px; border-radius: 999px; background: var(--navy-soft); color: var(--navy-deep); font-weight: 600; }
.note--live .tag, .note--accepted .tag { color: var(--ok); }
.note--question .tag { color: var(--accent); }
.text { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.reply { margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--line); font-weight: 600; white-space: pre-wrap; }
