:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: #152821;
  background: #edf4ef;
  --line: #d1ded5;
  --muted: #485e52;
  --green: #115d41;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.top { display: flex; justify-content: space-between; align-items: center; min-height: 68px; padding: 0 max(20px, calc((100% - 1040px) / 2)); border-bottom: 1px solid var(--line); background: #f6faf7; }
.identity { display: flex; align-items: center; gap: 12px; font-size: 1.12rem; font-weight: 750; }
.mark { display: grid; align-content: center; justify-items: start; gap: 4px; padding: 8px; width: 32px; height: 32px; border-radius: 9px; background: var(--green); }
.mark i { display: block; width: 13px; height: 4px; border-radius: 5px; background: #d6fae0; }
.mark i:last-child { margin-left: 4px; }
.top-note, .hint, footer { color: var(--muted); font-size: .875rem; }
main { max-width: 1080px; margin: auto; padding: 0 20px 36px; }
.intro { padding: clamp(30px, 5vw, 66px) 0 25px; }
h1 { margin: 0 0 9px; font-size: clamp(1.85rem, 4.6vw, 3.25rem); letter-spacing: -.045em; line-height: 1.18; }
h2 { font-size: 1.24rem; margin: 0; }
p { line-height: 1.55; margin: 0; }
.intro p { color: var(--muted); }
.card { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: clamp(16px, 3vw, 25px); }
.pair { margin-bottom: 14px; background: #f8fcf9; }
.pair-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; }
#unpaired { display: flex; flex-wrap: wrap; align-items: end; gap: 14px 24px; }
#join-form, #share-controls { max-width: 540px; }
#join-form { flex: 1 0 min(100%, 320px); }
#role { margin-bottom: 12px; }
.workspace { display: grid; align-items: start; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
fieldset { padding: 0; margin: 14px 0 0; border: 0; min-width: 0; }
label { display: block; margin: 0 0 5px; font-size: .925rem; font-weight: 650; }
label .hint { font-weight: 400; }
button, input, textarea, .download { font: inherit; }
button, .download { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; background: #f9fcfa; color: #173e2c; font-weight: 650; cursor: pointer; text-decoration: none; white-space: nowrap; }
button:disabled { opacity: .56; cursor: default; }
button:not(:disabled):hover, .download:hover { filter: brightness(.94); }
.primary { color: white; background: var(--green); border-color: var(--green); }
.quiet { padding: 4px 8px; background: transparent; border-color: transparent; font-size: .9rem; }
input, textarea { border: 1px solid #bacdc0; border-radius: 10px; color: inherit; background: #fff; min-height: 44px; padding: 10px; width: 100%; min-width: 0; }
textarea { resize: vertical; display: block; margin-bottom: 14px; }
:focus-visible { outline: 3px solid #287552; outline-offset: 2px; }
.field-row { display: flex; gap: 8px; align-items: center; }
#pair-code { font-family: ui-monospace, monospace; }
#pair-qr { display: block; max-width: 100%; height: auto; margin-top: 4px; border: 1px solid var(--line); border-radius: 10px; image-rendering: pixelated; }
.send-button { margin-top: 13px; }
.feedback { margin-top: 10px; color: var(--green); font-size: .925rem; }
.feedback.error { color: #a32627; }
#inbox { list-style: none; margin: 0; padding: 0; }
.message { border-top: 1px solid var(--line); padding: 13px 0; }
.message:last-child { padding-bottom: 0; }
.message p { white-space: pre-wrap; overflow-wrap: anywhere; }
.message img { display: block; margin: 8px 0; max-width: 100%; max-height: 360px; border-radius: 8px; }
.message pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; margin: 6px 0; max-height: 260px; overflow: auto; }
.message-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
footer { padding: 18px 3px 0; line-height: 1.55; }
@media (max-width: 700px) { .workspace { grid-template-columns: 1fr; } }

#login{display:grid;gap:8px;max-width:420px} #login label{margin:0} #login button{justify-self:start;margin-top:4px}
