:root { color-scheme: dark; font-family: system-ui, sans-serif; background: #0c1119; color: #e2eaf3; font-size: 14px; --line: #293545; --muted: #9caec2; --accent: #82ddbe; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { max-width: 1600px; margin: 0 auto; padding: 24px 28px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 24px; letter-spacing: -.04em; }
h2 { font-size: 19px; margin-top: 4px; }
h3 { font-size: 14px; font-weight: 650; }
p { line-height: 1.5; }
.topbar, .brand, .room-controls, .connection-bar, .panel-heading, .section-heading, .peer-title { display: flex; align-items: center; gap: 12px; }
.topbar { justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.brand { flex-wrap: wrap; }
.badge, .eyebrow { color: var(--accent); font: 11px ui-monospace, monospace; letter-spacing: .08em; }
.badge { border: 1px solid #365447; border-radius: 4px; padding: 5px 7px; }
.room-controls { flex: 0 1 640px; min-width: 0; }
input { font: inherit; max-width: 100%; min-width: 0; }
input[readonly] { flex: 1; width: 100%; background: #111a26; color: #bdcfe3; border: 1px solid var(--line); padding: 9px 10px; border-radius: 5px; font: 12px ui-monospace, monospace; }
button, .download { font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; background: var(--accent); color: #0c2820; border: 1px solid transparent; border-radius: 5px; padding: 8px 11px; text-decoration: none; display: inline-block; }
button:disabled { opacity: .4; cursor: not-allowed; }
button.secondary { background: #1d2b3d; color: #becfe1; border-color: #324256; }
button:hover, .download:hover { filter: brightness(1.12); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.connection-bar { justify-content: space-between; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 20px; font-size: 12px; }
#status { color: var(--accent); }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); align-items: start; gap: 20px; }
.panel { min-width: 0; background: #121b27; border: 1px solid var(--line); border-radius: 8px; padding: 20px; }
.panel-heading { justify-content: space-between; margin-bottom: 10px; }
.identity { font: 12px ui-monospace, monospace; color: var(--muted); padding-bottom: 20px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.section-heading { justify-content: space-between; flex-wrap: wrap; margin: 18px 0 12px; }
.count { color: #b5c7db; background: #243246; border-radius: 4px; padding: 3px 6px; font: 11px ui-monospace, monospace; white-space: nowrap; }
.muted { color: var(--muted); font-size: 12px; }
.section-hint { margin-bottom: 14px; }
.auto-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0; }
.checkbox-label { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; cursor: pointer; font-weight: 600; }
.checkbox-label input { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
.dropzone { border: 1px dashed #41536a; background: #0f1824; border-radius: 6px; padding: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.dropzone label { font-size: 13px; font-weight: 600; }
.sr-only { position: absolute; width: 1px !important; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.feedback { margin: 8px 0; overflow-wrap: anywhere; }
.dropzone p { flex-basis: 100%; }
.folder-picker { margin-top: 8px; }
#folder-status { overflow-wrap: anywhere; }
.dropzone.dragging { background: #17392f; border-color: var(--accent); }
input[type=file] { font-size: 12px; width: 100%; }
input::file-selector-button { background: #273b51; color: #e2eaf3; border: 0; border-radius: 4px; padding: 7px 10px; margin-right: 10px; cursor: pointer; }
.empty-state { color: #8ba0b8; border: 1px dashed var(--line); padding: 22px 14px; border-radius: 6px; font-size: 12px; margin-top: 12px; }
.file-list { display: grid; gap: 3px; }
.transfer { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; border-bottom: 1px solid var(--line); background: #0e1722; padding: 6px 8px; overflow-wrap: anywhere; }
.transfer > p:first-child { flex: 1; min-width: 0; font-weight: 500; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.transfer-status, .transfer > p:not(:first-child) { color: var(--muted); font-size: 11px; margin: 0; max-width: 45%; }
.transfer-status:empty, .transfer-rate:empty { display: none; }
.transfer-rate { color: var(--accent); font: 11px ui-monospace, monospace; white-space: nowrap; }
.transfer button, .transfer .download { padding: 4px 7px; font-size: 11px; min-height: 26px; }
.transfer .row { flex-wrap: nowrap; gap: 6px; }
.transfer > progress { position: absolute; bottom: 0; left: 0; height: 2px; margin: 0; }
.received-file .received-meta { display: none; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
progress { display: block; width: 100%; height: 5px; accent-color: var(--accent); margin: 9px 0 12px; }
.storage-status { margin-top: 12px; overflow-wrap: anywhere; }
.received-heading { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 22px; }
.save-state { font: 11px ui-monospace, monospace; color: #e6c37a; }
.save-state.requested { color: var(--accent); }
.save-state.discarded { color: var(--muted); }
.received-meta { color: var(--muted); font-size: 11px; margin: 6px 0 10px; }
.peer { border: 1px solid var(--line); border-radius: 6px; margin-top: 12px; overflow: hidden; }
.peer-title { padding: 12px; justify-content: space-between; flex-wrap: wrap; background: #192535; }
.peer-title strong { font: 12px ui-monospace, monospace; }
.peer-title span { color: var(--accent); font-size: 11px; }
.peer-files { padding: 6px; display: grid; gap: 3px; }
.peer-files .empty-state { margin: 0; }
.peer-offline { opacity: .65; }
.activity { margin-top: 12px; color: var(--muted); font-size: 12px; }
.activity summary { cursor: pointer; }
.outgoing-list { display: grid; gap: 8px; margin-top: 12px; }
.outgoing-list:empty { display: none; }
.outgoing-list .transfer { background: #15202d; border-left: 2px solid #557b9c; }
.outgoing-list .outbound-row { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; padding: 7px 10px; }
.outgoing-list .outbound-row > p { margin: 0; font-size: 11px; }
.peer, .transfer { transition: opacity 280ms ease, transform 280ms ease; }
.leaving { opacity: 0; transform: translateY(-6px); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .peer, .transfer { transition: none; } .leaving { transform: none; } }
.error, #status.error, .peer-title .error { color: #ffb0a9; }
.help { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 15px; color: var(--muted); font-size: 12px; }
.help summary { cursor: pointer; color: #bdcde0; }
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 18px 0; }
.help h3 { color: #cddbec; margin-bottom: 8px; }
.help p { margin-bottom: 10px; }
.mobile-nav { display: none; }
@media (min-width: 1800px) { main { max-width: 1800px; } }
@media (max-width: 850px) {
  main { padding: 16px; }
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .panel { padding: 16px; scroll-margin-top: 12px; }
  .room-controls { flex-basis: 100%; }
  .mobile-nav { display: flex; gap: 10px; margin-bottom: 16px; }
  .mobile-nav a { flex: 1; text-align: center; padding: 9px; background: #1d2b3d; color: #d3e2f2; text-decoration: none; border-radius: 5px; }
  .help-grid { grid-template-columns: 1fr; gap: 12px; }
  button, .download { min-height: 40px; }
  .transfer { flex-wrap: wrap; gap: 6px; }
  .transfer > p:first-child { flex-basis: 100%; }
  .transfer button, .transfer .download { min-height: 36px; }
  .transfer-status { max-width: 100%; }
  .transfer .row { flex-wrap: wrap; }
}
@media (max-width: 420px) {
  main { padding: 12px; }
  .brand { gap: 8px; }
  .panel { padding: 12px; }
  .room-controls { flex-wrap: wrap; }
  .room-controls input { flex-basis: 100%; }
  .room-controls button { width: 100%; }
  .connection-bar > span { display: none; }
}
