:root{color-scheme:dark;font:15px system-ui,sans-serif;color:#edf3f6;background:#142335;--panel:#172534;--line:#5a7184;--ink:#edf3f6;--registered:#80eed4;--prevalidated:#9abaff;--candidate:#f1bc78;--selected:#d6b3ff}
*{box-sizing:border-box}
html,body{height:100%;margin:0}
[hidden]{display:none!important}
#record-map{height:100%;width:100%;background:#142335}
.panel,.legend,#map-status{position:fixed;z-index:1000}
.controls{display:flex;gap:6px;margin-top:6px;pointer-events:auto}
button,input,select{font:inherit;color:inherit;background:var(--panel);border:1px solid var(--line);border-radius:6px;padding:.48rem}
button,summary{cursor:pointer}a{color:inherit}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--registered)}
.controls button{display:grid;place-items:center;width:42px;height:42px}
.controls svg{width:23px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}
.panel,.legend,#map-status:not(:empty){background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:.7rem .85rem;box-shadow:0 2px 8px #0005}
.panel{top:var(--header-bottom);left:12px;width:min(24rem,calc(100vw - 24px));max-height:calc(100dvh - 120px);overflow:auto}
#map-menu{display:grid;gap:.7rem;justify-items:start}
#map-menu label{display:grid;gap:.3rem}
form{display:grid;gap:.4rem;margin:0}#search div{display:flex;gap:.4rem}#search input{min-width:0;flex:1}
.panel ul{list-style:none;padding:0;margin:0}.panel li button{width:100%;text-align:left;margin-top:.25rem}
.panel p:empty,#pending:empty{display:none}
.legend{bottom:max(12px,env(safe-area-inset-bottom));left:12px;display:grid;gap:.2rem;font-size:.76rem;font-weight:650}
.legend span::before{content:'';display:inline-block;width:.65em;height:.65em;margin-right:.35em;border-radius:50%;background:var(--candidate)}
.legend .legend-registered::before{background:var(--registered)}
#map-status{right:12px;bottom:calc(max(12px,env(safe-area-inset-bottom)) + 72px);margin:0;pointer-events:none}
.map-marker{background:none;border:0}
.marker-face,.marker-dot,.portrait{display:block;border-radius:50%;background-color:var(--candidate);box-shadow:0 1px 4px #0009}
.marker-face,.marker-dot{width:100%;height:100%;border:2px solid var(--candidate)}
.marker-face,.portrait{background-image:url('/static/demo-portraits.webp');background-size:1000% 1000%}
.portrait{width:38px;height:38px}
#view-toggle{display:flex}
.controls #view-toggle button{width:auto;padding-inline:.5rem;border-radius:0}
#view-toggle button+button{margin-left:-1px}
#view-toggle button:first-child{border-radius:6px 0 0 6px}
#view-toggle button:last-child{border-radius:0 6px 6px 0}
#view-toggle button[aria-pressed="true"]{background:#36536a;color:white}
#view-toggle button:focus-visible{z-index:1}
#profile-cloud{position:fixed;inset:var(--header-bottom) 0 0;display:grid;grid-template-rows:auto minmax(0,1fr);background:#142335}
.cloud-caption{padding:.35rem 1rem}
.cloud-caption h2,.cloud-caption p{margin:0 0 .35rem}
.cloud-caption p{color:#b9cddd;font-size:.86rem}
.cloud-controls{display:flex;flex-wrap:wrap;align-items:center;gap:.45rem 1rem}
.cloud-controls label{display:flex;align-items:center;gap:.3rem;font-size:.85rem}
.cloud-controls input{width:clamp(4rem,20vw,8rem);padding:0}
#cloud-canvas{display:block;width:100%;height:100%;touch-action:none;cursor:grab}
#cloud-canvas:active{cursor:grabbing}
#cloud-canvas:focus-visible{outline:2px solid var(--registered);outline-offset:-3px}
@media(max-width:370px){.controls{gap:4px}.controls #view-toggle button{padding-inline:.34rem}.controls #join-human{padding-inline:.45rem;font-size:.85rem}}
#profile-list{position:fixed;inset:var(--header-bottom) 0 0;overflow:auto;padding:.5rem 1rem 76px;background:#142335}
#profile-list .profile-sort{position:sticky;top:0;z-index:1;display:flex;align-items:center;gap:.55rem;max-width:38rem;margin:0 auto;padding:.45rem 0;background:#142335}
#profile-list .profile-sort-group{padding:.75rem .3rem .45rem;color:#b1c3d1;font-size:.86rem;font-weight:650}
#profile-list ul{max-width:38rem;margin:0 auto;padding:0;list-style:none}
#profile-list li{border-bottom:1px solid #3a4e60}
#profile-list .profile-row,#profile-pair .profile-row{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:.7rem;padding:.45rem .3rem;width:100%;text-align:left;border:0;background:transparent;min-height:46px}
#profile-list li small{color:#b1c3d1}.row-dot{width:12px;height:12px;border-radius:50%;background:var(--candidate);margin:auto}
#profile-list .focused-profile{background:#44345b;outline:2px solid var(--selected);border-radius:5px}
#profile-list .neighbor-profile{background:#483b33;outline:2px solid var(--candidate);border-radius:5px}
.id56-spec dl{display:grid;gap:.25rem;margin:.55rem 0}.id56-spec dt{font-weight:650}.id56-spec dd{margin:0 0 .4rem}
.profile-name{display:block;line-height:1.3}
.profile-place{max-width:min(32vw,12rem);text-align:right;overflow-wrap:anywhere}

.profile-row:disabled{opacity:1;cursor:default}
.profile-row:not(:disabled):hover{background:#22394b}
.selected-marker{outline:2px solid var(--selected);outline-offset:2px}
.neighbor-marker{outline:2px solid var(--candidate);outline-offset:2px}
.selected-marker.neighbor-marker{outline-color:var(--selected);box-shadow:0 0 0 2px var(--candidate)}
.site-signature{position:fixed;z-index:1000;top:max(12px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));display:grid;grid-template-columns:20px 100px;width:120px;height:100px;overflow:hidden;border-radius:8px;box-shadow:0 2px 8px #0005}
.site-signature span{display:flex;align-items:center;justify-content:center;gap:4px;writing-mode:vertical-rl;transform:rotate(180deg);white-space:nowrap;background:#153a60;font-size:11px}
.site-signature svg{display:block;width:100px;height:100px;shape-rendering:crispEdges;background:#fff}
.site-version{position:fixed;z-index:1000;right:12px;bottom:max(12px,env(safe-area-inset-bottom));padding:.18rem .32rem;border-radius:4px;background:var(--panel);color:#c1d4e2;font-size:.65rem}
.commune-label.leaflet-tooltip{padding:.15rem .35rem;border:0;background:#172534e8;color:var(--ink);box-shadow:none;font:650 12px system-ui,sans-serif}
.commune-label.leaflet-tooltip::before{display:none}
:root{--header-top:max(12px,env(safe-area-inset-top));--brand-size:clamp(44px,5vw,60px);--header-bottom:calc(var(--header-top) + var(--brand-size) + 58px)}
.site-heading{position:fixed;z-index:1001;top:var(--header-top);left:12px;pointer-events:none}
.site-heading h1{margin:0;color:var(--ink);font-size:clamp(1.08rem,2.55vw,2.25rem);line-height:1.15;text-wrap:balance;text-shadow:0 2px 7px #142335,0 0 12px #142335}
.launch-stamp{text-align:center;line-height:1.15;position:fixed;z-index:900;right:14px;bottom:calc(max(12px,env(safe-area-inset-bottom)) + 34px);margin:0;pointer-events:none;padding:.2rem .45rem;border:2px solid var(--candidate);border-radius:3px;background:#172534;color:var(--candidate);transform:rotate(-6deg);font-size:clamp(.64rem,1.35vw,.88rem);font-weight:750}


.human-brand{display:flex;align-items:center;justify-content:flex-start;gap:clamp(.5rem,1.15vw,.85rem)}
.human-brand img{display:block;width:var(--brand-size);height:var(--brand-size);border:1px solid #47667b;border-radius:23%;box-shadow:0 2px 8px #0006}
.human-brand h1{text-align:center}

.human-brand-text{position:relative;text-align:center}
.human-subtitle{margin:.22rem 0 0;color:#d4e2ed;font-size:clamp(.72rem,1.35vw,.95rem);line-height:1.3;text-wrap:balance;text-shadow:0 1px 6px #142335}

.app-downloads{position:fixed;z-index:1000;bottom:max(12px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);display:grid;justify-items:center;gap:.15rem;white-space:nowrap;color:#d4e2ed;font-size:.75rem;text-shadow:0 1px 6px #142335;pointer-events:none}
.store-badges{display:flex;align-items:center;gap:.4rem;height:40px}
.store-badges img{display:block;width:auto;height:40px}
.store-badges .google-play-badge{height:52px}
@media(max-width:700px){.app-downloads{bottom:calc(max(12px,env(safe-area-inset-bottom)) + 92px)}}

.marker-face,.marker-dot{border-radius:22%}
.marker-dot,.marker-group{display:grid;place-items:center;font:700 13px system-ui,sans-serif}
.marker-dot{color:#142335}
.marker-group{width:100%;height:100%;border-radius:50%;color:#f9e3c9;background:#25384a;border:2px solid var(--candidate);box-shadow:0 2px 5px #0008}

.legend .legend-prevalidated::before{background:var(--prevalidated)}

#apply-dialog,#electoral-relay,#phone-resume{width:min(26rem,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;background:var(--panel);color:var(--ink);border:1px solid var(--line);border-radius:12px;padding:1rem}
#apply-dialog::backdrop,#electoral-relay::backdrop,#phone-resume::backdrop{background:#0009}
#apply-dialog h2{margin:.3rem 2.5rem .7rem 0}
#apply-close{position:absolute;right:1rem;top:1rem}
#apply-form fieldset{border:0;min-width:0;margin:0;padding:0;display:grid;gap:.5rem}
#apply-form legend{margin-bottom:.6rem;font-weight:700}
#apply-form label{display:grid;gap:.2rem}
#apply-form :is(input,select){min-width:0}
#apply-form :is(.apply-consent,#apply-ids label){display:flex;align-items:start;gap:.5rem}
#apply-ids{display:grid;gap:.4rem}
.apply-actions{display:flex;justify-content:flex-end;gap:.4rem;margin-top:.5rem}
#apply-status{margin:0}

.profile-avatar{display:grid;place-items:center;position:relative;width:100%;height:100%}
.validation-badge{position:absolute;top:1px;right:1px;width:12px;height:12px;border:2px solid var(--panel);border-radius:50%;background:var(--registered)}
.validation-badge.prevalidated{background:var(--prevalidated)}
#admin-registrations:empty{display:none}

.status-filter{display:grid;gap:.3rem;margin-bottom:.65rem}

#electoral-relay label,#phone-resume label{display:grid;gap:.25rem}
#electoral-relay :is(p,h2){margin:.25rem 0}
#apply-form .apply-consent input{flex:none}


.candidate-page{height:auto;min-height:100%;padding:clamp(1rem,5vw,3rem)}
.candidate-panel{max-width:34rem;margin:auto;padding:1.3rem;background:var(--panel);border:1px solid var(--line);border-radius:12px}
.candidate-title{display:flex;align-items:center;gap:.6rem}
.candidate-title i{width:.65rem;height:.65rem;flex:none;border-radius:50%;background:var(--candidate)}
.candidate-title i.prevalidated{background:var(--prevalidated)}
.candidate-title i.registered{background:var(--registered)}
.candidate-panel h1{margin:.6rem 0}
#private-portrait{width:120px;aspect-ratio:1;object-fit:cover;border-radius:12px}

.demographic-row{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:.55rem}

#apply-guide{margin-bottom:.7rem;font-size:.88rem;color:#bfd6e8}
#apply-guide p{margin:.3rem 0 .5rem}
.apply-store{display:flex;align-items:center;justify-content:space-between;gap:.45rem}
.apply-store img{width:auto;height:36px;flex:none}
.apply-store .google-play-badge{height:46px}
#apply-copy{margin:.45rem 0}

.controls #join-human{width:auto;pointer-events:auto;background:#80eed4;color:#142335;font-weight:750;border:0;padding:.46rem .75rem}

#human-about{display:inline-flex;align-items:center;gap:.55rem;padding:0;border:0;background:none;pointer-events:auto;font-weight:inherit}
#human-subtitles{display:none;position:absolute;z-index:1;top:100%;left:0;width:min(22rem,calc(100vw - var(--brand-size) - 46px));padding:.65rem .8rem;background:var(--panel);border:1px solid var(--line);border-radius:8px;box-shadow:0 3px 10px #0006}
.human-brand-text:has(#human-about[aria-expanded="true"]) #human-subtitles{display:block}
@media(hover:hover){.human-brand-text:has(#human-about:hover) #human-subtitles{display:block}}

.site-heading #menu-toggle{display:block;padding:0;border:0;background:none;pointer-events:auto}

.virtual-island{display:grid;place-items:center;padding:5px 9px;border:2px dashed #90e2d4;border-radius:49% 42% 48% 39%;background:#205356;color:#f1fff9;text-align:center;font-size:.75rem;font-weight:700;line-height:1.15;box-shadow:0 2px 6px #0006}
.virtual-island:focus-visible{outline:2px solid white;outline-offset:3px}


#profile-pair{position:fixed;z-index:1000;left:50%;bottom:max(12px,env(safe-area-inset-bottom));transform:translateX(-50%);display:flex;align-items:center;gap:clamp(.24rem,1.4vw,.55rem);max-width:calc(100vw - 16px);padding:.26rem .32rem;border:3px solid transparent;border-radius:8px;background:linear-gradient(var(--panel),var(--panel)) padding-box,linear-gradient(90deg,var(--selected) 48%,var(--candidate) 52%) border-box;box-shadow:0 2px 8px #0005;font-size:clamp(.68rem,2.7vw,.82rem);white-space:nowrap}
#profile-pair .profile-row{grid-template-columns:auto minmax(0,1fr);gap:.3rem;min-height:0;padding:.22rem .35rem}
#profile-pair .pair-member{min-width:0;background:#44345b;border-radius:4px}
#profile-pair button.pair-member{padding:0;border:0;text-align:left}
#profile-pair #pair-selected:hover{background:#594474}
#profile-pair #pair-neighbor{background:#483b33}
#profile-pair:has(#pair-neighbor[hidden]){border-color:var(--selected)}
#profile-pair #pair-neighbor:hover{background:#5b483a}
#profile-pair .portrait{width:24px;height:24px}
#profile-pair .profile-name,#profile-pair .profile-place{display:none}
#pair-distance{display:grid;justify-items:center;line-height:1;color:#c4d5e0;text-align:center;font-variant-numeric:tabular-nums;font-size:.75rem}
body:has(#profile-pair:not([hidden])) #profile-list{padding-bottom:105px}
body:has(#profile-pair:not([hidden])) .app-downloads{bottom:calc(max(12px,env(safe-area-inset-bottom)) + 48px)}
@media(max-width:680px){
  body:has(#profile-pair:not([hidden])) .legend{bottom:calc(max(12px,env(safe-area-inset-bottom)) + 48px)}
  body:has(#profile-pair:not([hidden])) .app-downloads{bottom:calc(max(12px,env(safe-area-inset-bottom)) + 136px)}
}
@media(max-width:350px){#profile-pair .portrait{width:19px;height:19px}}
