:root {
  --bg: #f7f5f0;
  --ink: #1a1814;
  --muted: #6a645a;
  --line: #e2dcd0;
  --card: #fffcf7;
  --calm: #1e6b3f;
  --calm-bg: #e8f5ee;
  --calm-line: #b9d8c7;
  --need: #8a3b1d;
  --need-bg: #fceede;
  --need-line: #e8c9a8;
  --soft: #f0ebe3;
  --chip: #ebe6dc;
  --chip-hover: #e0d9cc;
  --focus: #2a4a38;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 17px/1.55 Georgia, "Iowan Old Style", Palatino, "Times New Roman", serif;
  color: var(--ink);
  background: var(--bg);
}

.shell {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}

.brand {
  font: 12px/1.3 system-ui, -apple-system, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand a {
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: none;
  font-weight: 500;
}

.brand a:hover { text-decoration: underline; }

.attention {
  border-radius: 12px;
  padding: 16px 18px;
  margin: 0 0 18px;
  border: 1px solid var(--calm-line);
  background: var(--calm-bg);
}

.attention.need {
  border-color: var(--need-line);
  background: var(--need-bg);
}

.attention .label {
  font: 700 12px/1.2 system-ui, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--calm);
  margin: 0 0 6px;
}

.attention.need .label { color: var(--need); }

.attention h1 {
  font-size: 26px;
  line-height: 1.2;
  margin: 0 0 6px;
  font-weight: 600;
}

.attention p { margin: 0; font-size: 17px; }

.pulse {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 26px;
}

@media (max-width: 520px) {
  .pulse { grid-template-columns: 1fr; }
}

.pulse .cell {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}

.pulse .k {
  font: 12px/1.2 system-ui, sans-serif;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 4px;
}

.pulse .v {
  font-size: 17px;
  margin: 0;
  font-weight: 600;
}

.pulse .v.big {
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}

.pulse .hint {
  margin-top: 4px;
}

.section-title {
  font: 700 12px/1.2 system-ui, sans-serif;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 28px 0 10px;
}

.letter {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 20px 18px;
  margin: 0 0 10px;
}

.letter .from {
  font: 13px/1.3 system-ui, sans-serif;
  color: var(--muted);
  margin: 0 0 14px;
}

.letter h2 {
  font-size: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 18px 0 6px;
  font-family: system-ui, sans-serif;
  font-weight: 700;
}

.letter h2:first-of-type { margin-top: 0; }

.letter p { margin: 0 0 8px; }
.letter ul { margin: 0 0 8px; padding-left: 1.15em; }
.letter li { margin: 0 0 4px; }

.ask {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 16px 14px;
  margin: 0 0 22px;
}

.ask .honest {
  font: 12px/1.4 system-ui, sans-serif;
  color: var(--muted);
  margin: 0 0 12px;
  padding: 8px 10px;
  background: var(--soft);
  border-radius: 8px;
}

.ask .honest strong {
  color: var(--ink);
  font-weight: 600;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.chip {
  font: 14px/1.3 system-ui, -apple-system, sans-serif;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--chip);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.12s ease;
}

.chip:hover, .chip:focus-visible {
  background: var(--chip-hover);
  outline: none;
}

.chip.active {
  background: var(--focus);
  color: #f7f5f0;
  border-color: var(--focus);
}

.compose {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
}

.compose input {
  flex: 1;
  font: 15px/1.3 system-ui, sans-serif;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.compose input:focus {
  outline: 2px solid var(--calm-line);
  border-color: var(--calm);
}

.compose button {
  font: 600 14px system-ui, sans-serif;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--focus);
  background: var(--focus);
  color: #f7f5f0;
  cursor: pointer;
}

.compose button:hover { opacity: 0.92; }

.answer {
  display: none;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 4px;
}

.answer.show { display: block; }

.answer .q {
  font: 600 15px/1.35 system-ui, sans-serif;
  margin: 0 0 8px;
}

.answer .a {
  margin: 0;
  font-size: 16px;
}

.answer .a ul {
  margin: 6px 0 0;
  padding-left: 1.15em;
}

.answer .a li { margin: 0 0 4px; }

.answer .tag {
  display: inline-block;
  margin-top: 10px;
  font: 11px/1.3 system-ui, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.empty {
  background: var(--soft);
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  margin: 0 0 12px;
}

.empty strong {
  display: block;
  font-size: 18px;
  margin-bottom: 4px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 0 0 12px;
}

.card h3 {
  font-size: 18px;
  margin: 0 0 10px;
  font-weight: 600;
}

.card dl {
  margin: 0;
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 6px 12px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 15px;
}

.card dt {
  color: var(--muted);
  margin: 0;
  font-weight: 600;
}

.card dd { margin: 0; }

.actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

button[disabled] {
  font: 15px system-ui, sans-serif;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid #c9c2b6;
  background: #eeeae2;
  color: #6d675e;
  cursor: not-allowed;
}

.hint {
  font: 13px/1.35 system-ui, sans-serif;
  color: var(--muted);
  margin: 0;
}

details.more {
  margin: 10px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  overflow: hidden;
}

details.more > summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  font: 600 15px/1.3 system-ui, sans-serif;
  color: var(--ink);
  user-select: none;
}

details.more > summary::-webkit-details-marker { display: none; }

details.more > summary::after {
  content: "+";
  float: right;
  color: var(--muted);
  font-weight: 400;
}

details.more[open] > summary::after { content: "−"; }

details.more .body {
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

details.more .body p,
details.more .body li {
  font-size: 16px;
}

footer.note {
  margin-top: 36px;
  font: 12px/1.45 system-ui, sans-serif;
  color: var(--muted);
}

footer.note a { color: var(--muted); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* v0.4 real ask loop */
.real-ask {
  background: var(--card);
  border: 1px solid var(--calm-line);
  border-radius: 12px;
  padding: 18px 18px 14px;
  margin: 0 0 28px;
}
.real-ask .honest {
  font: 14px/1.45 system-ui, -apple-system, sans-serif;
  color: var(--muted);
  margin: 0 0 14px;
}
.real-ask .honest strong { color: var(--calm); }
.real-ask .compose { display: flex; gap: 8px; margin-bottom: 12px; }
.real-ask input {
  flex: 1;
  font: 16px/1.3 Georgia, Palatino, serif;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.real-ask button.primary {
  font: 14px/1.2 system-ui, -apple-system, sans-serif;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  background: var(--focus);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}
.real-ask button.primary:hover { filter: brightness(1.08); }
.real-ask .bridge {
  font: 13px/1.4 system-ui, -apple-system, sans-serif;
  color: var(--muted);
  margin: 0 0 16px;
}
.threads { display: flex; flex-direction: column; gap: 12px; }
.thread {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--soft);
}
.thread .meta {
  font: 12px/1.3 system-ui, -apple-system, sans-serif;
  color: var(--muted);
  margin: 0 0 6px;
}
.thread .q { font-weight: 600; margin: 0 0 8px; }
.thread .a { margin: 0; font-size: 0.95em; }
.thread .a p { margin: 0 0 0.6em; }
.thread .a p:last-child { margin-bottom: 0; }
.threads-empty {
  font: 14px/1.4 system-ui, -apple-system, sans-serif;
  color: var(--muted);
  margin: 0;
}
.local-ask-label {
  font: 12px/1.3 system-ui, -apple-system, sans-serif;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 8px 0 10px;
}
