:root {
  color-scheme: light;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f2f4fa;
  color: #1c2438;
  --accent: #3e497e;
  --muted: #5b657c;
  --line: #dce1ee;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.shell { max-width: 44rem; margin: 0 auto; padding: clamp(1rem, 5vw, 2.75rem); }
.masthead { display: flex; align-items: center; gap: 0.85rem; margin: 1.25rem 0 1.75rem; }
.mark {
  display: grid; place-items: center; width: 2.8rem; height: 2.8rem;
  border-radius: 0.9rem; background: #252e55; color: #fff; font-size: 1.55rem;
}
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.55rem, 6vw, 2.15rem); letter-spacing: -0.045em; }
h2 { font-size: 1.06rem; }
.masthead p, .panel-head p, .document p { color: var(--muted); font-size: 0.9rem; margin-top: 0.35rem; }
.panel {
  margin-bottom: 0.85rem; padding: clamp(1rem, 4vw, 1.45rem);
  border-radius: 1.1rem; border: 1px solid var(--line); background: #fff;
}
.panel-head, .document { display: flex; justify-content: space-between; align-items: start; gap: 0.75rem; }
.document { align-items: center; }
.login-row { display: flex; gap: 0.55rem; margin-top: 0.55rem; }
label { font-size: 0.92rem; font-weight: 650; }
input, button, a.secondary { font: inherit; min-height: 2.75rem; border-radius: 0.62rem; }
input {
  min-width: 0; flex: 1; padding: 0.6rem 0.7rem; font-size: 1rem;
  color: inherit; border: 1px solid #9da8c0; background: #fff;
}
button, a.secondary {
  display: inline-flex; justify-content: center; align-items: center; padding: 0.6rem 0.85rem;
  background: var(--accent); color: #fff; border: 1px solid transparent; cursor: pointer;
  text-decoration: none; font-weight: 650; white-space: nowrap;
}
button:disabled { background: #e7eaf4; color: #5b657c; cursor: default; }
a.secondary { background: #eef0fa; color: #303b70; }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid #5667b4; outline-offset: 3px; }
.connection { color: var(--muted); font-size: 0.81rem; white-space: nowrap; padding-top: 0.1rem; }
.connection[data-online="true"] { color: #4a4c89; font-weight: 650; }
.message, .receipt {
  margin: 0.9rem 0; padding: 0.8rem 0.85rem; border-radius: 0.65rem;
  font-size: 0.94rem; background: #f2f4fb; line-height: 1.6; overflow-wrap: anywhere;
}
.receipt { background: #f8f9fc; border: 1px solid var(--line); }
.receipt small { color: var(--muted); }
.receipt p { white-space: pre-wrap; }
.notice { color: #7c3c35; padding: 0.3rem 0.2rem; font-size: 0.9rem; }
@media (max-width: 390px) {
  .panel-head { flex-wrap: wrap; }
  .connection { padding: 0; }
}
