/* Live location is a separate control; the research layers retain their own colours. */
#gps-tools { position: fixed; z-index: 38; top: 211px; left: calc(50% - 48px); }
#gps-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 9px 13px; border: 1px solid #acc8e5; border-radius: 7px; background: #fff; color: #185da6; box-shadow: 0 3px 14px #17374320; font-size: 13px; font-weight: 600; white-space: nowrap; }
#gps-button svg { flex: 0 0 18px; }
#gps-button[data-state="on"], body[data-gps-state="on"] #gps-button { background: #176ad0; color: #fff; border-color: #176ad0; }
#gps-button[data-state="waiting"] { border-color: #176ad0; background: #edf5ff; }
#gps-panel { position: fixed; z-index: 75; right: 24px; bottom: 24px; width: 360px; max-width: calc(100vw - 24px); max-height: min(540px, calc(100dvh - 100px)); overflow-y: auto; overscroll-behavior: contain; padding: 20px; background: #fff; border: 1px solid #c9dce8; border-radius: 16px; box-shadow: 0 12px 48px #102b3b40; color: #173c4e; }
#gps-panel[hidden] { display: none !important; }
.gps-panel-head { position: sticky; top: -20px; z-index: 2; background: #fff; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.gps-eyebrow { display: block; color: #467b9e; font: 10px 'IBM Plex Mono', monospace; letter-spacing: .08em; }
#gps-title { font-size: 24px; margin: 8px 0 0; letter-spacing: -.035em; }
#gps-close { flex: 0 0 44px; min-height: 44px; border-radius: 50%; font-size: 23px; padding: 0; background: #eef5f9; }
#gps-status { font-size: 16px; line-height: 1.55; margin: 20px 0 8px; font-weight: 600; }
#gps-accuracy { font-size: 13px; line-height: 1.55; color: #426078; margin: 0 0 18px; }
#gps-accuracy:empty { display: none; }
.gps-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.gps-actions button { min-height: 46px; font-size: 14px; padding: 10px 8px; border-radius: 7px; }
#gps-follow { background: #176ad0; color: #fff; border-color: #176ad0; }
#gps-stop { background: #fff; color: #28445a; }
.gps-actions button:disabled { opacity: .45; cursor: default; }
.gps-note { font-size: 13px; line-height: 1.6; margin: 16px 0 10px; color: #3a596d; }
.gps-privacy { font-size: 12px; line-height: 1.6; color: #647e8b; margin: 0; padding-top: 12px; border-top: 1px solid #e3ebef; }
.gps-position { width: 22px; height: 22px; pointer-events: none; z-index: 6; }
.gps-position-dot { display: block; width: 22px; height: 22px; border: 3px solid #fff; border-radius: 50%; background: #1879ec; box-shadow: 0 0 0 6px #1879ec24, 0 2px 8px #063d7860; }
.gps-position.is-stale .gps-position-dot { background: #8295a7; box-shadow: 0 0 0 6px #8295a724; }
body[data-app-view="terminology"] #gps-tools { top: auto; left: auto; right: 24px; bottom: 20px; }
#gps-button:focus-visible, #gps-panel button:focus-visible { outline: 3px solid #70c3f0; outline-offset: 3px; }
@media (max-width: 900px), (max-width: 1100px) and (max-height: 500px) {
 #gps-tools { top: auto; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); left: 50%; right: auto; transform: translateX(-50%); }
 #gps-panel { left: 12px; right: 12px; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); width: auto; max-width: 420px; margin: 0 auto; max-height: calc(100dvh - var(--app-sheet-top, 72px) - 92px - env(safe-area-inset-bottom, 0px)); padding: 18px; }
 body:is([data-app-panel="results"], [data-app-panel="filters"], [data-app-panel="detail"]) #gps-tools { top: calc(var(--app-sheet-top) + 8px); bottom: auto; left: auto; right: 12px; transform: none; }
 body[data-app-view="terminology"] #gps-tools { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); right: 12px; left: auto; top: auto; transform: none; }
 #gps-button { min-height: 44px; }
}
@media (max-width: 360px) {
 #gps-button { padding: 9px 7px; gap: 4px; font-size: 12px; max-width: 104px; }
 #gps-button-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
 #app-map-actions button { padding: 9px 9px; font-size: 12px; }
 .gps-actions { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 600px) and (max-width: 1100px) and (max-height: 500px) {
 #gps-tools { left: 170px; bottom: calc(78px + env(safe-area-inset-bottom, 0px)); transform: none; }
 body:is([data-app-panel="results"], [data-app-panel="filters"], [data-app-panel="detail"]) #gps-tools { top: auto; right: auto; left: 18px; bottom: 74px; }
 #gps-panel { left: auto; right: 12px; bottom: 12px; width: 360px; max-height: calc(100dvh - 24px); margin: 0; }
}
@media print { #gps-tools, #gps-panel, .gps-position { display: none !important; } }
