:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1f2937;
  background: #f6f7f9;
  accent-color: #1d4ed8;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { width: min(100% - 2rem, 56rem); margin: clamp(1.5rem, 6vw, 4.5rem) auto; }
header, .editor-head, .actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
header, .editor-head { justify-content: space-between; }
h1 { font-size: clamp(1.5rem, 4vw, 2rem); margin: 0; letter-spacing: -.03em; }
form, #workspace {
  margin-top: 1.25rem;
  background: #fff;
  border: 1px solid #dde2ea;
  border-radius: .8rem;
  padding: clamp(1rem, 3vw, 1.5rem);
}
form { max-width: 23rem; display: grid; gap: .6rem; }
label { font-size: .95rem; font-weight: 600; }
input, textarea, button { font: inherit; }
input, textarea { width: 100%; padding: .75rem; border: 1px solid #aeb9c8; border-radius: .5rem; color: inherit; background: #fff; }
form input + label { margin-top: .35rem; }
button {
  min-height: 2.75rem;
  padding: .55rem 1rem;
  border: 1px solid #1d4ed8;
  border-radius: .5rem;
  color: #fff;
  background: #1d4ed8;
  cursor: pointer;
}
form button { margin-top: .5rem; }
button.secondary { background: #fff; color: #1f2937; border-color: #aeb9c8; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 2px solid #1d4ed8; outline-offset: 3px; }
textarea { display: block; resize: vertical; line-height: 1.65; }
#note { min-height: 17rem; height: 55vh; }
#status { font-size: .875rem; margin: .3rem 0 .75rem; color: #475569; }
#login-error { color: #9f1239; margin: .25rem 0 0; }
#conflict { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #dde2ea; }
#online { height: 10rem; margin: .65rem 0; background: #f6f7f9; }
