#top-targeting-map .auth-gate{position:absolute;z-index:3000;inset:0;display:grid;place-items:center;padding:24px;background:linear-gradient(145deg,#eef8f6,#f8fbfa 48%,#e4f2ef);}
#top-targeting-map .auth-gate[hidden],#top-targeting-map .auth-user[hidden]{display:none;}
#top-targeting-map .auth-card{width:min(420px,100%);padding:34px;border:1px solid #b7cfca;border-radius:14px;background:#fff;box-shadow:0 18px 45px rgba(23,52,58,.16);text-align:center;}
#top-targeting-map .auth-brand{display:block;color:#0d7377;font-size:12px;font-weight:800;letter-spacing:.14em;}
#top-targeting-map .auth-card h1{margin:7px 0 8px;font-size:28px!important;}
#top-targeting-map .auth-card p{margin:0;color:#52666a;}
#top-targeting-map .google-signin-button{display:flex;justify-content:center;min-height:44px;margin-top:22px;}
#top-targeting-map .google-signin-button[aria-busy="true"]{pointer-events:none;opacity:.6;}
#top-targeting-map .auth-error{margin-top:16px!important;padding:10px;border-radius:6px;background:#fde8e7;color:#7a1b13!important;}

#top-targeting-map{position:relative;width:100%;height:100vh;min-height:640px;overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;color:#222;line-height:1.4;isolation:isolate;--app-header-h:52px;--app-header-total:calc(52px + env(safe-area-inset-top,0px));}
#top-targeting-map,#top-targeting-map *{box-sizing:border-box;}
#top-targeting-map h3{font-size:16px;font-weight:600;line-height:1.25;color:#222;}
#top-targeting-map input,#top-targeting-map select,#top-targeting-map textarea,#top-targeting-map button,#top-targeting-map label{font:inherit;color:inherit;}

/* App shell: the header and side panel are the only persistent chrome; everything else floats over the map. */
#top-targeting-map .app-header{position:absolute;top:0;left:0;right:0;z-index:1010;display:flex;align-items:center;gap:14px;height:var(--app-header-total);padding:env(safe-area-inset-top,0px) max(12px,env(safe-area-inset-right,0px)) 0 max(12px,env(safe-area-inset-left,0px));background:#fff;border-bottom:1px solid #d9e2e0;box-shadow:0 1px 4px rgba(0,0,0,.08);}
#top-targeting-map .app-title{display:flex;align-items:baseline;gap:8px;min-width:0;white-space:nowrap;}
#top-targeting-map .app-brand-mark{color:#0d7377;font-size:11px;font-weight:800;letter-spacing:.14em;}
#top-targeting-map .app-title h3{margin:0;overflow:hidden;text-overflow:ellipsis;}
#top-targeting-map .auth-user{display:flex;align-items:center;gap:9px;margin-left:auto;font-size:12px;}
#top-targeting-map .auth-user span{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#top-targeting-map .auth-user button{padding:5px 8px;border:1px solid #aaa;border-radius:5px;background:#fff;cursor:pointer;}
#top-targeting-map .auth-logout-icon{display:none;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}

#top-targeting-map #map{position:absolute;top:var(--app-header-total);right:0;bottom:0;left:0;}
#top-targeting-map .hoarding-focus-scrim{position:absolute;z-index:1100;inset:0;pointer-events:none;background:rgba(248,250,250,.33);opacity:0;visibility:hidden;transition:opacity .15s ease,visibility 0s linear .15s;}
#top-targeting-map.hoarding-form-open .hoarding-focus-scrim{opacity:1;visibility:visible;transition-delay:0s;}
#top-targeting-map #loading{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:2000;background:white;padding:16px 24px;border-radius:8px;box-shadow:0 2px 8px rgba(0,0,0,0.2);font-size:14px;}
#top-targeting-map .panel{position:absolute;z-index:1000;background:white;padding:12px 16px;border-radius:8px;box-shadow:0 2px 8px rgba(0,0,0,0.15);}

/* Tools panel: hoardings first, then the two guided flows and the plans list link. */
#top-targeting-map .tools-panel{position:absolute;top:calc(var(--app-header-total) + 10px);left:10px;z-index:1000;display:flex;flex-direction:column;width:222px;max-height:calc(100% - var(--app-header-total) - 80px);background:#fff;border-radius:8px;box-shadow:0 2px 8px rgba(0,0,0,0.15);}
#top-targeting-map .tools-panel.collapsed{width:auto;}
#top-targeting-map .tools-panel-toggle{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:11px 13px;border:0;border-radius:8px;background:transparent;font-size:13px;font-weight:700;text-align:left;cursor:pointer;}
#top-targeting-map .tools-panel-toggle svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .15s ease;}
#top-targeting-map .tools-panel-toggle[aria-expanded="false"] svg{transform:rotate(-90deg);}
#top-targeting-map .tools-panel-content{min-height:0;overflow-y:auto;padding:0 13px 13px;}
#top-targeting-map .tools-panel-content[hidden]{display:none;}
#top-targeting-map .tool-button{display:block;width:100%;margin-top:7px;padding:8px 10px;border:1px solid #bbb;border-radius:6px;background:#fff;cursor:pointer;font-size:13px;font-weight:600;text-align:center;}
#top-targeting-map .tool-button:hover{background:#f7f7f7;}
#top-targeting-map .tool-button-primary{border-color:#0d7377;background:#0d7377;color:#fff;}
#top-targeting-map .tool-button-primary:hover{background:#095d60;}
#top-targeting-map .tools-plans-link{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;margin-top:9px;padding:9px 2px 2px;border:0;border-top:1px solid #eee;background:transparent;font-size:13px;font-weight:600;cursor:pointer;text-align:left;}
#top-targeting-map .tools-plans-link:hover{color:#0d7377;}
#top-targeting-map .tools-plans-link svg{width:15px;height:15px;flex:0 0 auto;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
/* While a guided flow or the plans panel is open, the tools panel yields the corner. */
#top-targeting-map.flow-open .tools-panel,#top-targeting-map.plans-open .tools-panel{display:none;}
#top-targeting-map.flow-open .sa1-mode-status{display:none;}
#top-targeting-map.flow-open .coach-mark,#top-targeting-map.plans-open .coach-mark{display:none;}

/* First-run coach mark pointing at the walk-pack flow. */
#top-targeting-map .coach-mark{position:absolute;top:calc(var(--app-header-total) + 56px);left:246px;z-index:1300;max-width:250px;padding:11px 13px;border-radius:8px;background:#0d7377;color:#fff;font-size:12.5px;line-height:1.5;box-shadow:0 6px 18px rgba(0,0,0,.35);}
#top-targeting-map .coach-mark[hidden]{display:none;}
#top-targeting-map .coach-mark::before{content:"";position:absolute;left:-5px;top:18px;width:10px;height:10px;background:#0d7377;transform:rotate(45deg);}
#top-targeting-map .coach-mark button{display:block;margin-top:8px;padding:0;border:0;background:transparent;color:#c9ecea;font-size:11.5px;font-weight:700;cursor:pointer;}

/* Walk plans panel: replaces the tools panel while open. */
#top-targeting-map .plans-panel{position:absolute;top:calc(var(--app-header-total) + 10px);left:10px;z-index:1000;display:flex;flex-direction:column;width:284px;max-height:calc(100% - var(--app-header-total) - 80px);background:#fff;border-radius:8px;box-shadow:0 2px 8px rgba(0,0,0,0.15);}
#top-targeting-map .plans-panel[hidden]{display:none;}
#top-targeting-map .plans-panel-header{display:flex;align-items:center;gap:8px;padding:10px 13px 9px;border-bottom:1px solid #eee;}
#top-targeting-map .plans-panel-header h4{flex:1;margin:0;font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#5b6b6e;}
#top-targeting-map .plans-panel-header .button-primary{padding:5px 10px;border-radius:6px;font-size:12px;font-weight:700;cursor:pointer;}
#top-targeting-map .plans-back{display:grid;place-items:center;width:28px;height:28px;padding:0;border:1px solid transparent;border-radius:5px;background:#fff;color:#555;cursor:pointer;}
#top-targeting-map .plans-back:hover{border-color:#ccc;background:#f5f5f5;}
#top-targeting-map .plans-back svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
#top-targeting-map .plans-scope{display:flex;margin:10px 13px 0;border:1px solid #c9d4d3;border-radius:7px;overflow:hidden;}
#top-targeting-map .plans-scope button{flex:1;padding:7px 2px;border:0;background:#fff;color:#5b6b6e;font-size:12px;font-weight:700;cursor:pointer;}
#top-targeting-map .plans-scope button.on{background:#0d7377;color:#fff;}
#top-targeting-map .plans-panel-scroll{min-height:0;overflow-y:auto;padding:10px 13px 13px;}
#top-targeting-map .plan-detail{margin-top:12px;padding-top:10px;border-top:1px solid #ddd;}
#top-targeting-map .plan-detail[hidden]{display:none;}
/* A loaded plan's detail expands inside that plan's own card (the active
   list item, where sa1Assignments.ts places it) so it reads as part of the
   plan rather than as a separate block under the whole list. */
#top-targeting-map .sa1-plan-list li.active .plan-detail{margin:0;padding:2px 9px 10px;border-top:1px solid #e8edec;border-radius:0 0 7px 7px;background:#f8fbfa;}
#top-targeting-map .plan-detail h5{margin:0 0 8px;font-size:13px;}
#top-targeting-map .plan-detail-owner{margin:-4px 0 8px;font-size:12px;}
#top-targeting-map .plan-overlap-warning{margin:8px 0;padding:8px 9px;border:1px solid #b7791f;border-radius:5px;background:#fff8df;color:#6b4700;font-size:12px;}
#top-targeting-map .plan-overlap-warning[hidden]{display:none;}
#top-targeting-map .plan-lifecycle{display:flex;align-items:center;gap:6px;margin-bottom:9px;}
#top-targeting-map .lifecycle-step{flex:1;padding:6px 2px;border:1px dashed #d5dddf;border-radius:6px;background:#f1f4f4;color:#98a4a6;font-size:11.5px;font-weight:700;text-align:center;}
#top-targeting-map .lifecycle-step.done{border:1px solid #e69f00;background:#fdf1dc;color:#8a5c00;}
#top-targeting-map .lifecycle-step.done.lifecycle-assigned{border-color:#00796b;background:#e0f2f0;color:#00514a;}
#top-targeting-map .lifecycle-step.done.lifecycle-visited{border-color:#5b3fa6;background:#ece5f8;color:#432c7a;}
#top-targeting-map .lifecycle-arrow{color:#b9c4c6;font-weight:700;}
#top-targeting-map .plan-next-action{width:100%;margin-bottom:9px;padding:8px 10px;border-radius:6px;font-weight:700;cursor:pointer;}
#top-targeting-map .plan-edit-form{margin:2px 0 10px;padding:10px 11px;border:1px solid #cfd8d7;border-radius:7px;background:#f8fbfa;}
#top-targeting-map .plan-edit-form[hidden]{display:none;}
#top-targeting-map .plan-edit-form label{display:block;margin-top:8px;font-weight:600;font-size:12.5px;}
#top-targeting-map .plan-edit-form label:first-child{margin-top:0;}
#top-targeting-map .plan-edit-form input,#top-targeting-map .plan-edit-form textarea{display:block;width:100%;margin-top:3px;padding:7px 8px;border:1px solid #ccc;border-radius:5px;background:#fff;font:inherit;font-weight:400;resize:vertical;}
#top-targeting-map .plan-edit-form input[readonly]{background:#f3f4f4;color:#555;cursor:text;}
#top-targeting-map .plan-edit-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:9px;}
#top-targeting-map .plan-edit-actions button{padding:6px 12px;border-radius:5px;font-weight:600;cursor:pointer;}
#top-targeting-map .plan-detail-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px;}
#top-targeting-map .plan-detail-actions button{flex:1 1 45%;padding:7px 9px;border-radius:5px;cursor:pointer;font-weight:600;font-size:12px;}
#top-targeting-map .plan-detail-actions button:disabled{cursor:not-allowed;opacity:.55;}
#top-targeting-map .plan-delete-confirmation{margin-top:9px;padding:9px 10px;border:1px solid #d69e2e;border-radius:5px;background:#fff8e1;color:#5f4300;}
#top-targeting-map .plan-delete-confirmation[hidden]{display:none;}
#top-targeting-map .plan-delete-confirmation>strong{display:block;font-size:12px;}
#top-targeting-map .plan-delete-confirmation p{margin:5px 0 0;font-size:12px;line-height:1.4;}
#top-targeting-map .plan-delete-confirmation .plan-delete-error{color:#8a1c13;}
#top-targeting-map .plan-delete-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:8px;}
#top-targeting-map .plan-delete-actions button{padding:6px 12px;border-radius:5px;cursor:pointer;font-weight:600;font-size:12px;}
#top-targeting-map .plan-delete-actions button:disabled{cursor:wait;opacity:.65;}

/* Map display popover: layer toggles with their colour keys, plus meta/debug. */
#top-targeting-map .map-display-chip{left:10px;bottom:14px;z-index:1000;display:flex;align-items:center;gap:7px;padding:8px 13px;border:0;font-size:13px;font-weight:700;cursor:pointer;}
#top-targeting-map .map-display-chip svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
#top-targeting-map .map-display-chip[aria-expanded="true"]{color:#0d7377;}
#top-targeting-map .map-display{left:10px;bottom:58px;z-index:1010;display:flex;flex-direction:column;width:264px;max-height:calc(100% - var(--app-header-total) - 120px);overflow-y:auto;padding:12px 13px;}
#top-targeting-map .map-display[hidden]{display:none;}
#top-targeting-map .map-display h4{margin:0 0 4px;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#5b6b6e;}
#top-targeting-map .md-group{margin-top:8px;padding-top:8px;border-top:1px solid #f0f0f0;}
#top-targeting-map .md-group:first-of-type{margin-top:0;padding-top:0;border-top:0;}
#top-targeting-map .md-toggle{display:block;margin:2px 0;font-size:13px;font-weight:600;cursor:pointer;}
#top-targeting-map .md-group .legend-group{margin:3px 0 0 22px;}
#top-targeting-map .side-meta{margin-top:10px;padding-top:10px;border-top:1px solid #eee;}
#top-targeting-map .area-instruction{margin-bottom:6px;font-size:11px;color:#666;}

/* Guided-flow stepper cards. */
#top-targeting-map .flow-card{left:50%;right:auto;bottom:14px;transform:translateX(-50%);width:780px;max-width:calc(100vw - 20px);z-index:1150;padding:12px 16px;}
#top-targeting-map .flow-card[hidden]{display:none;}
#top-targeting-map .flow-steps{display:flex;align-items:center;margin:0 0 10px;padding:0;list-style:none;}
#top-targeting-map .flow-steps li{display:flex;align-items:center;gap:7px;font-weight:600;font-size:12.5px;color:#8a9799;}
#top-targeting-map .flow-steps li:not(:last-child)::after{content:"";flex:1;min-width:24px;height:2px;margin:0 10px;background:#d5dddf;}
#top-targeting-map .flow-steps li.done::after{background:#0d7377;}
#top-targeting-map .flow-steps li:not(:last-child){flex:1;}
#top-targeting-map .flow-dot{display:grid;place-items:center;width:22px;height:22px;flex:0 0 auto;border:2px solid #c3ced0;border-radius:50%;background:#fff;font-size:11px;font-weight:800;color:#8a9799;}
#top-targeting-map .flow-steps li.active{color:#173a3c;}
#top-targeting-map .flow-steps li.active .flow-dot{border-color:#0d7377;color:#0d7377;}
#top-targeting-map .flow-steps li.done{color:#0d7377;}
#top-targeting-map .flow-steps li.done .flow-dot{border-color:#0d7377;background:#0d7377;color:#fff;}
#top-targeting-map .flow-pane[hidden]{display:none;}
#top-targeting-map .flow-pane>b{font-size:13.5px;}
#top-targeting-map .flow-muted{color:#666;font-size:11.5px;font-weight:400;}
#top-targeting-map .flow-count{display:inline-block;margin-left:8px;padding:2px 9px;border-radius:999px;background:#e0f2f0;color:#00514a;font-weight:700;font-size:12px;}
#top-targeting-map .flow-row{display:flex;align-items:center;gap:12px;margin-top:7px;}
#top-targeting-map .flow-search{position:relative;flex:0 1 300px;}
#top-targeting-map .flow-search input{width:100%;padding:7px 10px;border:1px solid #ccc;border-radius:5px;font:inherit;}
#top-targeting-map .flow-search #plan-flow-search-results{position:absolute;bottom:calc(100% + 4px);left:0;right:0;z-index:1160;background:#fff;border:1px solid #ddd;border-radius:6px;overflow:hidden;display:none;box-shadow:0 4px 8px rgba(0,0,0,.1);max-height:280px;overflow-y:auto;}
#top-targeting-map .flow-fields{display:flex;gap:12px;margin-top:7px;}
#top-targeting-map .flow-fields label{flex:1;display:block;font-weight:600;font-size:12.5px;}
#top-targeting-map .flow-fields input,#top-targeting-map .flow-fields textarea{display:block;width:100%;margin-top:3px;padding:7px 8px;border:1px solid #ccc;border-radius:5px;background:#fff;font:inherit;font-weight:400;resize:none;}
#top-targeting-map .flow-radio-pills{display:flex;gap:7px;margin:0;padding:0;border:0;align-self:flex-end;}
#top-targeting-map .radio-pill{display:inline-flex;align-items:center;gap:6px;padding:7px 13px;border:1px solid #bbb;border-radius:999px;background:#fff;font-weight:600;font-size:12.5px;cursor:pointer;}
#top-targeting-map .radio-pill:has(input:checked){border-color:#0d7377;background:#e6f4f4;color:#0d7377;box-shadow:0 0 0 1px #0d7377 inset;}
#top-targeting-map .radio-pill input{margin:0;}
#top-targeting-map .flow-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px;margin-top:11px;}
#top-targeting-map .flow-actions button{padding:7px 14px;border-radius:5px;cursor:pointer;font-weight:600;}
#top-targeting-map .flow-actions .button-quiet{margin-right:auto;}
#top-targeting-map .button-quiet{border:1px solid transparent;background:transparent;color:#0d7377;font-weight:700;cursor:pointer;}
#top-targeting-map .button-quiet:hover{text-decoration:underline;}
#top-targeting-map .link-button{padding:0;border:0;background:transparent;color:#0d7377;font-size:11.5px;font-weight:600;text-decoration:underline;text-underline-offset:2px;cursor:pointer;}
#top-targeting-map .visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;}
#top-targeting-map .legend-item{display:flex;align-items:center;margin:4px 0;font-size:12px;}
#top-targeting-map .legend-color{width:16px;height:16px;border-radius:3px;margin-right:8px;border:1px solid rgba(0,0,0,0.2);}
#top-targeting-map .legend-low-confidence{background:repeating-linear-gradient(45deg,#fff,#fff 3px,#999 3px,#999 6px);}
#top-targeting-map .legend-group{margin-top:10px;font-size:12px;}
#top-targeting-map .legend-group[hidden]{display:none;}
#top-targeting-map .legend-group:first-child{margin-top:0;}
#top-targeting-map .legend-group>b{display:block;margin-bottom:2px;}
#top-targeting-map .legend-group-sa1 .legend-color{width:12px;height:12px;margin-right:6px;}
#top-targeting-map .sa1-visit-fade-note{margin-top:3px;color:#666;font-size:11px;}
#top-targeting-map.hoardings-hidden #new-hoarding{display:none;}
#top-targeting-map.hoardings-hidden .legend-group-hoardings{display:none;}

#top-targeting-map .maplibregl-popup-content{font-size:13px;padding:10px 14px;}
#top-targeting-map .popup-score{font-size:18px;font-weight:bold;color:#0d7377;}
#top-targeting-map .popup-warn{color:#e67e22;font-size:11px;margin-top:4px;}
#top-targeting-map .search-panel{position:relative;flex:1 1 auto;max-width:340px;margin:0 auto;}
#top-targeting-map #search{width:100%;border:1px solid #ddd;border-radius:6px;padding:7px 10px;font-size:13px;outline:none;box-sizing:border-box;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat 8px center;padding-left:28px;}
#top-targeting-map #search:focus{border-color:#0d7377;box-shadow:0 0 0 2px rgba(13,115,119,0.15);}
#top-targeting-map #search-results{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:1020;background:white;border:1px solid #ddd;border-radius:6px;overflow:hidden;display:none;box-shadow:0 4px 8px rgba(0,0,0,0.1);max-height:280px;overflow-y:auto;touch-action:manipulation;}
#top-targeting-map .sa1-mode-status{right:auto;bottom:30px;left:50%;z-index:990;display:flex;align-items:center;gap:12px;max-width:calc(100% - 40px);padding:7px 8px 7px 13px;transform:translateX(-50%);border:1px solid rgba(13,115,119,.25);white-space:nowrap;}
#top-targeting-map .sa1-mode-status[hidden]{display:none;}
#top-targeting-map #sa1-mode-label{max-width:min(260px,42vw);overflow:hidden;text-overflow:ellipsis;font-size:13px;font-weight:600;}
#top-targeting-map #back-to-sa2{display:flex;align-items:center;gap:4px;padding:6px 9px;border:1px solid #0d7377;border-radius:6px;background:#0d7377;color:#fff;cursor:pointer;font-weight:600;}
#top-targeting-map #back-to-sa2:hover{background:#095d60;}
#top-targeting-map #back-to-sa2:focus-visible{outline:3px solid rgba(13,115,119,.3);outline-offset:2px;}
#top-targeting-map #back-to-sa2 svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
#top-targeting-map .sr-item{padding:8px 12px;cursor:pointer;border-bottom:1px solid #f0f0f0;touch-action:manipulation;}
#top-targeting-map .sr-item:last-child{border-bottom:none;}
#top-targeting-map .sr-item:hover,#top-targeting-map .sr-item.active{background:#f0fafa;}
#top-targeting-map .sr-name{font-weight:600;font-size:13px;}
#top-targeting-map .sr-sub{font-size:11px;color:#888;margin-top:1px;}
#top-targeting-map .sr-tier{display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:4px;vertical-align:middle;}
#top-targeting-map .sr-cand{background:#0d7377;border-radius:50%;border:1px solid #fff;box-shadow:0 0 0 1px #0d7377;}
#top-targeting-map .popup-cand-suburbs{margin-top:8px;border-top:1px solid #eee;padding-top:6px;max-height:180px;overflow-y:auto;}
#top-targeting-map .popup-cand-suburb,#top-targeting-map .popup-breakdown>div{display:flex;justify-content:space-between;padding:2px 0;}
#top-targeting-map .popup-cand-tier,#top-targeting-map .popup-breakdown>div>:last-child{margin-left:12px;font-weight:600;}
#top-targeting-map .popup-muted{color:#666;font-size:11px;}
#top-targeting-map .popup-breakdown{margin-top:2px;font-size:12px;}
#top-targeting-map #debug-toggle{color:#888;font-size:11px;cursor:pointer;-webkit-user-select:none;user-select:none;}
#top-targeting-map #debug-toggle:hover{color:#555;}
#top-targeting-map #debug-panel{font-size:11px;color:#444;margin-top:4px;line-height:1.9;border-top:1px solid #eee;padding-top:4px;}
#top-targeting-map #debug-panel{display:none;}
#top-targeting-map #dbg-sources{margin-top:4px;border-top:1px solid #eee;padding-top:4px;}
#top-targeting-map .hoarding-legend-toggle{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;padding:0;border:0;background:transparent;font-size:12px;font-weight:700;text-align:left;cursor:pointer;}
#top-targeting-map .hoarding-legend-toggle svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .15s ease;}
#top-targeting-map .hoarding-legend-toggle[aria-expanded="false"] svg{transform:rotate(-90deg);}
#top-targeting-map #hoarding-legend-content[hidden]{display:none;}
#top-targeting-map #hoarding-legend-content{margin-top:4px;font-size:11px;}
#top-targeting-map .hoarding-legend-item{display:flex;align-items:center;gap:7px;margin-top:3px;}
#top-targeting-map .hoarding-legend-marker{--hoarding-color:#e83e8c;position:relative;width:22px;height:22px;flex:0 0 auto;}
#top-targeting-map .hoarding-legend-marker::before{content:"OPP";position:absolute;top:1px;left:1px;display:grid;place-items:center;width:20px;height:12px;border:2px solid #fff;border-radius:1px;background:var(--hoarding-color);box-shadow:0 0 0 1px rgba(0,0,0,.3);color:#fff;font-size:6px;font-weight:800;line-height:1;z-index:2;}
#top-targeting-map .hoarding-legend-marker::after{content:"";position:absolute;top:13px;bottom:0;left:50%;width:3px;transform:translateX(-50%);background:#374151;box-shadow:0 0 0 1px #fff;z-index:1;}
#top-targeting-map .hoarding-legend-issue{display:grid;place-items:center;width:14px;height:14px;border:2px solid #fff;border-radius:50%;background:#b42318;color:#fff;font-size:10px;font-weight:700;line-height:1;box-shadow:0 0 0 1px rgba(0,0,0,.25);}
#top-targeting-map .hoarding-legend-notified{display:grid;place-items:center;width:14px;height:14px;border:2px solid #fff;border-radius:50%;background:#176b3a;color:#fff;font-size:9px;font-weight:700;line-height:1;box-shadow:0 0 0 1px rgba(0,0,0,.25);}
#top-targeting-map .hoarding-tool{display:flex;align-items:center;gap:8px;width:100%;padding:7px 9px;border:1px solid #bbb;border-radius:6px;background:#fff;cursor:grab;font-weight:600;white-space:nowrap;font-size:13px;}
#top-targeting-map .hoarding-tool:active{background:#f7f7f7;cursor:grabbing;}
#top-targeting-map .hoarding-tool.placing{box-shadow:0 0 0 3px rgba(232,62,140,.3);}
#top-targeting-map .hoarding-tool-marker{--hoarding-color:#e83e8c;position:relative;display:block;width:32px;height:34px;flex:0 0 auto;border:0;background:transparent;box-shadow:none;}
#top-targeting-map .hoarding-tool-marker::before{content:"OPP";position:absolute;top:0;left:1px;right:1px;display:grid;place-items:center;height:20px;border:3px solid #fff;border-radius:2px;background:var(--hoarding-color);box-shadow:0 0 0 1px rgba(0,0,0,.3),0 2px 5px rgba(0,0,0,.3);color:#fff;font-size:9px;font-weight:800;line-height:1;z-index:2;}
#top-targeting-map .hoarding-tool-marker::after{content:"";position:absolute;top:21px;bottom:0;left:50%;width:4px;transform:translateX(-50%);background:#374151;box-shadow:0 0 0 1px #fff;z-index:1;}
#top-targeting-map .hoarding-draft-marker,#top-targeting-map .hoarding-edit-origin-marker{--hoarding-color:#e83e8c;position:relative;display:block;width:0;height:0;border:0;background:transparent;box-shadow:none;}
#top-targeting-map .hoarding-draft-marker::before,#top-targeting-map .hoarding-edit-origin-marker::before{content:"OPP";position:absolute;left:-36px;bottom:32px;display:grid;place-items:center;width:68px;height:40px;border:6px solid #fff;border-radius:4px;background:var(--hoarding-color);box-shadow:0 0 0 1px rgba(0,0,0,.3),0 3px 7px rgba(0,0,0,.3);color:#fff;font-size:18px;font-weight:800;line-height:1;z-index:2;}
#top-targeting-map .hoarding-draft-marker::after,#top-targeting-map .hoarding-edit-origin-marker::after{content:"";position:absolute;left:-4px;bottom:0;width:8px;height:32px;background:#374151;box-shadow:0 0 0 2px #fff;z-index:1;}
#top-targeting-map .hoarding-draft-marker{cursor:grab;}
#top-targeting-map.hoarding-form-open .hoarding-draft-marker{z-index:1150;filter:drop-shadow(0 0 3px rgba(255,255,255,.95));}
#top-targeting-map .hoarding-edit-origin-marker::before{border:6px dashed var(--hoarding-color);background:rgba(255,255,255,.75);box-shadow:0 0 0 1px rgba(0,0,0,.25);color:var(--hoarding-color);}
#top-targeting-map .hoarding-edit-origin-marker::after{background:var(--hoarding-color);opacity:.65;}
#top-targeting-map .hoarding-draft-marker:active{cursor:grabbing;}
#top-targeting-map.hoardings-hidden .hoarding-draft-marker,#top-targeting-map.hoardings-hidden .hoarding-edit-origin-marker{display:none;}
#top-targeting-map .drawer{position:absolute;z-index:1200;top:calc(var(--app-header-total) + 10px);right:10px;bottom:10px;width:390px;max-width:calc(100vw - 20px);overflow:hidden;border:1px solid #aaa;border-radius:9px;background:#fff;box-shadow:0 5px 20px rgba(0,0,0,.25);}
#top-targeting-map .drawer[hidden]{display:none;}
#top-targeting-map .drawer-form{display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;width:100%;height:100%;font-size:13px;}
#top-targeting-map .drawer-form-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:14px 16px 12px;border-bottom:1px solid #ddd;background:#fff;}
#top-targeting-map .drawer-form-heading h3{margin:0;}
#top-targeting-map .drawer-form-heading span{display:block;margin-top:2px;color:#666;font-size:11px;}
#top-targeting-map .drawer-close{display:grid;place-items:center;width:30px;height:30px;flex:0 0 auto;padding:0;border:1px solid transparent;border-radius:5px;background:#fff;color:#555;font-size:24px;line-height:1;cursor:pointer;}
#top-targeting-map .drawer-close:hover{border-color:#ccc;background:#f5f5f5;}
#top-targeting-map .drawer-form-scroll{min-height:0;overflow-y:auto;padding:12px 16px 20px;}
#top-targeting-map .hoarding-record-id{margin:0 0 10px;padding:8px 10px;border:1px solid #ccc;border-radius:5px;background:#f8f8f8;}
#top-targeting-map .hoarding-record-id[hidden]{display:none;}
#top-targeting-map .hoarding-record-id span{display:block;margin-bottom:2px;color:#555;font-size:11px;font-weight:600;}
#top-targeting-map .hoarding-record-id code{display:block;overflow-wrap:anywhere;color:#222;font-size:12px;-webkit-user-select:all;user-select:all;}
#top-targeting-map .drawer-required-note{margin:0 0 6px;color:#666;font-size:11px;}
#top-targeting-map .required-marker{color:#b42318;font-weight:700;}
#top-targeting-map .drawer-form label{display:block;margin-top:9px;font-weight:600;}
#top-targeting-map .drawer-form input,#top-targeting-map .drawer-form select,#top-targeting-map .drawer-form textarea{display:block;width:100%;margin-top:3px;padding:7px 8px;border:1px solid #ccc;border-radius:5px;background:#fff;font-weight:400;}
#top-targeting-map .drawer-form [aria-invalid="true"]{border-color:#b42318;box-shadow:0 0 0 2px rgba(180,35,24,.12);}
#top-targeting-map .drawer-form textarea{resize:vertical;}
#top-targeting-map .hoarding-guide{margin:7px 0 0;}
#top-targeting-map .hoarding-guide-button{display:inline-flex;align-items:center;gap:5px;padding:2px 0;border:0;background:transparent;color:#0d7377!important;font-size:12px;font-weight:600;text-decoration:underline;text-underline-offset:2px;}
#top-targeting-map .hoarding-guide-button:hover{color:#095f62!important;}
#top-targeting-map .hoarding-guide-button:focus-visible{outline:2px solid #0d7377;outline-offset:2px;}
#top-targeting-map .hoarding-guide-button svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
#top-targeting-map .hoarding-guide[hidden],#top-targeting-map .drawer-form-section[hidden]{display:none;}
#top-targeting-map .drawer-form-section{margin-top:11px;border:1px solid #ccc;border-radius:6px;background:#fff;}
#top-targeting-map .drawer-form-section summary{position:relative;padding:9px 30px 9px 11px;cursor:pointer;list-style:none;background:#f8f8f8;border-radius:6px;}
#top-targeting-map .drawer-form-section summary::-webkit-details-marker{display:none;}
#top-targeting-map .drawer-form-section summary::after{content:"›";position:absolute;top:50%;right:11px;transform:translateY(-50%) rotate(90deg);color:#666;font-size:20px;line-height:1;}
#top-targeting-map .drawer-form-section[open] summary{border-bottom:1px solid #ddd;border-radius:6px 6px 0 0;}
#top-targeting-map .drawer-form-section[open] summary::after{transform:translateY(-50%) rotate(-90deg);}
#top-targeting-map .drawer-form-section summary>span{display:block;font-weight:700;}
#top-targeting-map .drawer-form-section summary>small{display:block;overflow:hidden;margin-top:1px;color:#666;font-size:11px;font-weight:400;text-overflow:ellipsis;white-space:nowrap;}
#top-targeting-map .drawer-section-body{padding:1px 11px 12px;}
#top-targeting-map .drawer-section-body>small{display:block;margin-top:6px;color:#666;line-height:1.3;}
#top-targeting-map .hoarding-current-issues-followup{margin-top:9px;padding:9px;border:1px solid #d69e2e;border-radius:5px;background:#fff8e1;}
#top-targeting-map .hoarding-current-issues-followup[hidden]{display:none;}
#top-targeting-map .hoarding-issue-updated{color:#66531a;font-size:11px;}
#top-targeting-map .drawer-form .drawer-checkbox{display:flex;align-items:flex-start;gap:7px;font-weight:400;line-height:1.35;}
#top-targeting-map .drawer-form .drawer-checkbox input{width:auto;margin:2px 0 0;flex:0 0 auto;}
#top-targeting-map .drawer-form-row{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
#top-targeting-map .hoarding-coordinates{display:flex;justify-content:space-between;gap:8px;margin-top:10px;color:#666;font-size:11px;}
#top-targeting-map .hoarding-created{margin-top:6px;color:#666;font-size:11px;}
#top-targeting-map .drawer-form-errors{margin:0 0 10px;padding:9px 10px;border:1px solid #b42318;border-radius:6px;background:#fde8e7;color:#7a1b13;}
#top-targeting-map .drawer-form-errors[hidden]{display:none;}
#top-targeting-map .drawer-form-errors ul{margin:5px 0 0;padding-left:18px;}
#top-targeting-map .hoarding-conflict-warning{margin-top:12px;padding:10px;border:1px solid #d69e2e;border-radius:6px;background:#fff8e1;color:#5f4300;}
#top-targeting-map .hoarding-conflict-warning[hidden]{display:none;}
#top-targeting-map .hoarding-conflict-warning strong{display:block;}
#top-targeting-map .hoarding-conflict-warning ul{margin:6px 0;padding-left:20px;}
#top-targeting-map .hoarding-conflict-warning p{margin:6px 0 0;line-height:1.35;}
#top-targeting-map .hoarding-discard-warning{display:flex;align-items:center;justify-content:flex-end;gap:7px;padding:9px 16px;border-top:1px solid #d69e2e;background:#fff8e1;}
#top-targeting-map .hoarding-discard-warning[hidden]{display:none;}
#top-targeting-map .hoarding-discard-warning span{margin-right:auto;font-weight:600;color:#5f4300;}
#top-targeting-map .hoarding-discard-warning button{padding:6px 9px;border-radius:5px;cursor:pointer;font-weight:600;}
#top-targeting-map .drawer-form-actions{display:flex;justify-content:flex-end;gap:8px;margin:0;padding:11px 16px;border-top:1px solid #ddd;background:#fff;}
#top-targeting-map .drawer-form-actions button{padding:7px 14px;border-radius:5px;cursor:pointer;font-weight:600;}
#top-targeting-map .button-primary{border:1px solid #0d7377;background:#0d7377;color:#fff!important;}
#top-targeting-map .button-secondary{border:1px solid #bbb;background:#fff;}
#top-targeting-map .hoarding-site-popup{min-width:190px;}
#top-targeting-map .hoarding-site-popup>strong,#top-targeting-map .hoarding-delete-confirmation>strong{display:block;margin-bottom:4px;}
#top-targeting-map .hoarding-popup-issue{margin-top:7px;padding:4px 7px;border-radius:4px;background:#fde8e7;color:#8a1c13;font-weight:600;}
#top-targeting-map .hoarding-popup-manager-notified{display:inline-block;margin-left:7px;color:#176b3a;}
#top-targeting-map .hoarding-popup-actions{display:flex;justify-content:flex-end;align-items:center;gap:7px;margin-top:10px;}
#top-targeting-map .hoarding-popup-actions button{min-height:32px;padding:5px 11px;border-radius:5px;cursor:pointer;font-weight:600;}
#top-targeting-map .hoarding-popup-actions button:disabled{cursor:wait;opacity:.65;}
#top-targeting-map .button-danger{border:1px solid #b42318;background:#b42318;color:#fff;}
#top-targeting-map .hoarding-edit-button{display:inline-flex;align-items:center;gap:6px;}
#top-targeting-map .hoarding-edit-button svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
#top-targeting-map .hoarding-trash-button{display:inline-flex;align-items:center;justify-content:center;width:34px;padding:5px!important;border:1px solid #b42318;background:#fff;color:#b42318;}
#top-targeting-map .hoarding-trash-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
#top-targeting-map .hoarding-photo-gallery{display:flex;flex-wrap:wrap;gap:10px;}
#top-targeting-map .hoarding-photo-gallery figure{position:relative;width:84px;margin:0;}
#top-targeting-map .hoarding-photo-open{display:block;width:84px;height:84px;padding:0;border:0;border-radius:5px;background:none;cursor:zoom-in;}
#top-targeting-map .hoarding-photo-open:focus-visible{outline:3px solid #0d7377;outline-offset:2px;}
#top-targeting-map .hoarding-photo-open img{display:block;width:84px;height:84px;object-fit:cover;border:1px solid #ddd;border-radius:5px;box-sizing:border-box;}
#top-targeting-map .hoarding-photo-delete{position:absolute;top:3px;right:3px;display:grid;place-items:center;width:20px;height:20px;padding:0;border:1px solid #b42318;border-radius:3px;background:#fff;color:#b42318;cursor:pointer;}
#top-targeting-map .hoarding-photo-status{margin:0 0 10px;color:#444;font-size:12.5px;}
#top-targeting-map .hoarding-photo-status[hidden]{display:none;}
/* Full-size photo viewer controls overlay the image to preserve as much viewing area as possible. */
#top-targeting-map .hoarding-photo-lightbox{position:relative;width:min(92vw,1100px);max-width:none;padding:0;border:0;border-radius:8px;background:#111;color:#fff;box-shadow:0 18px 60px rgba(0,0,0,.45);overflow:hidden;}
#top-targeting-map .hoarding-photo-lightbox::backdrop{background:rgba(0,0,0,.78);}
#top-targeting-map .hoarding-photo-lightbox>img{display:block;width:100%;max-height:90vh;object-fit:contain;}
#top-targeting-map .hoarding-photo-lightbox-actions{position:absolute;top:10px;right:10px;display:flex;gap:7px;}
#top-targeting-map .hoarding-photo-lightbox-action{display:grid;place-items:center;width:38px;height:38px;padding:0;border:1px solid rgba(255,255,255,.7);border-radius:5px;box-sizing:border-box;background:rgba(17,17,17,.78);color:#fff;cursor:pointer;text-decoration:none;}
#top-targeting-map .hoarding-photo-lightbox-action:hover{background:rgba(17,17,17,.95);}
#top-targeting-map .hoarding-photo-lightbox-action:focus-visible{outline:3px solid #fff;outline-offset:2px;}
#top-targeting-map .hoarding-photo-lightbox-action svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
#top-targeting-map .hoarding-photo-lightbox-navigation{position:absolute;top:50%;display:grid;place-items:center;width:44px;height:56px;padding:0;border:0;border-radius:5px;background:rgba(17,17,17,.65);color:#fff;cursor:pointer;transform:translateY(-50%);}
#top-targeting-map .hoarding-photo-lightbox-navigation[hidden]{display:none;}
#top-targeting-map .hoarding-photo-lightbox-navigation:hover{background:rgba(17,17,17,.9);}
#top-targeting-map .hoarding-photo-lightbox-navigation:focus-visible{outline:3px solid #fff;outline-offset:2px;}
#top-targeting-map .hoarding-photo-lightbox-navigation svg{width:30px;height:30px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
#top-targeting-map .hoarding-photo-lightbox-previous{left:10px;}
#top-targeting-map .hoarding-photo-lightbox-next{right:10px;}
/* JavaScript supplies the pointer offset so the clamped mobile popover still identifies its photo. */
#top-targeting-map .hoarding-photo-delete-confirmation{position:fixed;z-index:1400;width:min(280px,calc(100vw - 16px));padding:14px;border:1px solid #bbb;border-radius:7px;box-sizing:border-box;background:#fff;color:#222;box-shadow:0 6px 20px rgba(0,0,0,.3);}
#top-targeting-map .hoarding-photo-delete-confirmation[hidden]{display:none;}
#top-targeting-map .hoarding-photo-delete-confirmation::after{position:absolute;left:var(--photo-delete-arrow-left,50%);width:12px;height:12px;border-right:1px solid #bbb;border-bottom:1px solid #bbb;background:#fff;content:'';}
#top-targeting-map .hoarding-photo-delete-confirmation[data-placement='above']::after{bottom:-7px;transform:translateX(-50%) rotate(45deg);}
#top-targeting-map .hoarding-photo-delete-confirmation[data-placement='below']::after{top:-7px;transform:translateX(-50%) rotate(225deg);}
#top-targeting-map .hoarding-photo-delete-confirmation>strong{display:block;font-size:1.05rem;}
#top-targeting-map .hoarding-photo-delete-confirmation p{margin:8px 0 0;line-height:1.4;}
#top-targeting-map .hoarding-photo-delete:disabled{cursor:wait;opacity:.65;}
#top-targeting-map .hoarding-delete-confirmation{max-width:260px;}
#top-targeting-map .hoarding-delete-confirmation p{margin:6px 0 0;line-height:1.35;}
#top-targeting-map .drawer-fieldset{margin:9px 0 0;padding:6px 11px 10px;border:1px solid #ccc;border-radius:6px;font-size:12.5px;}
#top-targeting-map .drawer-fieldset legend{padding:0 3px;font-weight:600;}
#top-targeting-map .sa1-previous-plans{margin-top:10px;}
#top-targeting-map .sa1-previous-plans[hidden]{display:none;}
#top-targeting-map .sa1-previous-plans summary{cursor:pointer;font-size:12px;color:#555;user-select:none;}
#top-targeting-map .sa1-previous-plans[open] summary{margin-bottom:6px;}
#top-targeting-map .sa1-plan-picker-status{color:#666;font-size:12px;font-weight:400;}
#top-targeting-map .sa1-plan-picker-status[hidden]{display:none;}
#top-targeting-map .sa1-plan-list{margin:8px 0 0;padding:0;list-style:none;}
#top-targeting-map .sa1-plan-list li{margin-top:6px;border:1px solid #ccc;border-radius:7px;background:#fff;}
#top-targeting-map .sa1-plan-list li:first-child{margin-top:0;}
#top-targeting-map .sa1-plan-list li.active{border-color:#0d7377;box-shadow:0 0 0 2px rgba(13,115,119,.2);}
#top-targeting-map .sa1-plan-card-actions{display:flex;gap:7px;padding:0 9px 8px;}
#top-targeting-map .sa1-plan-card-actions button{padding:6px 11px;border-radius:5px;font-size:12px;font-weight:700;cursor:pointer;}
#top-targeting-map .sa1-plan-list-item{display:block;width:100%;margin:0;padding:7px 9px;border:0;border-radius:7px;background:transparent;cursor:pointer;text-align:left;font-size:12px;font-weight:400;}
#top-targeting-map .sa1-plan-list-item:hover{background:#f7f7f7;}
#top-targeting-map .sa1-plan-list-item:focus-visible{outline:2px solid #0d7377;outline-offset:1px;}
#top-targeting-map .sa1-plan-list-name{display:block;font-weight:600;}
#top-targeting-map .sa1-plan-list-meta{display:flex;align-items:center;gap:6px;margin-top:3px;color:#666;font-weight:400;}
#top-targeting-map .sa1-plan-status-badge{display:inline-block;padding:1px 7px;border-radius:10px;border:1px solid #bbb;background:#f2f2f2;font-size:11px;font-weight:600;color:#333;}
#top-targeting-map .sa1-plan-status-badge.sa1-plan-status-planned{border-color:#e69f00;background:#fdf1dc;color:#8a5c00;}
#top-targeting-map .sa1-plan-status-badge.sa1-plan-status-assigned{border-color:#00796b;background:#e0f2f0;color:#00514a;}
#top-targeting-map .sa1-plan-status-badge.sa1-plan-status-visited{border-color:#5b3fa6;background:#ece5f8;color:#432c7a;}
#top-targeting-map .sa1-plan-status-badge.sa1-plan-status-none{border-style:dashed;color:#777;}
#top-targeting-map #sa1-plan-mark-visited .button-primary{margin-top:8px;width:100%;border-radius:5px;padding:7px 10px;cursor:pointer;font-weight:700;}
#top-targeting-map .sa1-share-status{margin-top:8px;padding:7px 9px;border:1px solid #0d7377;border-radius:5px;background:#e6f4f4;font-size:12px;overflow-wrap:anywhere;}
#top-targeting-map .sa1-share-copy-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:6px;}
#top-targeting-map .sa1-share-copy-input{min-width:0;flex:1 1 220px;padding:6px 7px;border:1px solid #aebdbc;border-radius:4px;background:#fff;font:inherit;}
#top-targeting-map .sa1-share-copy-row button{flex:0 0 auto;padding:6px 9px;border-radius:4px;cursor:pointer;}
#top-targeting-map .sa1-share-open-link{flex:0 0 auto;color:#075f63;font-weight:700;}
#top-targeting-map .sa1-share-links{margin-top:10px;}
#top-targeting-map .sa1-share-links h4{margin:0 0 4px;font-size:12px;}
#top-targeting-map .sa1-share-links ul{margin:0;padding:0;list-style:none;}
#top-targeting-map .sa1-share-links li{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:5px 0;font-size:12px;}
#top-targeting-map .sa1-share-links li span{flex:1 1 100%;min-width:0;overflow-wrap:anywhere;}
#top-targeting-map .sa1-share-links li button{padding:2px 8px;border:1px solid #777;border-radius:4px;background:#fff;cursor:pointer;font-size:11px;font-weight:600;}
#top-targeting-map .sa1-share-links li button:disabled{cursor:wait;opacity:.65;}
#top-targeting-map .sa1-popup-entries{margin-top:8px;border-top:1px solid #eee;padding-top:6px;max-height:180px;overflow-y:auto;}
#top-targeting-map .sa1-popup-section-title{margin:10px 0 4px;padding-top:8px;border-top:1px solid #ddd;font-size:12px;}
#top-targeting-map .sa1-popup-section-title + .sa1-popup-entries{margin-top:0;border-top:0;padding-top:0;}
#top-targeting-map .sa1-popup-plan-list{display:grid;gap:4px;margin-bottom:6px;max-height:145px;overflow-y:auto;}
#top-targeting-map .sa1-popup-plan-link{padding:5px 7px;border:1px solid #bbb;border-radius:4px;background:#fff;cursor:pointer;text-align:left;font-size:11px;}
#top-targeting-map .sa1-popup-plan-link:hover{border-color:#0d7377;background:#f0f8f8;}
#top-targeting-map .sa1-popup-entry{display:grid;grid-template-columns:minmax(0,1fr) 20px;grid-template-areas:"detail delete" "name delete";column-gap:8px;row-gap:1px;padding:3px 0;}
#top-targeting-map .sa1-popup-detail{grid-area:detail;min-width:0;overflow-wrap:anywhere;}
#top-targeting-map .sa1-popup-recorded-by{grid-area:name;min-width:0;overflow-wrap:anywhere;}
#top-targeting-map .sa1-popup-delete{grid-area:delete;align-self:center;display:grid;place-items:center;width:20px;height:20px;padding:0;border:1px solid #b42318;border-radius:3px;background:#fff;color:#b42318;cursor:pointer;line-height:1;}
#top-targeting-map .sa1-popup-delete:disabled{cursor:wait;opacity:.65;}
#top-targeting-map .sa1-popup-delete-confirmation{grid-column:1/-1;margin-top:5px;padding:7px 8px;border:1px solid #d69e2e;border-radius:5px;background:#fff8e1;}
#top-targeting-map .sa1-popup-delete-confirmation>span{display:block;color:#5f4300;font-weight:600;}
#top-targeting-map .sa1-popup-delete-actions{display:flex;justify-content:flex-end;gap:6px;margin-top:6px;}
#top-targeting-map .sa1-popup-delete-actions button{min-height:28px;padding:4px 9px;border-radius:4px;cursor:pointer;font-size:11px;font-weight:600;}
#top-targeting-map .sa1-popup-delete-actions button:disabled{cursor:wait;opacity:.65;}
#top-targeting-map .sa1-popup-delete-confirmation>.sa1-popup-delete-error{color:#8a1c13;}
#top-targeting-map .sa1-popup-retry{display:block;margin-top:6px;padding:4px 8px;border:1px solid #777;border-radius:4px;background:#fff;cursor:pointer;font-size:12px;}
#top-targeting-map .sa1-popup-retry:hover{background:#f5f5f5;}
#top-targeting-map .sa1-popup-log{display:block;width:100%;margin-top:8px;padding:6px 9px;border:1px solid #0d7377;border-radius:5px;background:#0d7377;color:#fff;cursor:pointer;font-size:12px;font-weight:600;}
#top-targeting-map .sa1-popup-log:hover{background:#095d60;}
#top-targeting-map .popup-zoom-sa1{display:block;margin-top:8px;padding:5px 9px;border:1px solid #0d7377;border-radius:5px;background:#fff;color:#0d7377;font-size:12px;font-weight:600;cursor:pointer;}
#top-targeting-map .popup-zoom-sa1:hover{background:#f0fafa;}
@media (max-width:700px){
  #top-targeting-map .app-header{gap:8px;padding-left:max(8px,env(safe-area-inset-left,0px));padding-right:max(8px,env(safe-area-inset-right,0px));}
  #top-targeting-map .app-title h3{display:none;}
  #top-targeting-map .search-panel{max-width:none;}
  #top-targeting-map .auth-user{gap:0;}
  #top-targeting-map .auth-user>#auth-user-label{display:none;}
  #top-targeting-map .auth-user button{display:grid;place-items:center;width:44px;height:44px;padding:0;}
  #top-targeting-map .auth-logout-label{display:none;}
  #top-targeting-map .auth-logout-icon{display:block;}
  /* The tools panel becomes a bottom sheet; it starts collapsed on small screens (see ui.ts). */
  #top-targeting-map .tools-panel{top:auto;right:max(6px,env(safe-area-inset-right,0px));bottom:max(52px,calc(env(safe-area-inset-bottom,0px) + 52px));left:max(6px,env(safe-area-inset-left,0px));width:auto;max-height:46vh;max-height:46dvh;}
  #top-targeting-map .tools-panel.collapsed{width:auto;left:max(6px,env(safe-area-inset-left,0px));right:auto;bottom:max(6px,env(safe-area-inset-bottom,0px));}
  #top-targeting-map .tools-panel-toggle{min-height:44px;}
  #top-targeting-map .tool-button{min-height:44px;}
  #top-targeting-map .tools-plans-link{min-height:44px;}
  /* One surface at a time on small screens: plans panel and flow cards are
     full-width bottom sheets, and the chips get out of their way. */
  #top-targeting-map .plans-panel{top:auto;right:max(6px,env(safe-area-inset-right,0px));bottom:max(6px,env(safe-area-inset-bottom,0px));left:max(6px,env(safe-area-inset-left,0px));width:auto;max-height:60vh;max-height:60dvh;}
  #top-targeting-map .flow-card{left:max(6px,env(safe-area-inset-left,0px));right:max(6px,env(safe-area-inset-right,0px));bottom:max(6px,env(safe-area-inset-bottom,0px));width:auto;max-width:none;transform:none;max-height:70vh;max-height:70dvh;overflow-y:auto;}
  #top-targeting-map .flow-steps .flow-step-label{display:none;}
  #top-targeting-map .flow-steps li.active .flow-step-label{display:inline;}
  #top-targeting-map .flow-row,#top-targeting-map .flow-fields{flex-direction:column;align-items:stretch;gap:8px;}
  #top-targeting-map .flow-search{flex:1 1 auto;}
  #top-targeting-map .flow-search #plan-flow-search-results{bottom:auto;top:calc(100% + 4px);}
  #top-targeting-map .flow-radio-pills{align-self:flex-start;flex-wrap:wrap;}
  #top-targeting-map .radio-pill{min-height:44px;}
  #top-targeting-map .flow-actions button{min-height:44px;}
  #top-targeting-map .plan-detail-actions button,#top-targeting-map .plans-scope button,#top-targeting-map .sa1-plan-card-actions button,#top-targeting-map .plan-edit-actions button,#top-targeting-map .plan-delete-actions button{min-height:44px;}
  #top-targeting-map .plan-edit-form input,#top-targeting-map .plan-edit-form textarea{font-size:16px;}
  #top-targeting-map .plan-edit-form input{min-height:44px;}
  #top-targeting-map .plans-back{width:44px;height:44px;}
  #top-targeting-map.flow-open .map-display-chip,#top-targeting-map.flow-open .map-display{display:none;}
  #top-targeting-map.plans-open .map-display-chip,#top-targeting-map.plans-open .map-display{display:none;}
  #top-targeting-map .map-display-chip{left:auto;right:max(6px,env(safe-area-inset-right,0px));bottom:max(6px,env(safe-area-inset-bottom,0px));min-height:44px;}
  #top-targeting-map .map-display{left:max(6px,env(safe-area-inset-left,0px));right:max(6px,env(safe-area-inset-right,0px));bottom:max(56px,calc(env(safe-area-inset-bottom,0px) + 56px));width:auto;max-height:56vh;max-height:56dvh;}
  #top-targeting-map .coach-mark{top:auto;bottom:118px;left:12px;right:12px;max-width:none;}
  #top-targeting-map .coach-mark::before{display:none;}
  #top-targeting-map .maplibregl-ctrl-bottom-left{bottom:env(safe-area-inset-bottom,0px);left:env(safe-area-inset-left,0px);}
  #top-targeting-map .maplibregl-ctrl-bottom-right{right:env(safe-area-inset-right,0px);bottom:env(safe-area-inset-bottom,0px);}
  #top-targeting-map .drawer{top:calc(var(--app-header-total) + 6px);right:max(6px,env(safe-area-inset-right,0px));bottom:auto;left:max(6px,env(safe-area-inset-left,0px));width:auto;max-width:none;height:60vh;height:60dvh;max-height:60vh;}
  #top-targeting-map .drawer-form input,#top-targeting-map .drawer-form select,#top-targeting-map .drawer-form textarea{font-size:16px;}
  #top-targeting-map .drawer-form input,#top-targeting-map .drawer-form select{min-height:44px;}
  #top-targeting-map .drawer-close{width:44px;height:44px;}
  #top-targeting-map .hoarding-legend-toggle{min-height:44px;}
  #top-targeting-map .hoarding-tool{min-height:44px;}
  #top-targeting-map .sa1-mode-status{top:calc(var(--app-header-total) + 8px);right:max(10px,env(safe-area-inset-right,0px));bottom:auto;left:max(10px,env(safe-area-inset-left,0px));justify-content:space-between;max-width:none;transform:none;}
  #top-targeting-map #sa1-mode-label{max-width:60vw;}
  #top-targeting-map .hoarding-guide-button{min-height:44px;}
  #top-targeting-map .drawer-form .drawer-checkbox{align-items:center;min-height:44px;}
  #top-targeting-map .drawer-form .drawer-checkbox input{width:22px;height:22px;}
  #top-targeting-map .drawer-form-actions button,#top-targeting-map .hoarding-discard-warning button,#top-targeting-map .hoarding-popup-actions button,#top-targeting-map .sa1-assignment-actions button{min-height:44px;}
  #top-targeting-map .sa1-plan-list-item,#top-targeting-map #new-sa1-plan,#top-targeting-map #progress-sa1-plan,#top-targeting-map #mark-sa1-plan-visited,#top-targeting-map #new-share-link{min-height:44px;}
  #top-targeting-map.hoarding-form-open .search-panel,#top-targeting-map.hoarding-form-open .tools-panel,#top-targeting-map.hoarding-form-open .plans-panel,#top-targeting-map.hoarding-form-open .map-display-chip,#top-targeting-map.hoarding-form-open .map-display,#top-targeting-map.hoarding-form-open .coach-mark,#top-targeting-map.hoarding-form-open .sa1-mode-status,#top-targeting-map.hoarding-form-open .maplibregl-control-container{visibility:hidden;opacity:0;pointer-events:none;}
}
@media (min-width:701px){
  #top-targeting-map .maplibregl-ctrl-top-right{right:auto;left:calc(var(--tools-panel-right,232px) + 8px);}
  #top-targeting-map.plans-open .maplibregl-ctrl-top-right,#top-targeting-map.flow-open .maplibregl-ctrl-top-right{right:10px;left:auto;}
}