@import url("/assets/inter-local.css");

:root {
  --ink: #17211d;
  --muted: #69746e;
  --line: #dfe5e1;
  --surface: #ffffff;
  --canvas: #f4f7f5;
  --green: #187451;
  --green-2: #23946a;
  --green-soft: #e5f3ec;
  --amber: #bd7b18;
  --navy: #182a32;
  --shadow: 0 18px 50px rgba(25, 53, 42, .12);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  overflow: hidden;
}
button, input, textarea { font: inherit; }
button { color: inherit; }
svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.app-shell {
  display: grid;
  grid-template: 72px minmax(0, 1fr) / 310px minmax(400px, 1fr) 344px;
  height: 100%;
}

.topbar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 310px 1fr auto;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.96);
  position: relative;
  z-index: 10;
}
.brand { height: 100%; display: flex; align-items: center; gap: 12px; padding: 0 22px; color: inherit; text-decoration: none; border-right: 1px solid var(--line); }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--navy); display: flex; align-items: end; justify-content: center; gap: 3px; padding: 8px 7px; }
.brand-mark i { display: block; width: 4px; border-radius: 3px; background: #62d0a2; }
.brand-mark i:nth-child(1) { height: 8px; opacity: .6; }
.brand-mark i:nth-child(2) { height: 16px; }
.brand-mark i:nth-child(3) { height: 12px; opacity: .8; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: -.02em; }
.brand small { color: var(--muted); font-size: 10px; margin-top: 2px; text-transform: uppercase; letter-spacing: .08em; }
.topbar-center { justify-self: center; display: flex; align-items: center; gap: 8px; color: #4e5c55; font-size: 12px; }
.topbar-center code { font-family: "SFMono-Regular", Consolas, monospace; color: var(--ink); background: #f0f3f1; border: 1px solid var(--line); border-radius: 5px; padding: 4px 7px; max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.pulse-dot, .status-light { width: 7px; height: 7px; background: #28a976; box-shadow: 0 0 0 4px rgba(40,169,118,.12); border-radius: 50%; }
.top-actions { display: flex; align-items: center; gap: 10px; padding-right: 18px; }
.local-badge { display: flex; align-items: center; gap: 6px; color: var(--green); background: var(--green-soft); border: 1px solid #cce6d9; border-radius: 999px; padding: 6px 10px; font-size: 11px; font-weight: 650; }
.local-badge svg { width: 14px; }
.icon-button { border: 0; background: transparent; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border-radius: 8px; cursor: pointer; color: #617069; }
.icon-button:hover { background: #f0f4f2; color: var(--ink); }
.icon-button.soft { background: #eef3f0; border: 1px solid #e0e7e3; }
.copy-id { width: 26px; height: 26px; }
.copy-id svg { width: 14px; }

.sidebar { background: #f8faf9; border-right: 1px solid var(--line); min-height: 0; position: relative; display: flex; flex-direction: column; }
.sidebar-scroll { flex: 1; min-height: 0; overflow: auto; padding: 15px 10px; }
.sidebar-section { padding: 10px 0 12px; border-bottom: 1px solid var(--line); }
.sidebar-section:last-child { border-bottom: 0; }
.compact-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 9px 7px; color: #7c8982; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.mini-add { width: 25px; height: 25px; border: 1px solid #dbe3df; border-radius: 7px; background: #edf3f0; color: #557067; cursor: pointer; font-size: 17px; line-height: 1; }
.nav-list { display: grid; gap: 2px; }
.nav-item { border: 0; background: transparent; width: 100%; min-height: 36px; border-radius: 8px; display: grid; grid-template-columns: 25px minmax(0,1fr) auto; align-items: center; gap: 7px; padding: 6px 9px; text-align: left; cursor: pointer; }
.nav-item:hover { background: #edf3f0; }
.nav-item.active { background: #e3eee8; color: #185f44; }
.nav-item-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; background: #e4ebe7; font-size: 11px; font-weight: 800; }
.nav-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.nav-item small { color: var(--muted); font-size: 10px; }
.contact-item { grid-template-columns: 29px minmax(0,1fr) 28px; }
.contact-item:focus-visible { outline: 2px solid #6dac8e; outline-offset: -2px; }
.contact-qr-button { width: 28px; height: 28px; border: 1px solid #d7e1dc; border-radius: 7px; background: #f7faf8; color: #356651; padding: 4px; cursor: pointer; }
.contact-qr-button:hover { background: #deeee6; }
.contact-qr-button svg { width: 18px; height: 18px; }
.contact-item[draggable="true"], #local-id[draggable="true"],
.strong-id-value[draggable="true"] { cursor: grab; }
.contact-item.dragging { opacity: .55; }
.contacts-section.drag-over { border-radius: 10px; background: #e3f1e9; box-shadow: inset 0 0 0 2px #6dac8e; }
.contacts-section.drag-over #contact-drop-hint { color: #176847; font-weight: 750; }
.contact-item .nav-item-icon { border-radius: 50%; width: 29px; height: 29px; background: #dfeee6; color: #267055; }
.contact-copy strong, .contact-copy small { display: block; }
.relation-tag { display: inline-block !important; margin-left: 5px; padding: 1px 5px; border: 1px solid #dfe4e1; border-radius: 999px; background: #eef1ef; color: #7d8782; font-family: "SFMono-Regular", Consolas, monospace; font-size: .78em !important; font-weight: 650; letter-spacing: .04em; vertical-align: .08em; }
.contact-copy small { margin-top: 2px; font-family: monospace; font-size: 11px; }
.contact-presence, .room-presence { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; }
.contact-presence { margin-top: 2px; }
.presence-dot { width: 7px; height: 7px; border-radius: 50%; background: #9ba49f; box-shadow: 0 0 0 2px rgba(155,164,159,.14); }
.contact-presence.online, .room-presence.online { color: #18704f; }
.contact-presence.online .presence-dot, .room-presence.online .presence-dot { background: #25a472; box-shadow: 0 0 0 2px rgba(37,164,114,.15); }
.contact-presence.offline, .room-presence.offline { color: #6f7974; }
.room-presence { font-size: inherit; }
.empty-nav, .sidebar-hint { color: #89938e; font-size: 10px; margin: 5px 9px; }
.adjacency-section .adjacency-list { padding: 0; overflow: visible; }
.section-heading { display: flex; align-items: center; justify-content: space-between; padding: 25px 20px 0; }
.section-heading span, .eyebrow { color: #87918c; font-size: 10px; letter-spacing: .13em; font-weight: 750; }
.section-heading h2 { margin: 4px 0 0; font-size: 19px; letter-spacing: -.035em; }
.section-copy { font-size: 11px; line-height: 1.55; color: var(--muted); margin: 9px 20px 16px; }
.adjacency-list { padding: 0 11px; overflow: auto; flex: 1; }
.adjacency-card { width: 100%; border: 1px solid transparent; border-radius: 10px; background: transparent; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 11px 10px; text-align: left; cursor: pointer; margin-bottom: 4px; }
.adjacency-card:hover { background: #f0f5f2; }
.adjacency-card.active { background: white; border-color: #dbe4df; box-shadow: 0 4px 16px rgba(38,74,58,.06); }
.adjacency-avatar, .peer-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: #28684f; background: #ddefe6; font-size: 11px; font-weight: 800; }
.adjacency-card strong { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adjacency-card small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.adjacency-card .state-dot { width: 7px; height: 7px; border-radius: 50%; background: #25a472; }
.adjacency-card.closed { opacity: .65; }
.adjacency-card.closed .state-dot { background: #9ba49f; }
.skeleton-card { pointer-events: none; }
.skeleton-card > span { width: 38px; height: 38px; border-radius: 10px; background: #e7ece9; }
.skeleton-card b, .skeleton-card i { display: block; height: 8px; border-radius: 8px; background: #e7ece9; width: 110px; }
.skeleton-card i { width: 70px; margin-top: 8px; }
.sidebar-footer { min-height: 82px; border-top: 1px solid var(--line); padding: 15px 18px; }
.sidebar-footer > div { display: flex; align-items: center; gap: 10px; }
.sidebar-footer b, .sidebar-footer small { display: block; }
.sidebar-footer b { font-size: 10px; }
.sidebar-footer small { color: var(--muted); margin-top: 3px; font-size: 9px; }
.text-button { border: 0; background: none; color: var(--green); font-size: 10px; padding: 9px 0 0 17px; cursor: pointer; }

.conversation { min-width: 0; background: var(--surface); display: grid; grid-template-rows: auto minmax(0,1fr) auto; }
.room-header { min-height: 92px; display: flex; align-items: center; justify-content: space-between; padding: 16px 28px; border-bottom: 1px solid var(--line); }
.room-header h1 { margin: 4px 0 3px; font-size: 20px; letter-spacing: -.035em; }
.room-header p { margin: 0; color: var(--muted); font-size: 11px; }
.reconnect-button { border: 0; border-radius: 999px; padding: 3px 8px; background: #e3eee8; color: #185f44; font: inherit; font-weight: 750; cursor: pointer; }
.reconnect-button:hover { background: #d5e7dd; }
.room-stats { display: flex; align-items: center; gap: 2px; }
.room-stats > span { min-width: 72px; text-align: center; padding: 4px 14px; border-left: 1px solid var(--line); }
.room-stats b, .room-stats small { display: block; }
.room-stats b { font-size: 14px; }
.room-stats small { color: var(--muted); font-size: 8px; margin-top: 3px; text-transform: uppercase; letter-spacing: .06em; }
.mobile-inspector { display: none; }
.messages { overflow: auto; padding: 20px clamp(22px, 4vw, 64px) 32px; scroll-behavior: smooth; }
.day-divider { display: flex; align-items: center; gap: 12px; color: #9ca5a0; font-size: 9px; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 20px; }
.day-divider::before, .day-divider::after { content: ""; height: 1px; background: #e8ece9; flex: 1; }
.system-message { display: flex; align-items: center; gap: 12px; background: #f4f8f6; border: 1px solid #e0e9e4; border-radius: 10px; padding: 12px 15px; margin-bottom: 25px; }
.system-icon { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 8px; background: var(--green-soft); color: var(--green); }
.system-icon svg { width: 17px; }
.system-message b { font-size: 11px; }
.system-message p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.message { display: grid; grid-template-columns: 35px minmax(0, 1fr); gap: 11px; margin: 18px 0; animation: arrive .22s ease-out; }
@keyframes arrive { from { opacity: 0; transform: translateY(5px); } }
.message-avatar { width: 35px; height: 35px; border-radius: 9px; display: grid; place-items: center; background: #e7eeea; color: #415c50; font-size: 10px; font-weight: 800; }
.message.mine .message-avatar { background: var(--navy); color: #d5f5e8; }
.message-head { display: flex; gap: 8px; align-items: baseline; }
.message-head strong { font-size: 11px; }
.message-head time { color: #9aa39f; font-size: 9px; }
.message-body { margin: 4px 0 0; font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.delivery { color: var(--green); font-size: 9px; margin-left: 6px; }
.file-card { max-width: 390px; display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); background: #fbfcfb; border-radius: 9px; padding: 10px; margin-top: 7px; text-decoration: none; color: inherit; }
.file-card:hover { border-color: #b9d2c6; background: #f6faf8; }
.file-card .file-type, .pending-file .file-type { width: 36px; height: 38px; display: grid; place-items: center; background: #e2f0e9; color: var(--green); border-radius: 7px; font-size: 8px; font-weight: 800; }
.file-card span:nth-child(2) { min-width: 0; flex: 1; }
.file-card b, .file-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-card b { font-size: 10px; }
.file-card small { color: var(--muted); font-size: 9px; margin-top: 4px; }
.file-card svg { width: 17px; color: var(--green); }

.composer-wrap { padding: 9px clamp(20px, 3vw, 44px) 18px; border-top: 1px solid #edf0ee; background: white; }
.composer { min-height: 58px; border: 1px solid #ced7d2; border-radius: 11px; display: grid; align-items: center; grid-template-columns: 48px minmax(0, 1fr) auto 48px; padding: 7px; box-shadow: 0 3px 12px rgba(31,55,44,.04); }
.composer:focus-within { border-color: #72a991; box-shadow: 0 0 0 3px rgba(35,148,106,.08); }
.attach-button, .send-button { border: 0; cursor: pointer; display: grid; place-items: center; }
.attach-button { background: transparent; color: #637069; }
.send-button { width: 38px; height: 38px; border-radius: 9px; background: var(--green); color: white; }
.send-button:hover { background: #125f42; }
.send-button:disabled { opacity: .45; cursor: not-allowed; }
.composer textarea { border: 0; outline: 0; resize: none; padding: 9px 4px; max-height: 110px; color: var(--ink); }
.composer textarea::placeholder { color: #9ca5a0; }
.composer-meta { display: flex; gap: 9px; align-items: center; color: #909a95; font-size: 8px; white-space: nowrap; }
kbd { font: inherit; border: 1px solid #d8dedb; border-bottom-width: 2px; background: #f7f8f7; border-radius: 4px; padding: 2px 5px; }
.pending-file { align-items: center; max-width: 370px; gap: 9px; border: 1px solid var(--line); border-bottom: 0; border-radius: 9px 9px 0 0; padding: 8px 10px; margin-left: 10px; background: #f8faf9; }
.pending-file:not([hidden]) { display: flex; }
.pending-file .file-type { width: 30px; height: 30px; }
.pending-file span:nth-child(2) { min-width: 0; flex: 1; }
.pending-file b, .pending-file small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 9px; }
.pending-file small { color: var(--muted); margin-top: 2px; }
.pending-file button { border: 0; background: transparent; cursor: pointer; color: #7f8984; font-size: 18px; }

.inspector { background: #f9fbfa; border-left: 1px solid var(--line); min-height: 0; display: flex; flex-direction: column; }
.inspector-scroll { overflow: auto; flex: 1; }
.inspector section { padding: 22px 20px; border-bottom: 1px solid var(--line); }
.inspector-frame { border: 0; border-bottom: 1px solid var(--line); background: transparent; }
.inspector-frame > summary { min-height: 48px; padding: 15px 20px; display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; list-style: none; }
.inspector-frame > summary::-webkit-details-marker { display: none; }
.inspector-frame > summary::after { content: "+"; color: #728078; font-size: 16px; }
.inspector-frame[open] > summary::after { content: "−"; }
.inspector-frame-body { padding: 0 20px 20px; }
.peer-profile { display: flex; align-items: center; gap: 11px; margin: 15px 0; }
.peer-avatar { width: 42px; height: 42px; }
.peer-profile h2 { font-size: 13px; margin: 0 0 4px; }
.peer-profile span:not(.peer-avatar) { color: var(--green); font-size: 9px; }
.peer-profile span i { display: inline-block; width: 6px; height: 6px; background: #23a16f; border-radius: 50%; margin-right: 5px; }
#peer-status[data-state="unavailable"] { color: #7e8983; }
#peer-status[data-state="unavailable"] i { background: #a1aaa5; }
.details-list { margin: 0; }
.details-list div { display: flex; justify-content: space-between; padding: 7px 0; font-size: 9px; border-top: 1px dotted #dce2df; }
.details-list dt { color: var(--muted); }
.details-list dd { margin: 0; font-family: "SFMono-Regular", Consolas, monospace; font-size: 8px; }
.section-row { display: flex; justify-content: space-between; align-items: center; }
.live-label { font-size: 8px; color: var(--green); }
.live-label i { width: 5px; height: 5px; display: inline-block; margin-right: 4px; background: var(--green-2); border-radius: 50%; }
.traffic-grid { display: grid; grid-template-columns: 1fr 1fr; margin-top: 14px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.traffic-grid > div { padding: 12px; }
.traffic-grid > div + div { border-left: 1px solid var(--line); }
.traffic-grid small, .traffic-grid b, .traffic-grid span { display: block; }
.traffic-grid small { color: var(--muted); font-size: 8px; }
.traffic-grid b { font-size: 13px; margin: 4px 0 6px; }
.traffic-grid em { color: var(--muted); font-size: 8px; font-style: normal; display: inline; }
.traffic-grid i { display: inline-block; width: 5px; height: 5px; border-right: 1px solid; border-bottom: 1px solid; margin-right: 4px; transform: rotate(-135deg); color: var(--green); }
.traffic-grid i.down { transform: rotate(45deg); color: #4676a1; }
.route-visual { margin-top: 16px; }
.route-visual > div { display: flex; align-items: center; gap: 10px; }
.route-node { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; background: #eaf0ed; color: #476157; }
.route-node svg { width: 16px; }
.path-node { background: #e3eee8; color: #176847; }
.trajectory-heading { gap: 8px; }
.trajectory-heading select { min-width: 0; max-width: 155px; border: 1px solid #d5dfda; border-radius: 6px; background: #f7faf8; color: #345347; padding: 4px 6px; font-size: 10px; }
.remote-node { background: var(--green-soft); color: var(--green); }
.route-visual p { margin: 0; }
.route-visual p b, .route-visual p small { display: block; font-size: 9px; }
.route-visual p small { color: var(--muted); margin-top: 3px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.route-line { display: flex; flex-direction: column; gap: 3px; margin: 4px 0 4px 14px; }
.route-line i { width: 3px; height: 3px; background: #87b29f; border-radius: 50%; }
.policy-select { display: grid; gap: 5px; color: var(--muted); font-size: 10px; }
.policy-select select { width: 100%; border: 1px solid #d5dfda; border-radius: 7px; background: white; color: #29493c; padding: 7px 8px; }
.trajectory-graph { margin-top: 12px; display: grid; gap: 8px; }
.graph-origin { display: grid; gap: 2px; padding: 9px 10px; border-radius: 8px; background: #e9efec; }
.graph-origin b { font-size: 11px; }
.graph-origin small { color: var(--muted); font: 9px monospace; }
.graph-session, .graph-empty { position: relative; margin-left: 18px; border: 1px solid #dce4e0; border-radius: 8px; background: white; }
.graph-session::before, .graph-empty::before { content: ""; position: absolute; left: -19px; top: -9px; width: 17px; height: 26px; border-left: 2px solid #9fc2b1; border-bottom: 2px solid #9fc2b1; border-radius: 0 0 0 7px; }
.graph-session > summary { display: grid; grid-template-columns: 8px minmax(0,1fr); gap: 8px; align-items: center; padding: 9px; cursor: pointer; list-style: none; }
.graph-session > summary::-webkit-details-marker { display: none; }
.graph-session summary span b, .graph-session summary span small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.graph-session summary span b { font-size: 11px; }
.graph-session summary span small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.graph-session .state-dot { width: 7px; height: 7px; border-radius: 50%; background: #25a472; }
.graph-session.closed .state-dot, .graph-session.failed .state-dot { background: #9ba49f; }
.graph-session.selected { border-color: #79aa92; box-shadow: 0 0 0 2px rgba(44,132,92,.08); }
.graph-session-body { display: grid; gap: 6px; padding: 0 9px 9px 25px; }
.graph-session-body p { margin: 0; color: var(--muted); font-size: 9px; }
.graph-session-body code { color: #365b4b; font-size: 9px; }
.graph-select-path { border: 1px solid #c9d8d0; border-radius: 6px; background: #edf5f1; color: #1b6849; padding: 6px; cursor: pointer; font-size: 9px; }
.graph-empty { display: grid; gap: 4px; padding: 11px; border-style: dashed; }
.graph-empty span { color: #9a5c42; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.graph-empty b { font-size: 11px; }
.graph-empty small, .section-copy-inline { color: var(--muted); font-size: 9px; }
.event-section ol { list-style: none; padding: 0; margin: 12px 0 0; }
.event-section li { display: grid; grid-template-columns: 43px 1fr; padding: 5px 0; color: #515f58; font-size: 8px; line-height: 1.4; }
.event-section time { color: #98a19d; font-family: monospace; }
.event-section button { border: 0; background: transparent; color: var(--green); cursor: pointer; font-size: 8px; }
.disconnect-button { margin: 13px 18px 18px; min-height: 38px; border: 1px solid #dbdfdd; background: white; border-radius: 8px; color: #6b7771; font-size: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px; }
.disconnect-button:hover:not(:disabled) { color: #a5423f; border-color: #e3bdbb; }
.disconnect-button:disabled { opacity: .45; cursor: not-allowed; }
.disconnect-button svg { width: 15px; }

dialog { border: 0; background: transparent; padding: 20px; max-width: none; }
dialog::backdrop { background: rgba(20,33,28,.48); backdrop-filter: blur(3px); }
.dialog-card { width: min(420px, calc(100vw - 32px)); background: white; border-radius: 15px; padding: 28px; box-shadow: var(--shadow); position: relative; }
.dialog-close { position: absolute; top: 13px; right: 13px; width: 30px; height: 30px; border: 0; background: #f1f4f2; color: #6c7772; border-radius: 8px; font-size: 20px; cursor: pointer; }
.dialog-icon { width: 42px; height: 42px; display: grid; place-items: center; color: var(--green); background: var(--green-soft); border-radius: 11px; margin-bottom: 18px; }
.dialog-card h2 { font-size: 21px; margin: 5px 0 8px; letter-spacing: -.035em; }
.dialog-card > p { color: var(--muted); font-size: 11px; line-height: 1.6; }
.dialog-card label { display: block; margin-top: 20px; color: #59665f; font-size: 10px; font-weight: 650; }
.dialog-card input { width: 100%; display: block; border: 1px solid #ccd6d1; border-radius: 8px; padding: 10px 11px; outline: 0; margin-top: 6px; }
.dialog-card select, .dialog-card textarea { width: 100%; display: block; border: 1px solid #ccd6d1; border-radius: 8px; padding: 10px 11px; outline: 0; margin-top: 6px; background: white; resize: vertical; }
.dialog-card label + label { margin-top: 12px; }
.dialog-card input:focus { border-color: #65a98b; box-shadow: 0 0 0 3px rgba(35,148,106,.08); }
.mode-card { display: flex; align-items: center; justify-content: space-between; border: 1px solid #bad8ca; background: #f5faf7; border-radius: 9px; padding: 12px; margin: 13px 0 20px; }
.mode-card b, .mode-card small { display: block; }
.mode-card b { font-size: 10px; }
.mode-card small { color: var(--muted); font-size: 9px; margin-top: 4px; }
.field-note { margin: 9px 0 18px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.radio-dot { width: 14px; height: 14px; background: var(--green); border: 4px solid white; box-shadow: 0 0 0 1px var(--green); border-radius: 50%; }
.primary-button { border: 0; width: 100%; border-radius: 8px; background: var(--green); color: white; padding: 11px; font-size: 11px; font-weight: 700; cursor: pointer; }
.primary-button:hover { background: #125f42; }
.info-card code { background: #eef2f0; padding: 2px 4px; border-radius: 4px; font-size: 10px; }
.identity-card { width: min(440px, calc(100vw - 32px)); text-align: center; }
.identity-card > p { max-width: 350px; margin-left: auto; margin-right: auto; }
.contact-qr { width: min(260px, 68vw); aspect-ratio: 1; margin: 18px auto 12px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.contact-qr-svg { display: block; width: 100%; height: 100%; shape-rendering: crispEdges; }
.strong-id-value { display: block; margin: 0 auto 14px; max-width: 350px; padding: 8px 10px; border-radius: 7px; background: #f0f4f2; color: #335045; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.identity-metadata { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 9px; background: #fafcfb; text-align: left; }
.identity-metadata div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 11px; }
.identity-metadata div + div { border-top: 1px solid var(--line); }
.identity-metadata dt { color: var(--muted); font-size: 11px; }
.identity-metadata dd { margin: 0; font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; }
.identity-note { font-size: 10px !important; }
.scanner-card { width: min(470px, calc(100vw - 32px)); }
.camera-frame { aspect-ratio: 16 / 9; margin: 15px 0 10px; border-radius: 11px; overflow: hidden; background: #17251f; position: relative; display: grid; place-items: center; }
.camera-frame video { width: 100%; height: 100%; object-fit: cover; }
.camera-frame span { position: absolute; bottom: 9px; left: 50%; transform: translateX(-50%); background: rgba(15,27,22,.82); color: white; border-radius: 999px; padding: 5px 9px; font-size: 10px; white-space: nowrap; }
.scanner-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.contact-detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.danger-button { width: 100%; margin-top: 8px; min-height: 36px; border: 1px solid #e1c2bd; border-radius: 8px; background: #fff6f4; color: #8a3e36; cursor: pointer; font-size: 11px; }
.danger-button:hover { background: #fbe8e4; }
.secondary-button { min-height: 36px; border: 1px solid #cad6d0; border-radius: 8px; background: #f7faf8; display: grid; place-items: center; color: #3e5f51; cursor: pointer; font-size: 11px; }
.file-picker input { display: none; }
.toast-region { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: grid; gap: 8px; }
.toast { background: #1c2e26; color: white; box-shadow: var(--shadow); border-radius: 8px; padding: 11px 14px; font-size: 10px; animation: arrive .2s ease; }
.toast.error { background: #773b37; }

/* Readability pass: the workbench favors inspection over maximum chat area. */
.brand strong { font-size: 16px; }
.brand small { font-size: 11px; }
.topbar-center { font-size: 13px; }
.local-badge { font-size: 12px; }
.section-heading span, .eyebrow { font-size: 11px; }
.section-heading h2 { font-size: 21px; }
.section-copy { font-size: 13px; }
.adjacency-card strong { font-size: 14px; }
.adjacency-card small { font-size: 11px; }
.sidebar-footer b { font-size: 12px; }
.sidebar-footer small, .text-button { font-size: 11px; }
.room-header h1 { font-size: 22px; }
.room-header p { font-size: 13px; }
.room-stats b { font-size: 16px; }
.room-stats small { font-size: 10px; }
.day-divider { font-size: 10px; }
.system-message b { font-size: 13px; }
.system-message p { font-size: 12px; }
.message-head strong { font-size: 13px; }
.message-head time { font-size: 11px; }
.message-body { font-size: 15px; }
.delivery { font-size: 10px; }
.file-card b { font-size: 12px; }
.file-card small { font-size: 11px; }
.composer textarea { font-size: 14px; }
.composer-meta { font-size: 10px; }
.peer-profile h2 { font-size: 15px; }
.peer-profile span:not(.peer-avatar) { font-size: 11px; }
.details-list div { font-size: 11px; }
.details-list dd { font-size: 10px; }
.traffic-grid small, .traffic-grid em, .live-label { font-size: 10px; }
.traffic-grid b { font-size: 15px; }
.route-visual p b, .route-visual p small { font-size: 11px; }
.event-section li, .event-section button { font-size: 10px; }
.disconnect-button { font-size: 12px; }
.dialog-card > p { font-size: 13px; }
.dialog-card label { font-size: 12px; }
.mode-card b { font-size: 12px; }
.mode-card small { font-size: 11px; }
.primary-button { font-size: 13px; }
.toast { font-size: 12px; }

@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 270px minmax(390px, 1fr); }
  .topbar { grid-template-columns: 270px 1fr auto; }
  .inspector { position: fixed; z-index: 20; top: 72px; right: 0; bottom: 0; width: 344px; box-shadow: -15px 0 40px rgba(20,43,33,.12); transform: translateX(102%); transition: transform .2s ease; }
  .inspector.open { transform: translateX(0); }
  .mobile-inspector { display: grid; }
}
@media (max-width: 760px) {
  .app-shell { display: block; padding-top: 60px; }
  .topbar { position: fixed; inset: 0 0 auto; height: 60px; display: flex; justify-content: space-between; }
  .brand { border: 0; padding: 0 14px; }
  .topbar-center, .local-badge { display: none; }
  .top-actions { padding-right: 10px; }
  .sidebar { position: fixed; z-index: 18; inset: 60px auto 0 0; width: 280px; transform: translateX(-102%); transition: transform .2s ease; box-shadow: 15px 0 40px rgba(20,43,33,.12); }
  .conversation { height: calc(100vh - 60px); }
  .room-header { min-height: 78px; padding: 12px 16px; }
  .room-header p { display: none; }
  .room-stats > span { display: none; }
  .messages { padding: 16px; }
  .composer-wrap { padding: 8px 10px 12px; }
  .composer { grid-template-columns: 38px minmax(0,1fr) 42px; }
  .composer-meta { display: none; }
  .inspector { top: 60px; width: min(314px, 90vw); }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
