/* Ground / Motion Public v1 responsive layout */
:root{--gm-safe-bottom:env(safe-area-inset-bottom,0px)}
html,body{overscroll-behavior:none}button,select,input{touch-action:manipulation}
button:focus-visible{outline:3px solid #e2a83a;outline-offset:2px}
.gm-mobile-tools,.gm-layer-sheet,.gm-story-handle,.gm-install{display:none}
.guided-story{width:min(510px,calc(100vw - 36px));max-height:calc(100% - 165px);overflow-y:auto}
.guided-wave-button{display:block;width:100%;padding:12px;border:1px solid #8ccac4;background:#e9f7f5;color:#096d69;border-radius:10px;font-weight:700;margin:6px 0 14px}
.radar-explainer[hidden],.guided-wave-button[hidden]{display:none!important}
.radar-explainer{background:#f7fbfb;border:1px solid #d4e6e6;border-radius:14px;padding:12px;margin:15px 0}
.radar-head{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#173f48;font-size:13px}
.radar-head button{border:1px solid #b3d8d3;background:white;border-radius:8px;padding:8px 11px;min-height:38px;font-weight:700}
.radar-svg{width:100%;height:auto;display:block;margin-top:9px}.radar-caption{font-size:12px!important;line-height:1.5!important;margin:8px 0 0!important}
.radar-explainer.is-playing .radar-beam{animation:gm-radar 1.2s linear infinite}
.radar-explainer.is-playing .radar-satellite{animation:gm-orbit 3s ease-in-out infinite alternate}
.radar-explainer.is-playing .radar-chart{animation:gm-chart 2.4s ease-in-out infinite alternate}
@keyframes gm-radar{to{stroke-dashoffset:-32}}@keyframes gm-orbit{to{transform:translate(120px,27px)}}@keyframes gm-chart{from{opacity:.25}to{opacity:1}}
@media(max-width:760px){
 html,body{height:100%;overflow:hidden}.topbar{height:58px;padding:0 9px;gap:4px}.workspace{top:58px;bottom:0}
 .top-right{gap:5px}.top-right .segmented{display:flex;gap:2px}.top-right .segmented button{padding:7px 8px;min-height:38px;font-size:12px}
 .identity-word{font-size:12px;letter-spacing:-.04em}.identity .monogram{width:29px;height:29px;font-size:15px}.catapult-brand{display:none!important}
 .settings-button{min-width:38px;min-height:38px;padding:7px}.settings-button span{display:none}
 .story-card{top:9px;left:9px;right:9px;width:auto!important;max-height:30dvh;padding:13px;border-radius:15px;overflow:auto}
 .story-card h1{font-size:21px;margin:6px 0}.story-card p{font-size:12px;line-height:1.4}.story-card .quick-actions{gap:7px}.story-card .quick-actions button{min-height:42px;font-size:12px}
 .story-card .visual-controls{display:none!important}
 .gm-mobile-tools{display:flex;position:absolute;right:10px;bottom:calc(140px + var(--gm-safe-bottom));z-index:16;flex-direction:column;gap:8px}
 .gm-mobile-tools button{border:1px solid #d0e2e1;background:#fff;color:#16444a;border-radius:24px;min-height:46px;min-width:92px;box-shadow:0 4px 16px #1c41474a;font-weight:750;padding:10px 13px}
 .gm-layer-sheet{display:block;position:absolute;z-index:25;bottom:calc(128px + var(--gm-safe-bottom));left:9px;right:9px;max-height:58dvh;overflow:auto;background:#fff;border-radius:18px;padding:16px;box-shadow:0 10px 38px #103d4b66;border:1px solid #cde2df}
 .gm-layer-sheet[hidden]{display:none!important}.gm-layer-sheet h2{font-size:19px;margin:0}.gm-layer-sheet .gm-sheet-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
 .gm-layer-sheet .gm-sheet-head button{min-height:42px;min-width:42px;font-size:23px;border:0;background:#eff6f5;border-radius:12px}
 .gm-layer-sheet .visual-controls{display:grid!important;grid-template-columns:1fr;gap:12px;margin:0}
 .gm-layer-sheet .switch-pill,.gm-layer-sheet .building-colour-label{min-height:44px;font-size:14px;justify-content:space-between}
 .gm-layer-sheet input[type=checkbox]{width:19px;height:19px}.gm-layer-sheet select{font-size:14px;min-height:42px;max-width:none}
 .guided-story{position:absolute;left:0!important;right:0!important;top:auto!important;bottom:calc(123px + var(--gm-safe-bottom));width:100%!important;max-height:min(52dvh,540px)!important;border-radius:20px 20px 0 0;padding:15px 19px 17px;box-shadow:0 -9px 35px #173c4c4a;z-index:24;overscroll-behavior:contain}
 .guided-story h2{font-size:21px;margin:9px 0}.guided-story p{font-size:13px;line-height:1.5}
 .guided-story .guided-buttons{position:sticky;bottom:-17px;background:#fff;padding:10px 0 calc(6px + var(--gm-safe-bottom));z-index:2}
 .guided-story .guided-buttons button{min-height:44px;font-size:13px}
 .gm-story-handle{display:block;width:100%;border:0;background:transparent;padding:0 0 8px;min-height:30px;color:#42626b;font-weight:700;font-size:12px}
 .gm-story-handle:before{content:'';display:block;width:42px;height:5px;border-radius:6px;background:#bdcece;margin:0 auto 7px}
 .guided-story.gm-expanded{max-height:min(77dvh,720px)!important}.guided-story.gm-minimized{max-height:125px!important;overflow:hidden}
 .guided-story.gm-minimized .guided-progress,.guided-story.gm-minimized [data-story-prose],.guided-story.gm-minimized [data-story-action],.guided-story.gm-minimized [data-story-hint],.guided-story.gm-minimized .guided-buttons,.guided-story.gm-minimized .radar-explainer,.guided-story.gm-minimized .guided-play-button,.guided-story.gm-minimized .guided-wave-button,.guided-story.gm-minimized .guided-caution{display:none!important}
 .guided-story.gm-minimized h2{margin:4px 0;font-size:16px}
 .point-panel{position:absolute!important;top:auto!important;bottom:calc(123px + var(--gm-safe-bottom));left:0!important;right:0!important;width:100%!important;height:auto!important;max-height:58dvh;overflow:auto;border-radius:20px 20px 0 0;padding:19px 18px 20px;z-index:28;box-shadow:0 -10px 30px #163b4947}
 .point-panel canvas{width:100%;height:180px}.point-panel .figures{margin:12px 0;gap:8px}.point-panel h2{font-size:20px}
 .timeline-panel{height:calc(123px + var(--gm-safe-bottom));padding:12px 13px calc(9px + var(--gm-safe-bottom));z-index:30}
 .timeline-head{gap:10px}.timeline-head strong{font-size:12px}.player button{min-width:39px;min-height:41px;padding:7px}.player #play{min-width:75px}#timeSlider{min-height:26px}
 .colour-legend{bottom:calc(182px + var(--gm-safe-bottom));left:9px;width:min(210px,56vw);padding:8px;z-index:5}.colour-legend .legend-top,.colour-legend .endpoints{font-size:10px}.colour-legend small{display:none}
 .map-zoom,.map-tools,.building-status,.geometry-hint{display:none!important}.settings-dialog{width:100vw;max-width:100vw}
 .settings-inner{padding:18px 16px calc(24px + var(--gm-safe-bottom))}.drawer-tabs{overflow-x:auto;scrollbar-width:thin;white-space:nowrap;padding-bottom:6px}.drawer-tabs button{min-height:42px;flex-shrink:0}.two-fields{grid-template-columns:1fr}
 .motion-notice{bottom:calc(130px + var(--gm-safe-bottom));font-size:10px}.toast{bottom:calc(145px + var(--gm-safe-bottom))}
 .gm-install{display:block;position:absolute;right:10px;top:10px;z-index:20;background:#fff;border:1px solid #cdd;border-radius:12px;padding:10px}.gm-install[hidden]{display:none!important}
}
@media(max-width:380px){.identity-word{font-size:11px}.topbar{padding:0 5px}.top-right .segmented button{padding:5px 6px}.gm-mobile-tools button{min-width:80px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}

.story-card:has(+ .guided-story:not([hidden])){display:none}
