:root {
  color-scheme: light;
  font: 15px/1.55 "Microsoft YaHei UI", "Segoe UI", sans-serif;
  color: #16262d;
  background: #eef3f5;
  --muted: #455e68;
  --line: #d6e0e4;
  --accent: #086656;
  --dark: #10272c;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, p { margin: 0; }
h1 { font-size: 26px; letter-spacing: -.03em; }
h2 { font-size: 17px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px clamp(16px, 4vw, 48px); background: var(--dark); color: #fff; }
.brand, .section-head, .pair-header { display: flex; align-items: center; gap: 12px; }
.brand { font-weight: 700; }
.mark { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #5d8984; border-radius: 8px; color: #abf2dc; font: 700 17px/1 "Segoe UI", sans-serif; }
.status { color: #c0e5de; text-align: right; overflow-wrap: anywhere; }
.workspace { width: min(1540px, 100%); margin: auto; padding: 24px clamp(16px, 4vw, 48px) 40px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; min-width: 0; }
.pairing { padding: 22px 24px; margin-bottom: 18px; }
.pair-header { justify-content: space-between; }
.muted { color: var(--muted); }
form label { display: grid; gap: 5px; font-weight: 600; }
#pair-form { display: grid; grid-template-columns: minmax(140px, .65fr) minmax(190px, 1.35fr) auto; gap: 14px; align-items: end; margin-top: 18px; }
button, .button, input, textarea, select { font: inherit; }
button, .button { padding: 7px 12px; border: 1px solid #bfcfd3; border-radius: 6px; background: #fff; color: #163839; cursor: pointer; font-weight: 650; min-height: 38px; }
button:hover, .button:hover { background: #f0f8f6; }
button:disabled { opacity: .53; cursor: default; }
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
button.primary:hover { background: #075347; }
button.quiet { background: #f3f7f8; }
button.danger { color: #8f2526; }
input:not([type=checkbox]), textarea, select { width: 100%; border: 1px solid #bfced4; border-radius: 6px; min-height: 38px; background: #fff; color: #16262d; padding: 7px 9px; }
input[type=checkbox] { accent-color: var(--accent); }
:focus-visible { outline: 2px solid #007e75; outline-offset: 2px; }
.session-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(310px, 1fr); align-items: start; gap: 16px; }
.session-grid.single { grid-template-columns: minmax(0, 1fr); }
.section-head { justify-content: space-between; margin-bottom: 12px; }
.switch { display: flex; align-items: center; gap: 5px; }
.display { min-height: 280px; display: flex; align-items: center; justify-content: center; background: #12242b; color: #a7c9d1; border-radius: 7px; overflow: hidden; }
.display img { display: block; max-width: 100%; max-height: 65vh; user-select: none; touch-action: none; }
.inline-form { display: flex; gap: 8px; margin-top: 10px; }
.inline-form button { flex-shrink: 0; }
.shortcuts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 15px; }
.shortcuts button { padding: 5px 9px; min-height: 32px; font-size: 13px; }
.description { font-size: 13px; max-height: 80px; overflow: auto; margin: 8px 0; }
textarea, pre { font-family: Consolas, monospace; }
textarea { min-height: 84px; resize: vertical; }
#call { margin-top: 9px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 280px; overflow: auto; min-height: 64px; margin: 13px 0; padding: 10px; background: #f2f7f8; border-radius: 6px; }
.mcp { border-top: 1px solid var(--line); padding-top: 10px; }
summary { cursor: pointer; }
.mcp p { margin: 5px 0 9px; font-size: 13px; }
.files { grid-column: 1 / -1; }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload:focus-within { outline: 2px solid #007e75; outline-offset: 2px; }
#file-list { display: grid; gap: 5px; list-style: none; margin: 0; padding: 0; }
#file-list li { display: flex; gap: 10px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding: 6px 0; overflow-wrap: anywhere; }
@media (max-width: 820px) {
  .session-grid, #pair-form { grid-template-columns: 1fr; }
  .pair-header { align-items: flex-start; }
  .display { min-height: 180px; }
}
