:root {
  color-scheme: dark;
  font: 16px/1.5 system-ui, sans-serif;
  color: #e8f1ef;
  background: #141e24;
  --surface: #1c2a32;
  --border: #354752;
  --accent: #a7f1cf;
  --muted: #abc0c5;
}
* { box-sizing: border-box; }
body { margin: 0; }
.masthead, main { width: min(1120px, calc(100% - 32px)); margin: auto; }
.masthead { min-height: 76px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--border); }
.brand { color: inherit; text-decoration: none; font-size: 1.4rem; font-weight: 750; }
.brand span, #code { color: var(--accent); }
#status, small { color: var(--muted); }
main { padding: clamp(24px, 5vw, 56px) 0; }
h1 { margin: 0 0 12px; font-size: clamp(1.9rem, 5vw, 3rem); line-height: 1.1; }
h2 { margin: 0 0 14px; font-size: 1.12rem; }
p { max-width: 58ch; }
.room-heading, .tools, form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.room-heading { justify-content: space-between; margin-bottom: 24px; }
.layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; }
.layout > * { min-width: 0; background: var(--surface); padding: 18px; border: 1px solid var(--border); border-radius: 16px; }
aside h2:not(:first-child) { margin-top: 20px; }
button, .file-picker, input { font: inherit; border-radius: 8px; padding: 8px 12px; }
button, .file-picker { background: var(--accent); border: 1px solid transparent; color: #14251e; cursor: pointer; font-weight: 650; }
input { background: #131d22; color: inherit; border: 1px solid var(--border); min-width: 0; }
form input:not(#pin) { flex: 1; }
.file-picker input { display: block; width: min(100%, 240px); margin-top: 5px; padding: 4px; }
ul { padding: 0; list-style: none; }
li { overflow-wrap: anywhere; }
.entries li { border-top: 1px solid var(--border); padding: 10px 0; white-space: pre-wrap; }
.entries small { display: block; }
.entries button { margin: 6px 6px 0 0; }
#chat { max-height: 380px; overflow: auto; }
dialog { width: min(440px, calc(100% - 32px)); background: var(--surface); color: inherit; border: 1px solid var(--border); border-radius: 16px; padding: 22px; }
dialog::backdrop { background: #000a; }
#code { font: 750 2rem ui-monospace, monospace; letter-spacing: .12em; margin: 10px 0; }
#link { width: 100%; margin-bottom: 10px; }
@media (max-width: 720px) { .layout { grid-template-columns: minmax(0, 1fr); } }
