/* Compact presentation only; existing map, modal and office-access rules remain. */
#mobileControlsPanel {
  --lt-ink: #e8f3fa;
  --lt-muted: #a6bfce;
  --lt-line: #254453;
  width: 264px;
  left: 12px;
  top: 12px;
  padding: 12px;
  gap: 10px;
  border: 1px solid #395765;
  border-radius: 16px;
  background: rgba(9, 29, 41, .97);
  color: var(--lt-ink);
  box-shadow: 0 16px 42px #04131b40;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #527384 transparent;
}
#mobileControlsPanel > * { order: 0; flex-shrink: 0; min-width: 0; }
#mobileControlsPanel > .compact-brand { margin-bottom: 1px; color: var(--lt-ink); padding: 0 0 10px; border-bottom: 1px solid var(--lt-line); }
#mobileControlsPanel .compact-brand strong { background: #20c5d4; color: #082532; }
#mobileControlsPanel .compact-brand span { font-size: 13px; }
#mobileControlsPanel .lt-section-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; min-height: 25px; }
#mobileControlsPanel .lt-section-head strong { font-size: 10px; letter-spacing: .09em; }
#mobileControlsPanel .lt-section-head > span { color: var(--lt-muted); font-size: 10px; }
#ltFleetList { display: grid; gap: 5px; margin-top: 5px; }
#mobileControlsPanel .lt-fleet-row { display: flex; justify-content: space-between; align-items: center; min-height: 49px; padding: 7px 8px; border: 1px solid #31505d; border-radius: 10px; color: var(--lt-ink); background: #132f3e; cursor: pointer; text-align: left; font-family: inherit; width: 100%; gap: 8px; }
.lt-fleet-row > span { display: grid; gap: 3px; min-width: 0; }
.lt-fleet-row > span:first-child { grid-template-columns: 25px minmax(0, 1fr); align-items: center; }
.lt-fleet-row b { color: var(--fleet-colour); font-size: 11px; }
.lt-fleet-row > span:first-child > span { font-size: 10px; line-height: 1.4; }
.lt-fleet-row > span:last-child { text-align: right; flex-shrink: 0; }
.lt-fleet-row strong { font-size: 14px; color: #89eed5; font-variant-numeric: tabular-nums; }
.lt-fleet-row small { font-size: 9px; color: var(--lt-muted); }
.lt-fleet-row.stale strong, .lt-fleet-row.stale small { color: #ffd28c; }
.lt-fleet-row.unknown strong { color: var(--lt-muted); }
#mobileControlsPanel .lt-fleet-row:hover { border-color: #30d5d0; background: #193e4e; }
#mobileControlsPanel .lt-seismic { padding: 9px 10px; background: #152f3b; border: 1px solid #3f5761; border-radius: 12px; }
.lt-layer-toggle { display: flex; align-items: center; gap: 7px; cursor: pointer; min-height: 30px; }
.lt-layer-toggle input { accent-color: #2edcc0; width: 17px; height: 17px; margin: 0; }
#mobileControlsPanel .lt-count { min-width: 30px; color: #ffe08b; background: #55462a; border-radius: 6px; text-align: center; padding: 3px 5px; font-weight: 800; }
#mobileControlsPanel details > summary { cursor: pointer; user-select: none; }
#mobileControlsPanel .lt-quake-settings > summary { display: flex; justify-content: space-between; gap: 4px; align-items: center; font-size: 10px; min-height: 34px; color: #d5e5ee; }
.lt-quake-settings summary > span:last-child { color: #68dbe4; }
.lt-quake-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 4px 0 9px; }
.lt-quake-inputs label { display: grid; gap: 5px; font-size: 10px; color: var(--lt-muted); min-width: 0; }
.lt-quake-inputs .lt-span { grid-column: 1 / -1; }
#mobileControlsPanel .lt-quake-inputs select { width: 100%; max-width: 100%; background: #071f2c; border: 1px solid #557080; color: #fff; border-radius: 7px; height: 38px; font: inherit; font-size: 12px; padding: 0 7px; }
#mobileControlsPanel .lt-muted { color: var(--lt-muted); font-size: 10px; line-height: 1.5; margin: 5px 0; }
.lt-feed-status { border-left: 3px solid #688394; padding-left: 6px; color: #b6ccd8; font-size: 10px; line-height: 1.5; margin-top: 1px; }
.lt-feed-status[data-state="current"] { border-color: #31d5b0; }
.lt-feed-status[data-state="delayed"] { border-color: #ffb843; color: #ffe1a9; }
.lt-feed-status[data-state="expired"], .lt-feed-status[data-state="unavailable"] { border-color: #f37e87; }
.lt-warning { color: #ffe1a9; font-size: 10px; line-height: 1.5; margin: 7px 0; }
.lt-quake-links { display: flex; justify-content: space-between; align-items: center; gap: 7px; margin-top: 6px; }
#mobileControlsPanel .lt-quake-links button, #mobileControlsPanel .lt-text-button { padding: 6px 0; background: none; border: 0; font: inherit; font-size: 10px; color: #80e4e9; cursor: pointer; text-align: left; }
.lt-quake-links a { font-size: 10px; color: #80e4e9; text-decoration: none; padding: 6px 0; }
.lt-quake-links button:disabled { opacity: .45; cursor: default; }
.lt-quake-key { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px; border-top: 1px solid #35505b; padding-top: 7px; margin-top: 5px; font-size: 9px; color: #bed0da; }
.lt-quake-key span { display: inline-flex; align-items: center; gap: 4px; }
.lt-quake-key i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.lt-quake-key .q3 { background: #e9b93f; } .lt-quake-key .q4 { background: #ff902b; } .lt-quake-key .q6 { background: #ff4568; }
#mobileControlsPanel .lt-group { width: 100%; border: 1px solid var(--lt-line); border-radius: 10px; background: #102936; }
#mobileControlsPanel .lt-group > summary { display: flex; align-items: center; justify-content: space-between; min-height: 42px; gap: 5px; padding: 8px; color: var(--lt-ink); font-size: 11px; font-weight: 700; }
#mobileControlsPanel .lt-group > summary > span { color: var(--lt-muted); font-size: 9px; font-weight: 400; }
#mobileControlsPanel .lt-group > summary::before { content: '›'; color: #72d7dd; font-size: 18px; margin-right: 2px; }
#mobileControlsPanel .lt-group[open] > summary::before { content: '⌄'; }
#mobileControlsPanel .lt-group > summary > span { margin-left: auto; }
#mobileControlsPanel .lt-group[open] > summary { border-bottom: 1px solid var(--lt-line); }
#mobileControlsPanel .lt-history { order: 6; }
#mobileControlsPanel .lt-track { order: 4; }
#mobileControlsPanel > .top-actions { order: 3; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
#mobileControlsPanel .lt-tools { grid-column: 1 / -1; }
.lt-tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 8px; }
#mobileControlsPanel .lt-tool-grid > .icon-btn:not([hidden]) { display: inline-flex; }
#mobileControlsPanel .icon-btn, #mobileControlsPanel .track-btn { min-width: 0; width: 100%; min-height: 35px; height: auto; padding: 7px; border: 1px solid #3e5a69; border-radius: 7px; font-size: 11px; color: #e3f1f9; background: #1b394a; text-decoration: none; justify-content: center; }
#mobileControlsPanel .icon-btn.active, #mobileControlsPanel .track-btn.active { background: #135b61; border-color: #328a8e; color: #d6fffa; }
#mobileControlsPanel .icon-btn:hover, #mobileControlsPanel .track-btn:hover { border-color: #86d2db; }
#mobileControlsPanel .track-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 8px; }
#mobileControlsPanel .track-presets { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; width: 100%; gap: 5px; }
#mobileControlsPanel .track-status { grid-column: 1 / -1; background: #1b3545; color: #a8c7d6; text-align: center; border: 0; }
#mobileControlsPanel .ais-vessel-search { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px; }
#mobileControlsPanel .ais-vessel-search input { width: 100%; min-width: 0; height: 36px; background: #071f2c; color: #fff; border: 1px solid #456574; border-radius: 7px; font-size: 11px; padding: 0 7px; }
#mobileControlsPanel .ais-vessel-search input::placeholder { color: #a1bdcc; }
#mobileControlsPanel #aisVesselSearchBtn { width: auto; min-height: 36px; color: #c9f9ff; border: 1px solid #3b7784; border-radius: 7px; background: #184b5c; font-size: 10px; }
#mobileControlsPanel .ais-vessel-search-status { grid-column: 1 / -1; color: #b6d0dc; }
#mobileControlsPanel .lt-link-grid { display: grid; gap: 5px; padding: 8px; }
#mobileControlsPanel .replay-launch { width: 100%; min-height: 44px; box-shadow: none; background: #193b4b; border-color: #3e6273; }
#mobileControlsPanel .replay-launch small { color: #a7c8d9; }
#mobileControlsPanel :is(button, a, input, select, summary):focus-visible { outline: 2px solid #99f4e8; outline-offset: 2px; }
#mobileControlsPanel [hidden] { display: none !important; }
.ship-arrow-wrap .fleet-vessel-code { min-width: max-content; white-space: nowrap; font-size: 12px; padding: 4px 6px; display: flex; gap: 6px; align-items: center; }
.ship-arrow-wrap .fleet-vessel-code .fleet-marker-speed { color: #a5ffe0; font-size: 11px; font-weight: 800; }
.ship-arrow-wrap .fleet-vessel-code.stale .fleet-marker-speed { color: #ffd28c; }
.ship-arrow-wrap .fleet-vessel-code.unknown .fleet-marker-speed { color: #acbdc8; }
.fleet-vessel-code small { font-size: 8px; font-weight: 600; color: #ffd28c; }
.lt-quake-popup { color: #163144; font-size: 12px; max-width: 300px; }
.lt-quake-popup > strong { display: block; font-size: 15px; line-height: 1.4; margin-bottom: 12px; }
.lt-quake-popup dl { display: grid; grid-template-columns: 94px minmax(0, 1fr); gap: 7px; margin: 0; }
.lt-quake-popup dt { color: #566978; font-size: 11px; }
.lt-quake-popup dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.lt-quake-popup p { font-size: 11px; line-height: 1.5; margin: 10px 0; }
.lt-quake-popup a { font-weight: 700; color: #12657a; }
@media (min-width: 761px) {
  .speed-color-panel { left: 290px; bottom: 12px; }
  #aisLegend { left: 290px; max-width: calc(100vw - 310px); }
}
@media (max-width: 760px) {
  .mobile-mapbar { grid-template-columns: minmax(84px, 1fr) repeat(3, auto); background: #092431f2; border-color: #456271; color: #fff; gap: 5px; min-height: 58px; }
  .mobile-mapbar .mobile-mapbar-brand { color: #e5f9ff; grid-template-columns: 32px minmax(0, 1fr); }
  .mobile-mapbar .mobile-mapbar-brand span { font-size: 9px; }
  .mobile-mapbar .mobile-mapbar-brand strong { color: #083342; background: #42d5df; }
  .mobile-mapbar > button { min-height: 44px; font-size: 11px; color: #e5f9ff; background: #1e4154; border-color: #446376; padding: 0 8px; }
  .mobile-mapbar > .mobile-menu-btn { background: #157d78; border-color: #30b6a6; }
  #mobileControlsPanel { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 86dvh; padding: 12px 14px max(18px, env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; border: 1px solid #395765; background: #091d29fa; box-sizing: border-box; }
  #mobileControlsPanel > .compact-brand { top: -12px; margin: -2px 0 0; padding: 7px 0 10px; background: #091d29; grid-template-columns: 32px minmax(0, 1fr) auto; }
  #mobileControlsPanel .mobile-controls-close { min-height: 44px; color: #e4f5ff; background: #234858; border-color: #557583; }
  #mobileControlsPanel .lt-fleet-row { min-height: 52px; }
  .lt-fleet-row > span:first-child > span { font-size: 12px; }
  .lt-fleet-row small { font-size: 10px; }
  #mobileControlsPanel .icon-btn, #mobileControlsPanel .track-btn, #mobileControlsPanel #aisVesselSearchBtn, #mobileControlsPanel .ais-vessel-search input, #mobileControlsPanel .lt-quake-inputs select { min-height: 44px; }
  #mobileControlsPanel .lt-group > summary, #mobileControlsPanel .lt-quake-settings > summary, .lt-layer-toggle { min-height: 44px; }
  #mobileControlsPanel .lt-quake-links button, #mobileControlsPanel .lt-text-button, .lt-quake-links a { min-height: 44px; display: inline-flex; align-items: center; }
  #mobileControlsPanel .lt-section-head strong { font-size: 11px; }
  .lt-feed-status, #mobileControlsPanel .lt-muted, .lt-warning { font-size: 11px; }
  .leaflet-bottom.leaflet-right { bottom: calc(64px + env(safe-area-inset-bottom)); }
  .leaflet-popup.lt-seismic-popup .leaflet-popup-content { max-width: calc(100vw - 70px); max-height: calc(100dvh - 195px); overflow-y: auto; }
  body.mobile-controls-open #umayLauncher { visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) { #mobileControlsPanel { transition: none; } }
