* { box-sizing: border-box; }
:root { font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; color: #173731; background: #e7efec; }
body { margin: 0; }
[hidden] { display: none !important; }
main { min-height: 100dvh; max-width: 640px; margin: 0 auto; background: #f6faf8; display: flex; flex-direction: column; }
header { background: #0b6254; color: white; padding: 20px 18px 16px; }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 20px; margin-top: 0; }
p { line-height: 1.55; }
#status { min-height: 1.5em; margin: 5px 0 0; color: #edfaf4; font-size: 14px; }
#pair { margin: 24px 16px; padding: 22px; border-radius: 14px; background: white; border: 1px solid #cfdfd8; }
#thread { display: flex; flex-direction: column; min-height: 0; height: calc(100dvh - 90px); }
#older { align-self: center; margin: 12px 0 0; background: white; color: #0b6254; border: 1px solid #cfdfd8; }
#conversation { flex: 1; min-height: 0; padding: 16px; overflow: auto; overscroll-behavior: contain; }
#empty { text-align: center; color: #567169; }
ol { padding: 0; margin: 0; list-style: none; }
li { display: flex; flex-direction: column; align-items: flex-start; margin: 0 0 14px; }
li.mine { align-items: flex-end; }
.bubble { width: fit-content; max-width: 87%; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 1.55; padding: 10px 13px; border-radius: 15px; background: #fff; border: 1px solid #d6e4de; }
.mine .bubble { background: #d5efe5; border-color: #c2e3d6; }
.meta { margin: 4px 3px 0; color: #4c6961; font-size: 12px; }
form { border-top: 1px solid #cfdfd8; display: flex; align-items: flex-end; gap: 10px; background: white; padding: 12px 14px max(12px, env(safe-area-inset-bottom)); }
textarea, button { font: inherit; }
textarea { flex: 1; min-width: 0; resize: vertical; max-height: 150px; min-height: 48px; padding: 10px; background: #f9fcfb; border: 1px solid #a9c6ba; border-radius: 10px; color: inherit; }
button { min-height: 46px; border: 1px solid transparent; border-radius: 11px; padding: 8px 16px; font-weight: 680; background: #0b6254; color: white; cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
button:focus-visible, textarea:focus-visible { outline: 3px solid #026cce; outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
