/* r48: responsive player cards and dedicated, non-overlapping traffic lanes. */
html,body { overflow:auto; min-height:100%; height:auto; }
.app { min-height:100dvh; height:auto; }
.network-workspace { display:grid; grid-template-columns:minmax(0,1fr) 330px; gap:24px; padding:28px; max-width:1440px; width:100%; margin:auto; align-items:start; overflow:visible; }
.connection-graph { min-width:0; background:#111922; border:1px solid #2a3948; border-radius:18px; overflow:hidden; }
.graph-heading { display:flex; justify-content:space-between; gap:16px; padding:26px 24px 20px; }
.graph-eyebrow { color:#80a3bd; display:block; font-size:11px; letter-spacing:.14em; margin-bottom:10px; }
.graph-heading h1 { color:#eff6fc; font-size:26px; line-height:1.4; }
.graph-heading p { color:#9dafbf; font-size:13px; line-height:1.8; margin-top:8px; }
.graph-live { white-space:nowrap; align-self:start; border:1px solid #445262; border-radius:20px; padding:7px 10px; font-size:11px; color:#a5b4c3; }
.graph-live.live { color:#72e6ae; background:#183528; border-color:#35684e; }
.graph-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1px; background:#2a3948; border-block:1px solid #2a3948; }
.graph-summary>span { padding:15px 18px; background:#15202b; color:#94a8bb; font-size:11px; }
.graph-summary b { display:block; color:#edf6ff; font-size:23px; line-height:1.4; font-variant-numeric:tabular-nums; }
.graph-saving b { color:#72e6ae; }
.graph-controls { display:flex; gap:8px; padding:20px 20px 12px; flex-wrap:wrap; }
.graph-search { flex:1; min-width:120px; }
.graph-search input { width:100%; padding:11px; color:#e0eef8; background:#0d141c; border:1px solid #34485a; border-radius:8px; }
.graph-controls button,.graph-pagination button { min-height:40px; padding:8px 12px; background:#1a2b3a; border:1px solid #3c5266; color:#d9e9f6; border-radius:8px; cursor:pointer; }
.graph-controls button[aria-pressed=true] { background:#254b63; border-color:#74c7ff; }
.graph-stage { position:relative; margin:4px 20px 16px; min-height:230px; }
#graphLinks { display:none; }
.graph-nodes { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.graph-node { position:relative; transform:none; min-width:0; width:100%; min-height:190px; display:flex; flex-direction:column; align-items:center; gap:7px; padding:18px 10px; background:#192633; border:1px solid #344758; border-radius:12px; color:#e7f1f8; cursor:pointer; }
.graph-node:hover { background:#213345; border-color:#7499b7; }
.graph-node.selected { border:2px solid #6dc6ff; background:#20384c; padding:17px 9px; }
.graph-node:focus-visible,.graph-controls button:focus-visible,.graph-pagination button:focus-visible { outline:3px solid #99dcff; outline-offset:3px; }
.graph-avatar { width:48px; height:48px; padding:4px; background:#0d1823; border:1px solid #57768d; border-radius:9px; }
.graph-avatar img { width:100%; height:100%; image-rendering:pixelated; }
.graph-node-name { font-size:13px; font-weight:600; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.graph-node-mode { font-size:11px; color:#90a9bd; }
.graph-node-transport { font-size:10px; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; border-radius:20px; padding:4px 7px; background:#101c26; color:#a4cdef; }
.graph-node-transport.status-p2p { color:#f5cd6a; background:#3d331e; }
.graph-node-transport.status-direct { color:#d8c5ff; background:#30264a; }
.graph-cache-wrap { width:100%; display:flex; flex-direction:column; gap:5px; }
.graph-cache-wrap[hidden] { display:none; }
.graph-cache-bar { height:9px; display:flex; width:100%; gap:1px; overflow:hidden; border-radius:3px; background:#080f16; }
.graph-cache-text { color:#b3c5d4; width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:9px; }
.graph-cache-seg { flex:1; min-width:0; display:block; background:#283744; }
.cache-hit { background:#52d99c; }.cache-p2p { background:#f1c85b; }.cache-direct { background:#a78bfa; }.cache-server { background:#55aaff; }.cache-empty { background:#283744; }
.graph-empty { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; flex-direction:column; gap:12px; padding:24px; background:#111922; text-align:center; color:#a2b6c6; }
.graph-empty img { width:36px; height:36px; }.graph-empty small { line-height:1.8; }
.graph-bottom { display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; align-items:center; padding:0 20px 12px; }
.graph-legend { display:flex; flex-wrap:wrap; gap:12px; font-size:10px; color:#91a8ba; }
.graph-pagination { display:flex; align-items:center; gap:12px; font-size:12px; }.graph-pagination button:disabled { opacity:.35; }
.graph-note { padding:0 20px 18px; color:#8ea6ba; font-size:11px; line-height:1.8; }
.graph-selection { background:#0d1721; padding:22px 24px; border-top:1px solid #324658; color:#a4b9ca; font-size:12px; line-height:1.9; overflow-wrap:anywhere; }
.graph-selection>strong { display:block; color:#eef7ff; font-size:19px; margin-bottom:8px; }.graph-selection>small { display:block; color:#93acbf; }
.graph-selection h3 { font-size:14px; color:#e6f0f8; margin:22px 0 9px; }
.detail-timeline { display:flex; position:relative; height:24px; gap:2px; margin-top:14px; }
.detail-playhead { position:absolute; top:-5px; bottom:-5px; width:2px; background:white; box-shadow:0 0 0 1px #000; }
.detail-scale { display:flex; justify-content:space-between; font-size:11px; color:#91a7b9; padding-top:5px; }
.detail-legend { font-size:10px; color:#afc4d4; }
.detail-route { display:grid; grid-template-columns:minmax(0,1fr) minmax(75px,1.1fr) minmax(0,1fr); align-items:center; gap:12px; padding:12px 0; border-bottom:1px solid #243745; }
.detail-route>span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.detail-route>span:last-child { text-align:right; }
.route-line { position:relative; text-align:center; padding-bottom:5px; border-bottom:2px solid #55aaff; color:#86c4ff; font-size:11px; }
.route-line:after { content:''; position:absolute; right:0; bottom:-4px; border-left:5px solid #55aaff; border-top:3px solid transparent; border-bottom:3px solid transparent; }
.peer .route-line { border-color:#f1c85b; color:#f1c85b; }.peer .route-line:after { border-left-color:#f1c85b; }
.connection-graph.stale .graph-node { opacity:.65; }
@media(max-width:1000px) { .network-workspace { grid-template-columns:minmax(0,1fr) 280px; gap:14px; padding:16px; }.graph-nodes { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:760px) { .network-workspace { display:flex; flex-direction:column; padding:12px; overflow:visible; }.connection-graph,.media-rail { width:100%; }.graph-heading { padding:20px 16px; }.graph-heading h1 { font-size:21px; }.graph-heading p { font-size:12px; }.graph-summary>span { padding:12px; }.graph-summary b { font-size:19px; }.graph-controls { padding:16px 12px 12px; }.graph-stage { margin:0 12px 14px; }.graph-selection { padding:18px 16px; }.graph-node { min-height:184px; }.app-header { flex-wrap:wrap; gap:8px; }.media-rail-scroll { overflow:visible; } }
@media(prefers-reduced-motion:reduce) { * { scroll-behavior:auto!important; } }
.media-rail { display:flex; flex-direction:column; min-width:0; min-height:0; border:1px solid #2b333d; border-radius:10px; background:#10151b; overflow:hidden; }
.media-rail-heading { display:flex; justify-content:space-between; gap:10px; align-items:center; padding:22px 18px 6px; }
.media-rail-heading h2 { font-size:17px; color:#e0e8ef; font-weight:600; }.media-mode { color:#aac4da; border:1px solid #364b5c; background:#1a2834; padding:5px 7px; border-radius:4px; font-size:9px; white-space:nowrap; }
.media-rail-note { padding:4px 18px 17px; color:#8696a5; font-size:10px; line-height:1.6; border-bottom:1px solid #27313b; }
.media-rail-scroll { overflow:auto; min-height:0; flex:1; padding:16px 14px; }
.media-rail .screen-card { background:#171f29; border:1px solid #34414f; border-radius:7px; box-shadow:none; padding:13px 12px; }
.media-rail .card-title { font-size:12px; }.media-rail .card-badge { font-size:9px; padding:3px 6px; }.media-rail .card-head { gap:6px; }
.media-rail .card-meta { flex-wrap:wrap; font-size:10px; }.media-rail .card-title,.media-rail .card-sub,.media-rail .card-time { min-width:0; }
.media-rail .empty-state { padding:28px 12px; }.media-rail .empty-state .empty-icon { width:34px; height:34px; }.media-rail .empty-state p { font-size:12px; line-height:1.7; }.media-rail .empty-state small { font-size:10px; line-height:1.8; }
.media-rail .box-section { margin-top:20px; }.media-rail .section-title { font-size:12px; margin-bottom:12px; }
.media-tools { display:flex; gap:9px; padding:14px; border-top:1px solid #2b333d; }
.media-tools .fab-upload { position:static; flex:1; padding:9px 6px; display:flex; justify-content:center; align-items:center; gap:7px; min-width:0; width:auto; min-height:42px; border-radius:5px; font-size:10px; border:1px solid #3c4b5a; background:#1d2834; box-shadow:none; transform:none; }
.media-tools .fab-upload .fab-text { display:inline; }.media-tools .fab-icon { width:21px; height:21px; }
.addon-details { margin-top:22px; border-top:1px solid #2b3641; padding-top:15px; }.addon-details summary { cursor:pointer; color:#9fb5c7; font-size:11px; }
.media-rail .addon-strip { display:block; padding:12px 0 0; border:0; background:transparent; }.media-rail .addon-strip b { font-size:11px; }.media-rail .addon-strip small { font-size:10px; line-height:1.7; }
.media-rail .addon-universal-download { display:block; margin:12px 0; }.media-rail .addon-universal-download a { display:inline-block; margin-bottom:6px; font-size:11px; color:#b9d4eb; border-color:#46627b; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

#graphDetailsDialog { margin:auto; width:min(640px,calc(100vw - 24px)); max-height:85dvh; overflow:auto; padding:0; border:1px solid #55758c; border-radius:16px; background:#0d1721; color:#d7eaf7; box-shadow:0 24px 100px #0009; }
#graphDetailsDialog::backdrop { background:#02070dbb; backdrop-filter:blur(4px); }
#graphDetailsClose { display:block; margin:12px 14px 0 auto; min-height:40px; padding:8px 14px; border:1px solid #456176; border-radius:8px; color:#d7eaf7; background:#1a2d3c; cursor:pointer; }
#graphDetailsDialog .graph-selection { border:0; }

/* r49: keep player cards in flow and use one document scrollbar on every device. */
html { overflow-x:clip; overflow-y:auto; }
body { overflow:visible; }
.app-main.network-workspace { flex:1 0 auto; min-width:0; overflow:visible; }
.graph-stage { height:auto; overflow:visible; }
.graph-nodes { position:relative; inset:auto; width:100%; height:auto; }
.graph-node { position:relative; inset:auto; transform:none; height:auto; }
.graph-avatar { display:block; flex:0 0 48px; max-width:100%; }
.graph-avatar img { display:block; object-fit:contain; }
.graph-heading>div { min-width:0; }
.graph-summary b { overflow-wrap:anywhere; }
.media-rail-scroll { flex:1 0 auto; overflow:visible; }
.media-rail .addon-details>.addon-strip { display:block!important; min-width:0; }
.media-rail .addon-universal-download a { max-width:100%; overflow-wrap:anywhere; }
@media(max-width:760px) {
  .network-workspace>.connection-graph,.network-workspace>.media-rail { flex:0 0 auto; min-width:0; }
  .graph-heading { flex-wrap:wrap; }
  .app-header { padding-block:10px; }
}
@media(max-width:360px) { .graph-nodes { grid-template-columns:minmax(0,1fr); } }

/* r50: independent compressed video/audio cache tracks. */
.graph-cache-label { display:block;font-size:10px;color:#d6e5f2;text-align:left;font-variant-numeric:tabular-nums; }
.graph-cache-text { white-space:normal;text-align:left;line-height:1.35;overflow-wrap:anywhere; }
.graph-cache-audio { margin-top:3px; }
.graph-cache-cell { flex:1;min-width:0;height:100%;display:block;background:#283744;overflow:hidden; }
.graph-cache-cell>.graph-cache-seg { height:100%;display:block;min-width:0;flex:none; }
.graph-cache-fill { height:100%;display:flex;min-width:0;overflow:hidden; }
.graph-cache-fill>.graph-cache-seg { height:100%;display:block;min-width:1px;flex-basis:0; }
.cache-unknown { background:#92a3b3; }.cache-stale { opacity:.55; }
.graph-sync-status { font-size:10px;color:#c7d8e8;line-height:1.5;text-align:center; }
.graph-sync-status[hidden] { display:none; }
.graph-node { min-height:260px; }.graph-node.server { justify-content:center; }
.server-playhead { background:#ffbc66;width:2px;border-left:1px dashed #241300;z-index:2; }
.client-playhead { z-index:3; }
.diagnostic-grid { display:grid;grid-template-columns:minmax(110px,1fr) minmax(0,1.3fr);gap:5px 14px;margin:16px 0;font-variant-numeric:tabular-nums; }
.diagnostic-grid dt { color:#8ea9be; }.diagnostic-grid dd { margin:0;color:#dce9f4;overflow-wrap:anywhere; }
.media-diagnostic { border-bottom:1px solid #344758;padding-bottom:16px; }.diagnostic-status { color:#f3ce88; }
@media(max-width:430px){.diagnostic-grid { grid-template-columns:1fr;gap:2px; }.diagnostic-grid dd { margin-bottom:9px; }.graph-node { padding:13px 8px; }}
