:root {
  --bg: #f6f4f0;
  --card: #ffffff;
  --text: #2b2a28;
  --muted: #6f6b64;
  --line: #e4e0d8;
  --accent: #4a6b63;
  --accent-text: #ffffff;
  --me: #eef3f1;
  --error: #9b3b3b;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1d1c; --card: #262826; --text: #ecebe7; --muted: #a09c94;
    --line: #3a3d3a; --accent: #7fa497; --accent-text: #14201c; --me: #2d3633; --error: #e08a8a;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 18px/1.55 Georgia, "Iowan Old Style", "Times New Roman", serif;
}
.container { max-width: 640px; margin: 0 auto; padding: 24px 16px 64px; }
h1 { font-size: 1.7rem; margin: 0 0 8px; font-weight: 600; }
h2 { font-size: 1.1rem; margin: 0 0 12px; font-weight: 600; }
p { margin: 0 0 16px; }
.muted { color: var(--muted); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 20px; margin-bottom: 20px;
}
.status { color: var(--muted); font-style: italic; }
.error { color: var(--error); margin: 8px 0 0; }
button, .btn {
  font: inherit; font-family: system-ui, sans-serif; font-size: 1rem; font-weight: 600;
  background: var(--accent); color: var(--accent-text); border: 0; border-radius: 10px;
  padding: 14px 22px; min-height: 48px; cursor: pointer;
}
button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
button:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible, textarea:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
textarea, input[type=text] {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 12px;
}
textarea { min-height: 140px; resize: vertical; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row input { flex: 1 1 220px; margin-bottom: 0; }
.qa { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
.qa:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.q { font-weight: 600; margin-bottom: 10px; }
.label { font-family: system-ui, sans-serif; font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.answer { padding: 10px 14px; border-radius: 10px; margin: 6px 0 12px; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg); }
.answer.mine { background: var(--me); }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.count { font-family: system-ui, sans-serif; font-size: .8rem; color: var(--muted); text-align: right; margin: -6px 0 10px; }
.small { font-size: .85rem; margin: 12px 0 0; }
.row button { flex: 1 1 200px; }
.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.cats button { width: 100%; }
.card.hot { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.status.strong { color: var(--text); font-style: normal; font-weight: 600; }
button.back { margin-bottom: 16px; padding: 8px 14px; min-height: 40px; }
.row .btn { flex: 1 1 200px; text-align: center; text-decoration: none; display: flex; align-items: center; justify-content: center; }
.row.pair { margin-top: 8px; }

.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 1.4em; height: 1.4em; margin-left: 8px; padding: 0 .35em; border-radius: 999px; background: #d12f2f; color: #fff; font: 700 .8rem/1 system-ui, sans-serif; vertical-align: middle; }
.guide summary { cursor: pointer; font-weight: 600; font-family: system-ui, sans-serif; }
.guide-body { margin-top: 12px; }
.guide-body h2 { font-size: 1.05rem; }
.guide-body p:last-child { margin-bottom: 0; }
