:root {
    color-scheme: dark;
    --bg: #060712;
    --bg-deep: #03040a;
    --panel: rgba(12, 10, 31, 0.88);
    --panel-strong: rgba(10, 8, 27, 0.96);
    --line: rgba(175, 147, 255, 0.18);
    --line-strong: rgba(181, 99, 255, 0.42);
    --text: #f7f5ff;
    --muted: #aaaaca;
    --muted-2: #81839d;
    --violet: #bb42ff;
    --magenta: #ff007f;
    --cyan: #00f3ff;
    --gold: #ffb800;
    --green: #39ff14;
    --red: #ff627c;
    --shell: 1840px;
    --radius: 18px;
    --radius-lg: 26px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg-deep); overflow-x: clip; }
body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    overflow-x: clip;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 8%, rgba(255, 148, 0, .1), transparent 34rem),
        radial-gradient(circle at 88% 22%, rgba(187, 66, 255, .12), transparent 36rem),
        var(--bg);
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
button, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }

.ambient-layer { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ambient-orb { position: absolute; width: 34rem; height: 34rem; border-radius: 50%; filter: blur(80px); opacity: .18; }
.ambient-orb-one { top: -12rem; left: -10rem; background: #ff9400; }
.ambient-orb-two { right: -12rem; top: 22%; background: #39ff14; opacity: .1; }
.ambient-grid { position: absolute; inset: 0; opacity: .16; background-image: linear-gradient(rgba(99, 76, 184, .12) 1px, transparent 1px), linear-gradient(90deg, rgba(99, 76, 184, .12) 1px, transparent 1px); background-size: 64px 64px; mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 75%); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: 76px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    background: rgba(4, 5, 13, .9);
    backdrop-filter: blur(18px) saturate(140%);
    box-shadow: 0 14px 36px rgba(0,0,0,.2);
}
.header-shell {
    width: min(calc(100% - 48px), 1760px);
    min-height: 76px;
    margin-inline: auto;
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
}
.site-brand { width: 84px; display: inline-flex; align-items: center; }
.site-brand img { width: 70px; height: 70px; object-fit: contain; }
.site-nav { display: flex; align-items: center; justify-content: center; gap: 8px; }
.site-nav a {
    min-height: 42px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    border-radius: 10px;
    color: #c8c8d7;
    font-size: .88rem;
    font-weight: 800;
    transition: color .2s ease, background .2s ease, box-shadow .2s ease;
}
.site-nav a:hover, .site-nav a:focus-visible { color: #fff; background: rgba(190,95,255,.12); box-shadow: inset 0 0 0 1px rgba(194,107,255,.22), 0 0 24px rgba(167,72,255,.12); }
.site-nav .nav-cyan { color: #5de6ff; }
.site-nav .nav-pink { color: #ff78c9; }
.site-nav .nav-gold { color: #ffd16d; }
.site-nav .nav-violet { color: #dd9cff; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.header-link { color: #ece8ff; font-size: .88rem; font-weight: 800; }
.discord-button, .refresh-button {
    min-height: 40px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(117, 190, 255, .74);
    border-radius: 9px;
    background: linear-gradient(135deg, rgba(157,75,255,.2), rgba(35,184,255,.14));
    color: #fff;
    font-size: .84rem;
    font-weight: 900;
    box-shadow: 0 0 18px rgba(119,72,255,.25), inset 0 0 18px rgba(255,255,255,.04);
}

.traffic-hero { position: relative; overflow: hidden; border-bottom: 1px solid rgba(128, 97, 218, .2); }
.traffic-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,5,30,.92), rgba(21,7,39,.56), rgba(5,9,24,.78)); }
.traffic-hero::after { content: ""; position: absolute; right: 6%; top: -55%; width: 480px; height: 480px; border: 1px solid rgba(58,216,255,.13); border-radius: 50%; box-shadow: 0 0 0 46px rgba(173,92,255,.025), 0 0 0 94px rgba(255,62,181,.02); }
.traffic-hero-inner {
    position: relative;
    z-index: 1;
    width: min(calc(100% - 64px), var(--shell));
    min-height: 250px;
    margin-inline: auto;
    padding: 42px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
}
.eyebrow { margin: 0 0 10px; color: var(--cyan); font-size: .72rem; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow span { display: inline-block; width: 28px; height: 1px; margin-right: 10px; vertical-align: middle; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.eyebrow.compact { margin-bottom: 3px; }
.traffic-hero h1 { margin: 0; color: #fff; font-size: clamp(3rem, 5.3vw, 6.25rem); line-height: .92; letter-spacing: -.055em; }
.traffic-hero h1 em { font-style: normal; background: linear-gradient(90deg, #ff6f79, #ff3eb5 38%, #ab68ff 68%, #4edcff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-copy { max-width: 760px; margin: 22px 0 0; color: #d2cfea; font-size: 1.06rem; }
.hero-status-wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.connection-state {
    min-height: 44px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: #ffd47b;
    background: rgba(10, 7, 31, .78);
    font-weight: 800;
    font-size: .85rem;
    box-shadow: 0 0 24px rgba(161,83,255,.14);
}
.connection-state.connected { color: var(--green); }
.connection-state.error { color: var(--red); }
.connection-state.reconnecting { color: var(--gold); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 12px currentColor; }
.refresh-button { background: linear-gradient(135deg, rgba(169,82,255,.8), rgba(255,46,173,.76)); border-color: rgba(255,255,255,.18); }

.dashboard-shell { width: min(calc(100% - 48px), var(--shell)); margin-inline: auto; padding: 30px 0 38px; }
.dashboard { display: grid; grid-template-columns: minmax(0, 1fr) 430px; gap: 22px; align-items: stretch; }
.glass-panel, .metric-card {
    border: 1px solid rgba(154, 87, 255, .34);
    background: linear-gradient(145deg, rgba(15, 10, 39, .92), rgba(8, 8, 27, .9));
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.025);
}
.map-panel { position: relative; min-width: 0; height: min(760px, calc(100vh - 112px)); min-height: 600px; overflow: hidden; border-radius: 22px; transition: box-shadow .3s ease, border-color .3s ease; }
.map-panel.neon-mode { border-color: rgba(66, 219, 255, .48); box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.04), inset 0 0 70px rgba(51,41,151,.16), 0 0 44px rgba(38,205,255,.08); }
.map-panel::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; background: repeating-linear-gradient(180deg, rgba(69,224,255,.045) 0, rgba(69,224,255,.045) 1px, transparent 1px, transparent 5px); mix-blend-mode: screen; transition: opacity .3s ease; }
.map-panel.neon-mode::before { opacity: .42; }
#cesiumContainer { position: absolute; inset: 0; overscroll-behavior: contain; touch-action: none; }
.cesium-viewer, .cesium-viewer-cesiumWidgetContainer, .cesium-widget, .cesium-widget canvas { width: 100%; height: 100%; }
.cesium-viewer-bottom, .cesium-viewer-toolbar { display: none !important; }
.map-vignette { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(6,4,20,.72), transparent 25%), radial-gradient(circle at 50% 44%, transparent 44%, rgba(5,3,18,.62) 100%), linear-gradient(90deg, rgba(11,4,30,.28), transparent 22%, transparent 78%, rgba(5,4,18,.3)); }
.map-heading { width: min(470px, calc(100% - 40px)); position: absolute; z-index: 2; top: 24px; left: 24px; pointer-events: none; }
.map-heading h2 { margin: 0 0 9px; color: #fff; font-size: clamp(1.8rem, 3vw, 2.7rem); letter-spacing: -.035em; }
.map-heading > p:last-child { max-width: 420px; margin: 0; color: #b8b5d0; line-height: 1.55; }
.map-controls { position: absolute; z-index: 3; top: 22px; right: 22px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; max-width: 55%; }
.map-controls button, .text-button {
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid rgba(171,119,255,.3);
    border-radius: 10px;
    background: rgba(9, 7, 29, .86);
    color: #d6d2eb;
    font-size: .76rem;
    font-weight: 800;
    backdrop-filter: blur(14px);
    transition: .2s ease;
}
.map-controls button:hover, .map-controls button.active, .text-button:hover { color: #fff; border-color: rgba(57,217,255,.55); box-shadow: 0 0 18px rgba(57,217,255,.13); }
.legend-panel { width: min(330px, calc(100% - 40px)); max-height: 280px; position: absolute; z-index: 3; left: 22px; bottom: 22px; padding: 16px; overflow: auto; border: 1px solid rgba(171,119,255,.34); border-radius: 17px; background: rgba(9,7,29,.9); backdrop-filter: blur(18px); box-shadow: 0 18px 55px rgba(0,0,0,.34); }
.panel-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.panel-title-row h2, .panel-title-row h3 { margin: 0; color: #fff; letter-spacing: -.025em; }
.panel-title-row h2 { font-size: 1.55rem; }
.panel-title-row h3 { font-size: 1.05rem; }
.text-button { min-height: 32px; color: var(--cyan); }
.site-legend { margin-top: 13px; display: grid; gap: 6px; }
.legend-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 38px; align-items: stretch; gap: 5px; }
.legend-item { width: 100%; min-height: 41px; padding: 9px 10px; display: grid; grid-template-columns: 12px minmax(0,1fr) auto auto; align-items: center; gap: 10px; border: 1px solid transparent; border-radius: 10px; color: var(--text); background: transparent; text-align: left; }
.legend-item:hover, .legend-item.active { border-color: rgba(159,106,255,.25); background: rgba(159,106,255,.08); }
.legend-link { display: grid; place-items: center; border: 1px solid transparent; border-radius: 10px; color: #87eaff; background: rgba(57,217,255,.045); font-size: 1rem; font-weight: 900; text-decoration: none; }
.legend-link:hover, .legend-link:focus-visible { border-color: rgba(57,217,255,.4); color: #fff; background: rgba(57,217,255,.13); box-shadow: 0 0 16px rgba(57,217,255,.12); }
.legend-color { width: 10px; height: 10px; border-radius: 50%; background: var(--site-color); box-shadow: 0 0 12px var(--site-color); }
.legend-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .84rem; font-weight: 700; }
.legend-count { color: #9b98b6; font-size: .78rem; font-variant-numeric: tabular-nums; }
.map-empty { width: min(430px, calc(100% - 32px)); position: absolute; z-index: 2; top: 50%; left: 50%; transform: translate(-50%,-50%); display: none; gap: 6px; padding: 22px; border: 1px solid rgba(171,119,255,.34); border-radius: 16px; background: rgba(8,6,25,.86); text-align: center; backdrop-filter: blur(14px); }
.map-empty.visible { display: grid; }
.map-empty span { color: var(--muted); }

.sidebar { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.metric-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.metric-card { min-height: 152px; padding: 18px; position: relative; overflow: hidden; border-radius: 16px; }
.metric-card::after { content: ""; position: absolute; width: 130px; height: 130px; right: -55px; bottom: -65px; border-radius: 50%; background: var(--accent, var(--cyan)); opacity: .07; filter: blur(10px); }
.metric-card p { margin: 0 0 12px; color: #c5c1dc; font-size: .76rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.metric-card strong { display: block; margin-bottom: 8px; color: var(--accent, var(--cyan)); font-size: clamp(2rem, 4vw, 3.05rem); line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; text-shadow: 0 0 25px color-mix(in srgb, var(--accent, var(--cyan)) 30%, transparent); }
.metric-card span { color: #8f8ca9; font-size: .72rem; line-height: 1.35; }
.metric-primary { --accent: var(--cyan); border-color: rgba(57,217,255,.38); }
.metric-violet { --accent: #bd78ff; }
.metric-gold { --accent: var(--gold); border-color: rgba(255,189,74,.28); }
.metric-warning { --accent: var(--red); border-color: rgba(255,98,124,.3); }
.activity-panel { min-height: 0; flex: 1; padding: 20px; display: flex; flex-direction: column; border-radius: 20px; }
.update-time { color: #8f8ca9; font-size: .68rem; white-space: nowrap; }
.site-filter-wrap { margin: 17px 0 14px; display: grid; gap: 7px; }
.site-filter-wrap label { color: #aaa6c1; font-size: .68rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.site-filter-wrap select { width: 100%; min-height: 44px; padding: 0 13px; border: 1px solid rgba(152,108,230,.3); border-radius: 10px; background: #090820; color: #f8f6ff; outline: none; }
.site-filter-wrap select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(57,217,255,.1); }
.activity-feed { min-height: 220px; max-height: 370px; overflow: auto; display: grid; align-content: start; gap: 8px; padding-right: 2px; }
.activity-item { padding: 12px; display: grid; grid-template-columns: 10px minmax(0,1fr); gap: 10px; border: 1px solid rgba(141,102,220,.14); border-radius: 11px; background: rgba(18,12,44,.66); }
.activity-item.blocked { border-color: rgba(255,98,124,.3); }
.activity-color { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--site-color); box-shadow: 0 0 10px var(--site-color); }
.activity-main { min-width: 0; }
.activity-topline { display: flex; justify-content: space-between; gap: 10px; }
.activity-site { min-width: 0; overflow: hidden; color: #f4f1ff; font-size: .79rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.activity-time { flex: none; color: #89869f; font-size: .64rem; }
.activity-path { margin: 5px 0; overflow: hidden; color: #cbc7df; font-size: .73rem; text-overflow: ellipsis; white-space: nowrap; }
.activity-meta { color: #8e8aa5; font-size: .65rem; }
.empty-feed { padding: 40px 18px; color: var(--muted); text-align: center; }
.privacy-card { padding: 16px; display: flex; gap: 12px; align-items: flex-start; border-radius: 16px; }
.privacy-icon { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border: 1px solid rgba(125,255,87,.34); border-radius: 50%; color: var(--green); background: rgba(125,255,87,.06); box-shadow: 0 0 20px rgba(125,255,87,.08); }
.privacy-card strong { color: #fff; font-size: .82rem; }
.privacy-card p { margin: 4px 0 0; color: #9692ad; font-size: .7rem; line-height: 1.48; }
.skeleton-line { height: 38px; border-radius: 9px; background: linear-gradient(90deg,rgba(255,255,255,.03),rgba(255,255,255,.08),rgba(255,255,255,.03)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.site-footer { border-top: 1px solid rgba(112,83,199,.18); background: rgba(5,5,18,.92); }
.footer-shell { width: min(calc(100% - 48px), 1400px); margin-inline: auto; padding: 32px 0 24px; display: grid; grid-template-columns: 1.7fr repeat(3,1fr); gap: 44px; }
.footer-brand img { width: 94px; margin: 0 auto 8px; }
.footer-brand p { max-width: 360px; margin: 0 auto; color: #aaa8bd; text-align: center; font-size: .78rem; line-height: 1.5; }
.footer-column { display: grid; align-content: start; justify-items: start; }
.footer-column h2 { margin: 0 0 6px; color: var(--cyan); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.footer-column:nth-child(3) h2 { color: #ff7acb; }
.footer-column:nth-child(4) h2 { color: var(--gold); }
.footer-column a { color: #c6c3d4; font-size: .76rem; line-height: 1.55; }
.footer-column a:hover { color: #fff; }
.footer-bottom { width: min(calc(100% - 48px), 1400px); min-height: 48px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid rgba(255,255,255,.06); color: #8e8b9f; font-size: .68rem; }
.footer-bottom p { margin: 0; }
.footer-bottom div { display: flex; gap: 18px; }

@media (max-width: 1260px) {
    .site-nav { gap: 2px; }
    .site-nav a { padding-inline: 9px; }
    .dashboard { grid-template-columns: minmax(0,1fr) 390px; }
    .map-controls { max-width: 48%; }
}
@media (max-width: 1080px) {
    .header-shell { grid-template-columns: 96px 1fr auto; gap: 16px; }
    .site-nav a:nth-child(2), .site-nav a:nth-child(3), .site-nav a:nth-child(4) { display: none; }
    .dashboard { grid-template-columns: 1fr; }
    .map-panel { height: 680px; }
    .sidebar { display: grid; grid-template-columns: .85fr 1.15fr; align-items: stretch; }
    .metric-grid { align-content: start; }
    .privacy-card { grid-column: 1 / -1; }
    .activity-feed { max-height: 340px; }
}
@media (max-width: 780px) {
    .header-shell { width: min(calc(100% - 28px), 100%); grid-template-columns: 78px 1fr; }
    .site-brand, .site-brand img { width: 72px; }
    .site-nav { display: none; }
    .header-actions { justify-content: flex-end; }
    .header-link { display: none; }
    .traffic-hero-inner { width: min(calc(100% - 32px), 100%); min-height: 0; padding: 36px 0; display: block; }
    .hero-status-wrap { margin-top: 24px; justify-content: flex-start; }
    .dashboard-shell { width: min(calc(100% - 28px), 100%); padding-top: 18px; }
    .map-panel { height: 630px; min-height: 560px; }
    .map-controls { top: auto; left: 16px; right: 16px; bottom: 16px; max-width: none; justify-content: center; }
    .map-controls button:nth-child(3), .map-controls button:nth-child(4) { display: none; }
    .legend-panel { left: 16px; bottom: 68px; width: calc(100% - 32px); max-height: 190px; }
    .map-heading { top: 18px; left: 18px; }
    .map-heading > p:last-child { display: none; }
    .sidebar { display: flex; }
    .footer-shell { grid-template-columns: repeat(3,1fr); gap: 24px; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
    .discord-button { padding-inline: 12px; font-size: .76rem; }
    .traffic-hero h1 { font-size: clamp(2.8rem, 16vw, 4.4rem); }
    .hero-copy { font-size: .92rem; }
    .metric-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
    .metric-card { min-height: 130px; padding: 14px; }
    .map-panel { height: 570px; min-height: 520px; }
    .map-heading h2 { font-size: 1.65rem; }
    .map-controls button { padding-inline: 10px; font-size: .68rem; }
    .footer-shell { grid-template-columns: 1fr 1fr; }
    .footer-column:last-child { grid-column: 1 / -1; }
    .footer-bottom { padding: 14px 0; flex-direction: column; text-align: center; }
}

/* FLAROCITY TRAFFIC COMPACT PASS — 2026-07-15
   Tightens desktop spacing without changing traffic data, Cesium, APIs, or behavior. */
@media (min-width: 1081px) {
    .site-header { min-height: 66px; }
    .header-shell {
        width: min(calc(100% - 36px), 1680px);
        min-height: 66px;
        grid-template-columns: 94px minmax(0, 1fr) auto;
        gap: 20px;
    }
    .site-brand, .site-brand img { width: 70px; }
    .site-nav a { min-height: 36px; padding-inline: 11px; font-size: .82rem; }
    .header-actions { gap: 10px; }
    .header-link { font-size: .82rem; }
    .discord-button, .refresh-button { min-height: 36px; padding-inline: 14px; }

    .traffic-hero-inner {
        width: min(calc(100% - 48px), 1680px);
        min-height: 190px;
        padding: 26px 0;
        gap: 28px;
    }
    .traffic-hero h1 { font-size: clamp(2.9rem, 4.6vw, 5rem); }
    .hero-copy { max-width: 700px; margin-top: 14px; font-size: .96rem; line-height: 1.5; }
    .connection-state { min-height: 38px; padding-inline: 14px; }

    .dashboard-shell {
        width: min(calc(100% - 36px), 1680px);
        padding: 18px 0 24px;
    }
    .dashboard { grid-template-columns: minmax(0, 1fr) 370px; gap: 16px; }
    .map-panel { height: clamp(540px, 62vh, 650px); min-height: 540px; border-radius: 18px; }
    .map-heading { top: 19px; left: 19px; }
    .map-heading h2 { margin-bottom: 6px; font-size: clamp(1.65rem, 2.4vw, 2.25rem); }
    .map-heading > p:last-child { max-width: 390px; font-size: .86rem; line-height: 1.45; }
    .map-controls { top: 17px; right: 17px; gap: 6px; }
    .map-controls button { min-height: 34px; padding-inline: 11px; font-size: .7rem; }
    .legend-panel { left: 17px; bottom: 17px; max-height: 235px; padding: 14px; border-radius: 14px; }
    .site-legend { margin-top: 9px; gap: 4px; }
    .legend-item { min-height: 36px; padding: 7px 8px; }

    .sidebar { gap: 12px; }
    .metric-grid { gap: 9px; }
    .metric-card { min-height: 120px; padding: 14px; border-radius: 14px; }
    .metric-card p { margin-bottom: 8px; font-size: .68rem; }
    .metric-card strong { margin-bottom: 5px; font-size: clamp(1.75rem, 2.6vw, 2.45rem); }
    .metric-card span { font-size: .66rem; }
    .activity-panel { padding: 16px; border-radius: 16px; }
    .panel-title-row h2 { font-size: 1.35rem; }
    .site-filter-wrap { margin: 12px 0 10px; gap: 5px; }
    .site-filter-wrap select { min-height: 39px; }
    .activity-feed { min-height: 180px; max-height: 300px; gap: 6px; }
    .activity-item { padding: 10px; }
    .privacy-card { padding: 13px; gap: 10px; border-radius: 14px; }
    .privacy-icon { width: 30px; height: 30px; }

    .footer-shell {
        width: min(calc(100% - 40px), 1320px);
        padding: 22px 0 15px;
        gap: 30px;
    }
    .footer-brand img { width: 78px; margin-bottom: 5px; }
    .footer-brand p { max-width: 310px; font-size: .72rem; }
    .footer-column a { font-size: .72rem; line-height: 1.45; }
    .footer-bottom {
        width: min(calc(100% - 40px), 1320px);
        min-height: 42px;
    }
}

@media (min-width: 1081px) and (max-height: 850px) {
    .traffic-hero-inner { min-height: 164px; padding-block: 20px; }
    .traffic-hero h1 { font-size: clamp(2.7rem, 4.1vw, 4.3rem); }
    .dashboard-shell { padding-top: 14px; }
    .map-panel { height: 545px; min-height: 500px; }
    .metric-card { min-height: 108px; }
    .activity-feed { max-height: 250px; }
}

/* FLAROCITY TRAFFIC FOOTER MATCH PASS — 2026-07-15
   Matches the compact footer proportions used across the main FlaroCity pages. */
.site-footer {
    padding: 0;
    border-top: 1px solid rgba(112,83,199,.18);
    background:
        radial-gradient(circle at 18% 0%, rgba(123,63,214,.10), transparent 24rem),
        linear-gradient(180deg, #080916, #05060e);
}
.footer-shell {
    width: min(calc(100% - 48px), 1320px);
    margin-inline: auto;
    padding: 8px 0 4px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 32px;
    row-gap: 4px;
    align-items: start;
}
.footer-brand,
.footer-column {
    min-width: 0;
    justify-self: center;
    justify-items: center;
    text-align: center;
}
.footer-brand img {
    display: block;
    width: 78px;
    height: auto;
    margin: 0 auto 4px;
}
.footer-brand p {
    max-width: 300px;
    margin: 0 auto;
    color: #c9c0e7;
    font-size: .72rem;
    line-height: 1.35;
}
.footer-column {
    width: max-content;
    min-width: 150px;
    gap: 2px;
}
.footer-column h2 {
    width: 100%;
    margin: 0 0 3px;
    text-align: center;
}
.footer-column a {
    width: 100%;
    color: #bcb5df;
    font-size: .72rem;
    line-height: 1.25;
    text-align: center;
}
.footer-bottom {
    width: min(calc(100% - 48px), 1320px);
    min-height: 0;
    margin: 6px auto 0;
    padding: 6px 0 0;
    color: #c9c0e7;
}

@media (max-width: 780px) {
    .footer-shell {
        width: min(calc(100% - 28px), 100%);
        padding: 16px 0 8px;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }
    .footer-brand { grid-column: 1 / -1; }
    .footer-bottom {
        width: min(calc(100% - 28px), 100%);
        margin-top: 10px;
        padding: 10px 0 8px;
    }
}

@media (max-width: 560px) {
    .footer-shell {
        grid-template-columns: 1fr 1fr;
        gap: 16px 10px;
    }
    .footer-column { min-width: 0; width: 100%; }
    .footer-column:last-child { grid-column: 1 / -1; }
    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

/* FLAROCITY TRAFFIC HERO STATS LIFT PASS — 2026-07-15
   Uses the open hero space for live controls and traffic totals, reducing page length. */
.hero-live-panel {
    width: min(100%, 500px);
    margin-left: auto;
    display: grid;
    gap: 10px;
    align-content: center;
}
.hero-live-panel .hero-status-wrap {
    margin: 0;
    justify-content: flex-end;
}
.hero-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.hero-metric-grid .metric-card {
    min-height: 82px;
    padding: 10px 13px;
    border-radius: 13px;
}
.hero-metric-grid .metric-card p {
    margin-bottom: 4px;
    font-size: .62rem;
    line-height: 1.2;
}
.hero-metric-grid .metric-card strong {
    margin-bottom: 3px;
    font-size: clamp(1.45rem, 2vw, 1.9rem);
}
.hero-metric-grid .metric-card span {
    font-size: .58rem;
    line-height: 1.2;
}
.sidebar > .activity-panel {
    flex: 1 1 auto;
}

@media (min-width: 1081px) {
    .traffic-hero-inner {
        min-height: 228px;
        padding-block: 22px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(420px, 500px);
        align-items: center;
    }
    .dashboard {
        align-items: stretch;
    }
    .sidebar {
        min-height: 0;
    }
    .activity-panel {
        min-height: 0;
    }
    .activity-feed {
        max-height: 410px;
    }
}

@media (min-width: 781px) and (max-width: 1080px) {
    .traffic-hero-inner {
        min-height: 220px;
        padding-block: 24px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
        align-items: center;
    }
    .hero-live-panel {
        width: 100%;
    }
}

@media (max-width: 780px) {
    .traffic-hero-inner {
        padding: 18px 0 16px;
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .traffic-hero h1 {
        font-size: clamp(2.35rem, 12vw, 3.6rem);
    }
    .hero-copy {
        margin-top: 10px;
        font-size: .84rem;
        line-height: 1.4;
    }
    .hero-live-panel {
        width: 100%;
        margin: 0;
        gap: 8px;
    }
    .hero-live-panel .hero-status-wrap {
        justify-content: flex-end;
    }
    .connection-state,
    .refresh-button {
        min-height: 34px;
        padding-inline: 11px;
        font-size: .72rem;
    }
    .hero-metric-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
    }
    .hero-metric-grid .metric-card {
        min-height: 70px;
        padding: 8px;
        text-align: center;
    }
    .hero-metric-grid .metric-card p {
        min-height: 2.3em;
        margin-bottom: 2px;
        font-size: .52rem;
        line-height: 1.15;
    }
    .hero-metric-grid .metric-card strong {
        margin: 0;
        font-size: clamp(1.15rem, 5.2vw, 1.6rem);
    }
    .hero-metric-grid .metric-card span {
        display: none;
    }
    .map-panel {
        height: 520px;
        min-height: 470px;
    }
}

@media (max-width: 560px) {
    .traffic-hero-inner {
        padding-block: 14px;
    }
    .traffic-hero .eyebrow {
        margin-bottom: 5px;
        font-size: .58rem;
    }
    .traffic-hero h1 {
        font-size: clamp(2.1rem, 11vw, 3rem);
    }
    .hero-copy {
        display: none;
    }
    .hero-live-panel {
        gap: 6px;
    }
    .hero-metric-grid {
        gap: 5px;
    }
    .hero-metric-grid .metric-card {
        min-height: 62px;
        padding: 7px 5px;
    }
    .hero-metric-grid .metric-card p {
        font-size: .47rem;
        letter-spacing: .05em;
    }
    .hero-metric-grid .metric-card strong {
        font-size: clamp(1rem, 5vw, 1.35rem);
    }
    .map-panel {
        height: 455px;
        min-height: 420px;
    }
}

/* FLAROCITY TRAFFIC VIEWPORT-FIT PASS — 2026-07-16
   Matches the compact desktop composition while preserving tablet/mobile flow. */
@media (min-width: 1081px) {
    body { line-height: 1.35; }

    .site-header { min-height: 44px; }
    .header-shell {
        width: min(calc(100% - 48px), 1840px);
        min-height: 44px;
        grid-template-columns: 68px minmax(0, 1fr) auto;
        gap: 12px;
    }
    .site-brand,
    .site-brand img { width: 46px; }
    .site-nav { gap: 1px; }
    .site-nav a {
        min-height: 28px;
        padding-inline: 8px;
        border-radius: 7px;
        font-size: .66rem;
    }
    .header-actions { gap: 8px; }
    .header-link { font-size: .68rem; }
    .discord-button,
    .refresh-button {
        min-height: 28px;
        padding-inline: 10px;
        border-radius: 7px;
        font-size: .66rem;
    }

    .traffic-hero-inner {
        width: min(calc(100% - 48px), 1840px);
        min-height: 158px;
        padding-block: 10px;
        grid-template-columns: minmax(0, 1fr) minmax(310px, 360px);
        gap: 24px;
    }
    .traffic-hero .eyebrow {
        margin-bottom: 5px;
        font-size: .55rem;
    }
    .traffic-hero .eyebrow span {
        width: 20px;
        margin-right: 7px;
    }
    .traffic-hero h1 {
        font-size: clamp(2.45rem, 4.1vw, 3.9rem);
        line-height: .94;
    }
    .hero-copy {
        max-width: 600px;
        margin-top: 8px;
        font-size: .7rem;
        line-height: 1.4;
    }
    .hero-live-panel {
        width: 100%;
        max-width: 360px;
        gap: 5px;
    }
    .hero-live-panel .hero-status-wrap { gap: 6px; }
    .connection-state {
        min-height: 26px;
        padding-inline: 9px;
        gap: 6px;
        font-size: .62rem;
    }
    .status-dot { width: 6px; height: 6px; }
    .hero-metric-grid { gap: 5px; }
    .hero-metric-grid .metric-card {
        min-height: 46px;
        padding: 4px 7px;
        border-radius: 8px;
    }
    .hero-metric-grid .metric-card p {
        margin-bottom: 1px;
        font-size: .43rem;
        letter-spacing: .07em;
        line-height: 1;
    }
    .hero-metric-grid .metric-card strong {
        margin-bottom: 1px;
        font-size: 1rem;
    }
    .hero-metric-grid .metric-card span {
        font-size: .38rem;
        line-height: 1;
    }

    .dashboard-shell {
        width: min(calc(100% - 48px), 1840px);
        padding: 10px 0;
    }
    .dashboard {
        height: clamp(440px, 54vh, 520px);
        grid-template-columns: minmax(0, 1fr) clamp(340px, 20vw, 370px);
        gap: 10px;
    }
    .map-panel {
        height: 100%;
        min-height: 440px;
        border-radius: 10px;
    }
    .map-heading { top: 12px; left: 12px; }
    .map-heading .eyebrow {
        margin-bottom: 4px;
        font-size: .52rem;
    }
    .map-heading h2 {
        margin-bottom: 4px;
        font-size: 1.5rem;
    }
    .map-heading > p:last-child {
        max-width: 300px;
        font-size: .68rem;
        line-height: 1.35;
    }
    .map-controls {
        top: 10px;
        right: 10px;
        gap: 4px;
        max-width: 58%;
    }
    .map-controls button {
        min-height: 28px;
        padding-inline: 8px;
        border-radius: 6px;
        font-size: .58rem;
    }
    .legend-panel {
        width: min(215px, calc(100% - 24px));
        max-height: 180px;
        left: 10px;
        bottom: 10px;
        padding: 10px;
        border-radius: 9px;
    }
    .panel-title-row { gap: 7px; }
    .panel-title-row h3 { font-size: .76rem; }
    .text-button {
        min-height: 22px;
        padding-inline: 7px;
        border-radius: 6px;
        font-size: .5rem;
    }
    .site-legend { margin-top: 6px; gap: 3px; }
    .legend-row { grid-template-columns: minmax(0, 1fr) 25px; gap: 3px; }
    .legend-item {
        min-height: 29px;
        padding: 5px 6px;
        grid-template-columns: 7px minmax(0, 1fr) auto auto;
        gap: 5px;
        border-radius: 6px;
    }
    .legend-link { border-radius: 6px; font-size: .68rem; }
    .legend-color { width: 6px; height: 6px; }
    .legend-name { font-size: .58rem; }
    .legend-count { font-size: .52rem; }

    .sidebar {
        height: 100%;
        min-height: 0;
        gap: 8px;
        overflow: hidden;
    }
    .activity-panel {
        min-height: 0;
        padding: 12px;
        overflow: hidden;
        border-radius: 9px;
    }
    .activity-panel .eyebrow {
        margin-bottom: 2px;
        font-size: .5rem;
    }
    .panel-title-row h2 { font-size: 1.05rem; }
    .update-time { font-size: .52rem; }
    .site-filter-wrap {
        margin: 6px 0;
        gap: 3px;
    }
    .site-filter-wrap label { font-size: .48rem; }
    .site-filter-wrap select {
        min-height: 32px;
        padding: 0 8px;
        border-radius: 6px;
        font-size: .62rem;
    }
    .activity-feed {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        gap: 5px;
    }
    .activity-item {
        padding: 8px;
        border-radius: 6px;
    }
    .activity-site { font-size: .62rem; }
    .activity-time { font-size: .5rem; }
    .activity-path {
        margin: 2px 0;
        font-size: .56rem;
    }
    .activity-meta {
        overflow: hidden;
        font-size: .5rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .privacy-card {
        padding: 9px;
        gap: 8px;
        border-radius: 8px;
    }
    .privacy-icon { width: 23px; height: 23px; font-size: .65rem; }
    .privacy-card strong { font-size: .62rem; }
    .privacy-card p {
        margin-top: 2px;
        font-size: .52rem;
        line-height: 1.25;
    }

    .site-footer { padding: 8px 0 6px; }
    .footer-shell {
        width: min(calc(100% - 48px), 1320px);
        min-height: 113px;
        padding: 0;
        column-gap: 32px;
        row-gap: 4px;
    }
    .footer-brand img { width: 78px; margin-bottom: 4px; }
    .footer-brand p {
        max-width: 300px;
        font-size: .78rem;
        line-height: 1.35;
    }
    .footer-column { min-width: 150px; gap: 2px; }
    .footer-column h2 {
        margin-bottom: 3px;
        font-size: .72rem;
    }
    .footer-column a {
        font-size: .82rem;
        line-height: 1.25;
    }
    .footer-bottom {
        width: min(calc(100% - 48px), 1320px);
        min-height: 0;
        margin-top: 6px;
        padding: 6px 0 0;
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        gap: 16px;
        text-align: center;
        font-size: .72rem;
    }
    .footer-bottom div { gap: 16px; }
}
.legend-live {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    font-size: 10px;
    color: #b0b7c9;
}
.legend-live::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #778097;
}
.legend-live.is-live { color: #7fffc0; }
.legend-live.is-live::before {
    background: #43ee98;
    box-shadow: 0 0 8px #43ee9880;
}
.legend-name { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 700px) {
    /* Put the site list below the globe, not over the live markers. */
    .map-panel { height: auto; min-height: 0; padding-top: 430px; }
    #cesiumContainer { height: 400px; bottom: auto; }
    .map-controls { top: 382px; bottom: auto; left: 16px; right: 16px; }
    .legend-panel { position: relative; left: auto; bottom: auto; width: auto; max-height: none; margin: 16px; }
    .map-empty { top: 190px; bottom: auto; }
}
