/* Dispatch USA – Styles */
:root {
  --bg: #0e131a; --panel: #151c26; --panel2: #1b2431; --line: #26324280; --line2: #2a3748;
  --text: #e6edf5; --muted: #8b9bb0; --accent: #3b82f6; --red: #ef4444; --green: #22c55e; --yellow: #f5b83d;
  --fire: #ef4444; --ems: #22c55e; --police: #3b82f6; --traffic: #f59e0b;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow: hidden; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.warn { color: var(--yellow); min-height: 1.2em; margin: 6px 0 0; }
.spacer { flex: 1; }
button, input, select { font: inherit; color: inherit; }
button { background: var(--panel2); border: 1px solid var(--line2); border-radius: 6px; padding: 6px 10px; cursor: pointer; }
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button.danger { background: #3a1517; border-color: #7a2326; color: #ffb4b4; }
input, select { background: #0b1017; border: 1px solid var(--line2); border-radius: 6px; padding: 7px 9px; width: 100%; }
input:focus, select:focus { outline: 1px solid var(--accent); }
a.discord { display: block; text-align: center; background: #5865f2; color: #fff; text-decoration: none; padding: 9px; border-radius: 6px; font-weight: 600; }

.screen { position: fixed; inset: 0; display: flex; flex-direction: column; }
.bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--panel); border-bottom: 1px solid var(--line2); flex-wrap: wrap; }
.logo { font-weight: 800; letter-spacing: .06em; }

/* ---------- Hub ---------- */
#hubmain { padding: 22px; max-width: 1000px; width: 100%; margin: 0 auto; overflow: auto; }
#hubmain h2 { margin: 0 0 4px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-top: 16px; }
.gcard { background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.gcard h3 { margin: 0; font-size: 16px; }
.gcard .meta { color: var(--muted); font-size: 13px; }
.gcard .actions { display: flex; gap: 6px; margin-top: 6px; }
.gcard .actions .primary { flex: 1; }
.gcard.new { border-style: dashed; align-items: center; justify-content: center; min-height: 140px; cursor: pointer; color: var(--muted); font-size: 16px; }
.gcard.new:hover { border-color: var(--accent); color: var(--text); }
.user { position: relative; }
.menu { position: absolute; right: 0; top: 110%; background: var(--panel2); border: 1px solid var(--line2); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 6px; min-width: 200px; z-index: 2000; }

.overlay { position: fixed; inset: 0; background: rgba(5, 8, 12, .8); display: flex; align-items: center; justify-content: center; z-index: 3000; padding: 12px; }
.modal, .authbox { background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; padding: 20px; width: 100%; max-width: 560px; max-height: 94vh; overflow: auto; }
.authbox { max-width: 380px; }
.authbox h1 { margin: 0 0 4px; font-size: 22px; }
.modal h2 { margin: 0 0 10px; }
.modal label { display: block; margin-bottom: 10px; color: var(--muted); }
.modal label input { margin-top: 4px; color: var(--text); }
.label { color: var(--muted); margin-bottom: 6px; }
.citygrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.city { text-align: left; padding: 10px; border-radius: 8px; line-height: 1.25; }
.city b { display: block; }
.city small { color: var(--muted); }
.city.on { border-color: var(--accent); background: #16294a; }
.row { display: flex; gap: 8px; margin-top: 12px; }
.row > button { flex: 1; }
.tabs2 { display: flex; gap: 6px; margin: 12px 0; }
.tabs2 button { flex: 1; }
.tabs2 button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.authbox form { display: flex; flex-direction: column; gap: 8px; }
.or { text-align: center; margin: 12px 0; color: var(--muted); position: relative; }
.or span { background: var(--panel); padding: 0 8px; position: relative; }
.or::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--line2); }

/* ---------- Game ---------- */
#gtop { gap: 8px; }
.gcity { font-weight: 700; }
.stat { background: var(--panel2); border-radius: 6px; padding: 4px 8px; white-space: nowrap; }
.xp { display: inline-block; width: 46px; height: 6px; background: #0b1017; border-radius: 3px; margin-left: 6px; vertical-align: middle; overflow: hidden; }
.xp i { display: block; height: 100%; width: 0; background: var(--yellow); }
.speed { display: flex; gap: 2px; }
.speed button { padding: 4px 8px; }
.speed button.on { background: var(--accent); border-color: var(--accent); }
#gmain { flex: 1; position: relative; min-height: 0; overflow: hidden; }
#mapwrap { position: absolute; inset: 0; min-width: 0; }
#side { display: flex; flex-direction: column; min-height: 0; }
#tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line2); }
#tabs button { flex: 1 1 33%; border: 0; border-radius: 0; background: transparent; padding: 9px 4px; font-size: 13px; border-bottom: 2px solid transparent; }
#tabs button.on { border-bottom-color: var(--accent); background: var(--panel2); }
.badge { background: var(--red); color: #fff; border-radius: 9px; padding: 0 6px; font-size: 11px; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .45; } }
#panel { flex: 1; overflow: auto; padding: 10px; }
#map { position: absolute; inset: 0; background: #0b0f14; }
#map.placing { cursor: crosshair; }
#ringbar { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 1000; background: #1f2a3a; border: 1px solid var(--accent);
  padding: 8px 14px; border-radius: 8px; box-shadow: 0 4px 16px #0008; }

/* panel content */
.panel h4 { margin: 14px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.panel h4:first-child { margin-top: 0; }
.empty { text-align: center; color: var(--muted); padding: 22px 8px; border: 1px dashed var(--line2); border-radius: 8px; }
.item { background: var(--panel2); border: 1px solid var(--line2); border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; }
.item.sel { border-color: var(--accent); }
.item .top { display: flex; align-items: center; gap: 8px; }
.item .top b { flex: 1; }
.item .sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.item .btns { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.item .btns button { padding: 4px 8px; font-size: 12.5px; }
.ring { animation: ringing .5s infinite alternate; border-color: var(--red); }
@keyframes ringing { to { background: #3a1a1d; } }
.filters { display: flex; gap: 6px; margin-bottom: 8px; }
.filters button { flex: 1; padding: 4px; }
.filters button.on { background: var(--accent); border-color: var(--accent); }
.tag { font-size: 11px; padding: 1px 6px; border-radius: 9px; background: #0b1017; border: 1px solid var(--line2); white-space: nowrap; }
.tag.open { color: var(--yellow); border-color: var(--yellow); }
.tag.active { color: var(--green); border-color: var(--green); }
.tag.fire { color: var(--fire); } .tag.ems { color: var(--ems); } .tag.police { color: var(--police); } .tag.traffic { color: var(--traffic); }
.kv { display: grid; grid-template-columns: 90px 1fr; gap: 2px 8px; font-size: 13px; margin: 6px 0; }
.kv span:nth-child(odd) { color: var(--muted); }

/* FMS chips */
.fmsgroup { margin-bottom: 10px; }
.fmsgroup h5 { margin: 0 0 4px; font-size: 12.5px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: flex; align-items: center; gap: 5px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 6px; padding: 3px 7px 3px 3px; font-size: 12.5px; cursor: pointer; }
.chip i { font-style: normal; font-weight: 700; display: inline-block; min-width: 20px; text-align: center; border-radius: 4px; color: #06090d; padding: 0 3px; }
.chip.sel { border-color: var(--accent); }
.s2 i, .s1 i { background: var(--green); } .s3 i { background: var(--yellow); } .s4 i { background: #f97316; }
.s7 i, .s8 i { background: #60a5fa; }
.legend { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* hospitals */
.bar2 { height: 8px; background: #0b1017; border-radius: 4px; overflow: hidden; margin-top: 5px; }
.bar2 i { display: block; height: 100%; background: var(--green); }
.bar2 i.mid { background: var(--yellow); } .bar2 i.hi { background: var(--red); }

/* radio */
#radiolog { height: 300px; overflow: auto; background: #0b1017; border: 1px solid var(--line2); border-radius: 8px; padding: 8px; font-size: 13px; }
#radiolog div { margin-bottom: 4px; }
#radiolog .u { color: #9ec5ff; } #radiolog .me { color: #a7f3d0; } #radiolog .sys { color: var(--muted); } #radiolog .t { color: var(--muted); font-size: 11px; margin-right: 4px; }
.ptt { width: 100%; padding: 12px; margin-top: 8px; font-weight: 700; }
.ptt.live { background: var(--red); border-color: var(--red); color: #fff; }
.radioin { display: flex; gap: 6px; margin-top: 8px; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 8px; }

/* 911 call panel */
#callpanel { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
#callpanel > :not(.wh) { margin-left: 10px; margin-right: 10px; }
#callpanel > .cp-create { margin-bottom: 10px; overflow: auto; flex: 1; min-height: 120px; }
.cp-head { display: flex; align-items: center; gap: 8px; }
.cp-head b { flex: 1; }
#callpanel { gap: 8px; }
.cp-info { background: var(--panel2); border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.cp-log { background: #0b1017; border: 1px solid var(--line2); border-radius: 8px; padding: 8px; min-height: 150px; max-height: 230px; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.bub { max-width: 88%; padding: 6px 9px; border-radius: 10px; font-size: 13.5px; }
.bub.caller { background: #243349; align-self: flex-start; border-bottom-left-radius: 2px; }
.bub.me { background: #14532d; align-self: flex-end; border-bottom-right-radius: 2px; }
.bub.sys { background: transparent; color: var(--muted); align-self: center; font-size: 12px; }
.cp-quick { display: flex; flex-wrap: wrap; gap: 4px; }
.cp-quick button { padding: 3px 8px; font-size: 12.5px; border-radius: 12px; }
.cp-input { display: flex; gap: 6px; }
.cp-input button { white-space: nowrap; }
#cpMic.live { background: var(--red); border-color: var(--red); }
.cp-create { border-top: 1px solid var(--line2); padding-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.cp-title { font-weight: 700; }
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cats button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; font-size: 12px; }
.cats button span { font-size: 20px; }
.cats button.on { background: #16294a; border-color: var(--accent); }
.row2 { display: grid; grid-template-columns: 90px 1fr; gap: 8px; }
.row2 label { color: var(--muted); font-size: 12px; }
.cp-create .row { margin-top: 0; }

/* map markers */
.mk { display: flex; align-items: center; justify-content: center; font-size: 18px; width: 30px; height: 30px; border-radius: 50%;
  background: #0e131add; border: 2px solid var(--line2); box-shadow: 0 2px 6px #000a; }
.mk.fire { border-color: var(--fire); } .mk.ems { border-color: var(--ems); } .mk.police { border-color: var(--police); } .mk.traffic { border-color: var(--traffic); }
.mk.open { animation: pulse 1s infinite; }
.mk.sel { box-shadow: 0 0 0 3px #fff8, 0 2px 6px #000a; }
.mk.st { border-radius: 8px; font-size: 16px; }
.mk.hosp { border-radius: 8px; border-color: #e5e7eb; font-size: 15px; }
.mk.call { border-color: var(--yellow); animation: pulse .8s infinite; }
.mklabel { position: absolute; top: 31px; left: 50%; transform: translateX(-50%); font-size: 10.5px; white-space: nowrap; color: #dbe6f3;
  text-shadow: 0 0 3px #000, 0 0 3px #000; pointer-events: none; }
.vl { position: relative; display: flex; flex-direction: column; align-items: center; transform: translate(-50%, -50%); }
.vl .vi { font-size: 20px; filter: drop-shadow(0 1px 2px #000); }
.vl .vn { font-size: 10.5px; font-weight: 700; padding: 0 4px; border-radius: 4px; background: #0e131acc; border: 1px solid var(--line2); color: #fff; white-space: nowrap; }
.vl.d3 { transform: translate(-50%, -150%); }
.vl.d3 .vi { display: none; }
.vl.s3 .vn { border-color: var(--yellow); } .vl.s4 .vn { border-color: #f97316; } .vl.s7 .vn { border-color: #60a5fa; }
.vl.sel .vn { background: var(--accent); }
.dlabel { font-size: 12px; font-weight: 700; text-align: center; white-space: nowrap; color: #cfe0f5; text-shadow: 0 0 4px #000, 0 0 4px #000; pointer-events: none; transform: translate(-50%, -50%); }
.dlabel.locked { color: #8b9bb0; font-weight: 500; }
.leaflet-container { background: #0b0f14; font: inherit; }
.divreset { background: none !important; border: 0 !important; }
canvas.v3d { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 450; }

#toasts { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 5000; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
.toast { background: #1c2736; border: 1px solid var(--line2); padding: 8px 14px; border-radius: 8px; box-shadow: 0 4px 14px #000a; max-width: 90vw; }
.toast.warn { border-color: var(--yellow); } .toast.good { border-color: var(--green); } .toast.bad { border-color: var(--red); }


/* ---------- Modern look ---------- */
:root { --glass: rgba(18, 25, 36, .82); --radius: 14px; }
body { background: radial-gradient(1200px 600px at 20% -10%, #17233a 0%, var(--bg) 60%); }
.glass { background: var(--glass); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid #ffffff14; box-shadow: 0 10px 30px #0006; }
.bar { background: var(--glass); backdrop-filter: blur(12px); border-bottom: 1px solid #ffffff12; }
.logo b { color: var(--accent); }
button { transition: border-color .15s, background .15s, transform .05s; }
button:active:not(:disabled) { transform: translateY(1px); }
button.primary { background: linear-gradient(180deg, #4b8df8, #2f6fe0); box-shadow: 0 4px 14px #2f6fe055; }
.stat { background: #ffffff0d; border: 1px solid #ffffff10; }

/* floating windows */
.win { position: absolute; z-index: 1100; background: var(--glass); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid #ffffff1c; border-radius: var(--radius); box-shadow: 0 18px 50px #000a; overflow: hidden; resize: both; min-width: 280px; min-height: 120px; max-width: 96vw; max-height: 96%; }
#side { left: 12px; top: 12px; width: 390px; height: calc(100% - 24px); }
#callpanel { right: 12px; top: 12px; width: 380px; height: min(740px, calc(100% - 24px)); z-index: 1300; }
.win.top { z-index: 1400; }
.win.collapsed { height: auto !important; min-height: 0; resize: none; }
.win.collapsed > :not(.wh) { display: none !important; }
.wh { display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: grab; user-select: none; touch-action: none;
  background: linear-gradient(180deg, #ffffff12, #ffffff05); border-bottom: 1px solid #ffffff12; font-weight: 700; font-size: 13px; flex: none; }
.wh span, .wh b { flex: 1; }
.wh:active { cursor: grabbing; }
.wh button { padding: 1px 8px; }
#tabs { flex: none; }
#tabs button.on { background: #ffffff10; }
#side #panel, #callpanel .cp-log { scrollbar-width: thin; }
#settingsPop { position: fixed; right: 14px; top: 54px; z-index: 4000; gap: 10px; min-width: 250px; }
#settingsPop label { color: var(--muted); font-size: 12.5px; display: flex; flex-direction: column; gap: 4px; }
#settingsPop label.chk { flex-direction: row; align-items: center; color: var(--text); }
#settingsPop label.chk input { width: auto; }
.tiles-dark .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.55); }
.leaflet-control-zoom a { background: var(--glass) !important; color: #fff !important; border-color: #ffffff22 !important; }
.leaflet-control-attribution { background: #0009 !important; color: #9fb0c6 !important; }
.leaflet-control-attribution a { color: #9fb7da !important; }
.dlabel.faint { color: #c9d6e8; opacity: .55; font-weight: 600; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; }
.bub small { display: block; opacity: .7; margin-top: 2px; font-size: 11.5px; }

/* ---------- Hub ---------- */
#hub { overflow: auto; }
#hubmain { padding: 22px; max-width: 1180px; width: 100%; margin: 0 auto; overflow: visible; }
.userchip { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 22px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 17px;
  background: #3b82f6; overflow: hidden; flex: none; color: #fff; font-weight: 700; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.big { width: 96px; height: 96px; font-size: 52px; margin: 6px 0 10px; border: 3px solid #ffffff30; }
.avatar.mid { width: 84px; height: 84px; font-size: 44px; border: 3px solid #ffffff40; }
.avatar.sm { width: 26px; height: 26px; font-size: 14px; }
.hero { border-radius: 18px; padding: 22px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-bottom: 20px;
  background-image: var(--herobg, none); background-size: cover; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #0b111aee, #0b111a88); }
.hero > * { position: relative; }
.hero h1 { margin: 0; font-size: 26px; }
.hero .bio { color: #cdd8e6; margin: 2px 0 8px; }
.hero .stats { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .pill { background: #ffffff14; border: 1px solid #ffffff1c; border-radius: 20px; padding: 3px 12px; font-size: 13px; }
.hero .heroinfo { flex: 1; min-width: 220px; }
.hubgrid { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
.hubgrid h2 { margin: 0 0 10px; }
.sidecol { display: flex; flex-direction: column; gap: 16px; }
.box { border-radius: var(--radius); padding: 14px; }
.box h3 { margin: 0 0 10px; font-size: 15px; }
.frow, .lbrow { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 13.5px; }
.frow b, .lbrow b { flex: 1; font-weight: 600; }
.frow small, .lbrow small { color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #4b5565; display: inline-block; }
.dot.on { background: var(--green); box-shadow: 0 0 6px var(--green); }
.frow button { padding: 2px 8px; font-size: 12px; }
.lbrow.me { color: var(--yellow); }
.inline { display: flex; gap: 6px; margin-top: 8px; }
.tipitem { font-size: 13.5px; padding: 6px 0; color: #cdd8e6; border-bottom: 1px solid #ffffff0d; }
.tipitem:last-child { border: 0; }
.gcard { border-radius: var(--radius); background: var(--glass); border: 1px solid #ffffff14; overflow: hidden; padding: 0; gap: 0; transition: transform .15s, border-color .15s; }
.gcard:hover { transform: translateY(-2px); border-color: #3b82f688; }
.gcard .cover { height: 74px; background: linear-gradient(135deg, #1d3a66, #12202f); display: flex; align-items: flex-end; padding: 8px 12px; font-size: 30px; }
.gcard .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.gcard.new { min-height: 190px; border: 2px dashed #ffffff22; background: transparent; }
.cv-los-angeles { background: linear-gradient(135deg, #f59e0b55, #7c3aed55), #12202f; } .cv-new-york { background: linear-gradient(135deg, #3b82f655, #0f172a), #12202f; }
.cv-chicago { background: linear-gradient(135deg, #0ea5e955, #1e293b), #12202f; } .cv-houston { background: linear-gradient(135deg, #ef444455, #1e293b), #12202f; }
.cv-miami { background: linear-gradient(135deg, #ec489955, #06b6d455), #12202f; } .cv-seattle { background: linear-gradient(135deg, #22c55e55, #0f172a), #12202f; }
.modal.wide { max-width: 760px; }
.pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.emojis { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.emojis button { width: 36px; height: 36px; padding: 0; font-size: 19px; }
.emojis button.on { border-color: var(--accent); background: #16294a; }
.row2c { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.row2c input[type=color] { width: 44px; height: 30px; padding: 0; border: 0; background: none; }
.inl { margin: 0 !important; display: flex; align-items: center; gap: 6px; }
.filebtn { border: 1px solid var(--line2); border-radius: 6px; padding: 5px 10px; cursor: pointer; background: var(--panel2); margin: 0 !important; }
.bgs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.bgs button { height: 42px; padding: 0; border-radius: 8px; }
.bgs button.on { outline: 2px solid #fff; }
.pgrid input { margin-bottom: 8px; }
.pgrid label { margin-bottom: 8px; }
#pfPwBtn { width: 100%; }

/* Hub backgrounds */
.bg-night { background: radial-gradient(900px 500px at 15% -10%, #1d2f55, #0e131a 65%); }
.bg-sunset { background: linear-gradient(160deg, #3b1d4a, #7c2d4a 55%, #c2562f); }
.bg-ocean { background: linear-gradient(160deg, #06243f, #0b4a6e 60%, #0f7a8a); }
.bg-forest { background: linear-gradient(160deg, #0b2418, #14532d 60%, #2d6a3e); }
.bg-crimson { background: linear-gradient(160deg, #1d0c10, #5b1220 60%, #8a1c2b); }
.bg-violet { background: linear-gradient(160deg, #150f2e, #3b2a7a 60%, #5b3fb5); }
.bg-steel { background: linear-gradient(160deg, #11161d, #2a3441 60%, #44546a); }
.bg-gold { background: linear-gradient(160deg, #1f1708, #5b4410 60%, #a37a1c); }

/* ---------- Mobile ---------- */
@media (max-width: 900px) { .hubgrid { grid-template-columns: 1fr; } .pgrid { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  #gmain { display: flex; flex-direction: column-reverse; }
  #mapwrap { position: relative; flex: 1; inset: auto; }
  .win { position: relative; resize: none; left: auto !important; top: auto !important; width: 100% !important; max-width: none; border-radius: 0; }
  #side { height: 46% !important; flex: none; }
  #callpanel { position: fixed; inset: 40px 0 0 0 !important; width: auto !important; height: auto !important; z-index: 2500; }
  .wh { cursor: default; }
  #tabs button { font-size: 12px; padding: 7px 2px; }
  .stat { padding: 3px 6px; }
}
