:root{font-family:system-ui,sans-serif;color:#172922;background:#f5f7f2;color-scheme:light}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;min-height:100dvh;display:flex;flex-direction:column}
header{position:sticky;top:0;z-index:1;display:flex;align-items:center;gap:12px;background:#10231e;color:#f5f7f2;padding:calc(14px + env(safe-area-inset-top)) max(18px,calc((100vw - 750px)/2)) 14px}
.mark{width:39px;height:39px;border-radius:11px}
h1{font-size:18px;margin:0;letter-spacing:-.02em}
header p{margin:1px 0 0;color:#a9c7b7;font-size:13px}
#connection{margin-left:auto;color:#bde4cd;font-size:12px;white-space:nowrap}
main{width:min(100%,780px);margin:0 auto;flex:1;padding:24px 16px 16px}
#empty,#pair{margin:clamp(35px,12vh,110px) auto 0;max-width:410px;padding:24px;background:#fff;border:1px solid #dce8df;border-radius:20px}
#empty h2,#pair h2{font-size:22px;letter-spacing:-.03em;margin:0}
#pair-button{margin-top:14px}
#pair-code{font-size:29px;letter-spacing:.08em;color:#16543e;margin:13px 0 0}
#empty p{margin:8px 0 0;color:#4c6559}
article{max-width:92%;margin:0 0 17px;padding:12px 15px;border-radius:16px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.55}
article b{display:block;font-size:12px;letter-spacing:.02em;margin-bottom:5px}
.from-user{margin-left:auto;background:#d4ebdf}
.from-codex{background:#fff;border:1px solid #dce8df}
.notice{color:#4c6559;font-size:14px}
footer{position:sticky;bottom:0;background:#f5f7f2e8;backdrop-filter:blur(14px);padding:2px max(16px,calc((100vw - 748px)/2)) calc(12px + env(safe-area-inset-bottom))}
footer form{display:flex;align-items:end;gap:8px}
#feedback{color:#76502e;margin:0 0 5px;font-size:13px}
textarea,input,button{font:inherit}
textarea{width:100%;min-width:0;resize:vertical;min-height:58px;max-height:40vh;border:1px solid #afc4b7;border-radius:15px;padding:11px 13px;background:#fff;color:#172922}
button{border:0;color:#fff;background:#16543e;border-radius:12px;padding:13px 15px;font-weight:650;cursor:pointer}
button:disabled{opacity:.55;cursor:wait}
button:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid #409b77;outline-offset:2px}
