/* Layout: one calm phone-width column, read half-asleep at 3 a.m.; feed and post detail swap in place */
:root {
  --bg: #f4f5f9;
  --card: #ffffff;
  --ink: #1d2233;
  --muted: #5b6275;
  --line: #dfe2ec;
  --accent: #26706a;
  --accent-soft: #e2f0ee;
  --same: #f3d27a;
  --same-ink: #6b4d00;
  --warn-bg: #fff4e0;
  --warn-ink: #7a4b00;
  --display: "Nunito", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #12151f; --card: #1b2030; --ink: #e8eaf2; --muted: #a2a9bc; --line: #2c3346;
  --accent: #6cc4bb; --accent-soft: #1d3634; --same: #5c4a14; --same-ink: #f6dd93;
  --warn-bg: #3a2d14; --warn-ink: #f2cf8f; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #12151f; --card: #1b2030; --ink: #e8eaf2; --muted: #a2a9bc; --line: #2c3346;
  --accent: #6cc4bb; --accent-soft: #1d3634; --same: #5c4a14; --same-ink: #f6dd93;
  --warn-bg: #3a2d14; --warn-ink: #f2cf8f; color-scheme: dark }
* { box-sizing: border-box }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.55;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 20px 40px }
.wrap { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; line-height: 1.25 }
h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.01em }
h2 { font-size: 21px; font-weight: 800 }
h3 { font-size: 17px; font-weight: 700 }
p { margin: 0 }
.muted { color: var(--muted) }
.small { font-size: 14px }
header { display: flex; flex-direction: column; gap: 6px }
.brandrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap }
.pill { display: inline-block; font-size: 12.5px; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; letter-spacing: .02em }
.filters { display: flex; flex-direction: column; gap: 8px }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none }
.chip { flex: none; font: inherit; font-size: 14px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink) }
button { font: inherit; cursor: pointer }
button:focus-visible, .chip:focus-visible, textarea:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
.primary { background: var(--accent); color: var(--card); border: 0; border-radius: 12px; padding: 12px 16px; font-weight: 700; width: 100% }
.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); border-radius: 10px; padding: 8px 12px }
.link { background: none; border: 0; color: var(--accent); padding: 0; font-weight: 700 }
.feed { display: flex; flex-direction: column; gap: 10px }
.post { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; text-align: left; color: var(--ink); width: 100% }
.post:hover { border-color: var(--muted) }
.meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted) }
.tag { font-size: 12.5px; font-weight: 700; color: var(--accent) }
.ex { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border: 1px dashed var(--muted); border-radius: 6px; padding: 0 6px }
.excerpt { color: var(--muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.counts { display: flex; gap: 14px; font-size: 13.5px; color: var(--muted) }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px }
label { font-size: 14px; font-weight: 700; display: flex; flex-direction: column; gap: 6px }
textarea, input[type=text], input[type=email], input[type=password], select { font: inherit; font-weight: 400; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100% }
textarea { min-height: 110px; resize: vertical }
.row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px }
.scale { display: flex; gap: 6px }
.scale button { flex: 1; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 10px; padding: 8px 0; font-weight: 700 }
.scale button[aria-pressed="true"] { background: var(--accent); color: var(--card); border-color: var(--accent) }
.scale-labels { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); font-weight: 400 }
.err { color: #c0392b; font-size: 13.5px; font-weight: 400 }
.note { background: var(--warn-bg); color: var(--warn-ink); border-radius: 12px; padding: 12px 14px; font-size: 14px }
.same { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 8px 14px; font-weight: 700 }
.same[aria-pressed="true"] { background: var(--same); color: var(--same-ink); border-color: var(--same) }
.reply { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 4px }
.kind { font-size: 12.5px; font-weight: 700 }
.summary { background: var(--accent-soft); border-radius: 12px; padding: 14px; white-space: pre-wrap; font-size: 15px }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px }
.stat b { display: block; font-family: var(--display); font-size: 22px; font-variant-numeric: tabular-nums }
.empty { text-align: center; padding: 28px 16px; color: var(--muted) }
.rolebadge { font-size: 12.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--warn-bg); color: var(--warn-ink) }
.rolebadge.ok { background: var(--accent-soft); color: var(--accent) }
.rolebar { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: baseline; font-size: 14px; color: var(--muted) }
.rolebar strong { color: var(--ink) }
.top-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap }
.msgbtn { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 14px }
.badge { display: inline-block; min-width: 19px; padding: 0 5px; margin-left: 6px; border-radius: 999px; background: var(--accent); color: var(--card); font-size: 12px; text-align: center; line-height: 19px }
.bubbles { display: flex; flex-direction: column; gap: 8px; min-height: 60px }
.bubble { max-width: 85%; padding: 8px 12px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; display: flex; flex-direction: column; gap: 2px }
.bubble.me { align-self: flex-end; background: var(--accent-soft); border-color: transparent }
.bubble time { font-size: 11.5px; color: var(--muted) }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); margin-right: 6px }
.lock { font-size: 13px; color: var(--muted) }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap }
.btnrow > button { flex: 1 1 140px }
footer { font-size: 13.5px; color: var(--muted); display: flex; flex-direction: column; gap: 6px }
@media (prefers-reduced-motion: no-preference) { .post { transition: border-color .15s } }
.header-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap }
.langsel { width: auto; padding: 6px 10px; border-radius: 999px; font-size: 14px }
.auth { max-width: 440px; width: 100%; margin: 0 auto }
.linkrow { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap }
.notice { background: var(--accent-soft); color: var(--ink); border-radius: 12px; padding: 12px 14px; font-size: 14px }
.danger { color: #c0392b }
a.link { color: var(--accent); font-weight: 700; text-decoration: none; font-size: 14px }
a.link:hover { text-decoration: underline }
.actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center }
[hidden] { display: none !important }
html { -webkit-text-size-adjust: 100% }
body { margin: 0 }
.wrap > *, .filters > *, .panel > * { min-width: 0 }
.wrap, .panel, .post { max-width: 100% }
.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; font-size: 14px; line-height: 1.45 }
.check input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--accent) }
.check.inline { display: inline-flex; align-items: center; font-size: 14px; color: var(--muted) }
.check.inline input { margin-top: 0 }
.sep { color: var(--line) }
