:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  color: #fbf2e7;
  background: #1b1717;
  --accent: #ff8c53;
  --muted: #c6b3a4;
  --line: #605044;
}
* { box-sizing: border-box; }
body { margin: 0; }
main { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 32px 0 22px; }
header { border-block-start: 4px solid var(--accent); padding: 13px 0 20px; }
a { color: var(--accent); text-underline-offset: 4px; }
h1 { font-size: clamp(2.3rem, 7vw, 5rem); line-height: 1; margin: 16px 0 10px; letter-spacing: -.04em; }
header p, .controls, footer { color: var(--muted); }
header p { margin: 0; font-size: clamp(.9rem, 2.5vw, 1.15rem); }
.rig { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(252px, 1fr); gap: clamp(16px, 3vw, 36px); align-items: start; }
.screen { padding: 7px 7px 0; background: #322824; border: 1px solid #7c6252; }
canvas { display: block; width: 100%; aspect-ratio: 8 / 5; background: #0b0808; image-rendering: pixelated; }
.screen-id { display: flex; justify-content: space-between; gap: 1em; padding: 9px 7px; font: .82rem ui-monospace, monospace; }
.controls { line-height: 1.55; margin: 14px 0; }
kbd { color: #fff2dc; padding: 1px 5px; border: 1px solid #7c6252; border-radius: 4px; white-space: nowrap; }
aside { border-block: 1px solid var(--line); padding: 15px 0; }
h2 { margin: 0 0 10px; font-size: 1.2rem; }
dl { margin: 0 0 15px; }
dl div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid #3e3330; padding: 6px 0; }
dt { font-size: .9rem; color: var(--muted); }
dd { font: .91rem ui-monospace, monospace; margin: 0; white-space: nowrap; }
label { display: block; font-size: .9rem; margin-bottom: 5px; }
.connection { display: flex; gap: 8px; }
input, button { font: inherit; min-height: 40px; border-radius: 4px; border: 1px solid #7c6252; }
input { min-width: 0; width: 100%; color: inherit; background: #0e0a0a; padding: 6px 8px; }
button { background: var(--accent); color: #21110a; padding: 6px 12px; font-weight: 650; cursor: pointer; }
button:hover:enabled { background: #ffae83; }
button.secondary { background: transparent; color: inherit; margin-top: 10px; }
button.secondary:hover:enabled { color: #21110a; }
button:disabled { opacity: .48; cursor: default; }
:focus-visible { outline: 3px solid #ffc5a6; outline-offset: 3px; }
#status { font-size: .9rem; line-height: 1.4; margin: 11px 0 0; min-height: 2.5em; color: var(--muted); }
footer { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 13px; font-size: .88rem; line-height: 1.5; }
@media (max-width: 690px) {
  .rig { grid-template-columns: 1fr; }
  main { width: calc(100% - 28px); padding-top: 15px; }
}
