/* Navigation uses the shared tokens; icon artwork is independent of the 48px hit area. */
body.app-shell-nav-mode #app-bottom-nav,body.my-page-mobile-mode #my-page-bottom-nav {grid-template-columns:repeat(5,minmax(0,1fr));gap:0;}
.app-bottom-nav-btn.app-bottom-nav-create .app-bottom-nav-icon {display:grid;place-items:center;width:24px;height:24px;border-radius:8px;background:#e5f0ec;color:#145c68;}
.app-bottom-nav-create .app-bottom-nav-label {font-size:11px;}
.app-bottom-nav-create svg {width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;}
.contribution-dialog {box-sizing:border-box;width:min(440px,calc(100% - 32px));max-height:calc(var(--mobile-visible-height,100dvh) - 32px);padding:16px;border:1px solid #d9e4de;border-radius:20px;background:var(--bm-paper,#fcfaf5);color:var(--bm-ink,#183e47);overscroll-behavior:contain;}
.contribution-dialog::backdrop {background:#183e4770;}
.contribution-dialog header {display:flex;align-items:center;gap:16px;margin-bottom:16px;}
.contribution-dialog h2 {flex:1;margin:0;font:700 20px/1.4 system-ui;}
.contribution-dialog button {min-height:48px;border:1px solid #72888c;border-radius:12px;background:#fff;color:#183e47;font:600 16px/1.5 system-ui;cursor:pointer;}
.contribution-dialog [data-contribution-close] {width:48px;flex:none;}
.contribution-dialog [data-contribution-choices] {display:grid;gap:12px;}
.contribution-dialog [data-contribution-action] {text-align:left;padding:12px 16px;}
.contribution-dialog :focus-visible,#map-heatmap-control:focus-visible {outline:3px solid #1c6370;outline-offset:3px;}
#current-location-fab #map-heatmap-control,#current-location-fab #current-location-fab-btn {box-sizing:border-box;display:grid;place-items:center;width:48px;height:48px;min-height:48px;padding:0;border:1px solid #d9e4de;border-radius:50%;background:linear-gradient(180deg,#ffffffed,#eef4f6ed);color:#183e47;box-shadow:0 2px 8px #183e4714;touch-action:manipulation;}
#map-heatmap-control svg {width:24px;height:24px;stroke:none;}
#current-location-fab #map-heatmap-control[aria-pressed=true] {background:#e5f0ec;border-color:#1c6370;box-shadow:0 0 0 2px #1c637033;}
#region-picker-trigger.needs-country {outline:3px solid #a64e2f;outline-offset:3px;animation:country-cue 600ms ease-in-out 2;}
@keyframes country-cue {50% {box-shadow:0 0 0 7px #a64e2f30;}}
@media(prefers-reduced-motion:reduce) {#region-picker-trigger.needs-country {animation:none;}}
#map-contribution-pick {position:static;z-index:360;top:calc(env(safe-area-inset-top,0px) + 150px);left:max(16px,env(safe-area-inset-left,0px));right:max(16px,env(safe-area-inset-right,0px));display:flex;align-items:center;gap:12px;padding:12px;border:1px solid #72888c;border-radius:12px;background:#fcfaf5;color:#183e47;font:400 14px/1.5 system-ui;}
#map-contribution-pick span {flex:1;}
#map-contribution-pick button {min-height:48px;padding:8px 12px;border:1px solid #72888c;border-radius:12px;background:#fff;color:#183e47;font:inherit;}
@media(max-height:500px) {.contribution-dialog {margin:16px auto;}.contribution-dialog [data-contribution-choices] {grid-template-columns:1fr 1fr;}#map-contribution-pick {top:calc(env(safe-area-inset-top,0px) + 76px);left:auto;width:min(360px,45vw);}}

#header #map-contribution-pick {position:static;box-sizing:border-box;width:100%;grid-column:1/-1;flex-basis:100%;margin-top:8px;}

/* Equal-height actions keep attribution clear of the fixed bar. */
body.app-shell-nav-mode #app-bottom-nav {box-sizing:border-box;height:var(--app-bottom-nav-height);}
body.app-shell-nav-mode #app-bottom-nav .app-bottom-nav-btn {min-height:48px;padding:3px 2px;}
body.app-shell-nav-mode #map-credits {max-width:calc(100vw - 24px);}
body.app-shell-nav-mode.protomaps-basemap #map-credits span {padding:0;}
body.app-shell-nav-mode #legal-stack {bottom:calc(var(--app-bottom-nav-height) + 12px);}

#current-location-fab.is-active #current-location-fab-btn {background:#e5f0ec;border-color:#1c6370;}
