:root{font-family:system-ui,sans-serif;color:#192f27;background:#f3f5ef;line-height:1.5;--green:#183e32;--muted:#506357;--line:#d7e0d6;--white:#fff;--accent:#d9ebc5}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
button:disabled{cursor:wait;opacity:.6}
button:focus-visible,a:focus-visible,canvas:focus-visible{outline:3px solid #ca8b2a;outline-offset:3px}
.shell{max-width:1160px;margin:auto;padding-inline:clamp(14px,4vw,36px)}
.masthead{background:var(--green);color:white}
.top{min-height:70px;display:flex;justify-content:space-between;align-items:center;gap:12px}
.brand{display:flex;align-items:center;gap:9px;color:white;text-decoration:none;font-size:1.1rem;font-weight:760}
.brand img{width:37px}
#role{font-size:.85rem;margin-right:8px;overflow-wrap:anywhere;align-self:center}
h1,h2,h3,p{margin:0}
h1{font-size:clamp(1.8rem,5vw,2.9rem);letter-spacing:-.05em;line-height:1.13}
h2{font-size:1.14rem}
h3{font-size:1rem}
.intro{padding:30px 0 23px;display:flex;align-items:center;justify-content:space-between;gap:15px}
.intro p,.hint{color:var(--muted);margin-top:8px}
.primary,.quiet,.tabs button,.zoom button,.danger{border-radius:9px;border:1px solid var(--line);padding:9px 13px;background:white;color:var(--green);font-weight:650}
.primary{background:var(--green);border-color:var(--green);color:white}
.primary:hover{background:#245644}
.quiet:hover,.tabs button:hover{background:#eef4e9}
.danger{color:#8e2920}
.tabs{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:14px}
.tabs button[aria-pressed=true]{background:var(--accent);border-color:#c3d7ac}
.count{display:inline-block;border-radius:30px;background:var(--green);color:white;padding:0 7px;margin-left:4px}
.card{background:white;border:1px solid var(--line);border-radius:16px;overflow:hidden}
.panel,.login{padding:clamp(15px,3vw,23px)}
.login{max-width:420px;margin:clamp(30px,9vw,100px) auto}
.login h1{font-size:1.8rem}
.login button{margin-top:17px;width:100%}
.card-title{padding:15px 19px;display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
.compact{padding:0}
.map-caption,.map-info{font-size:.88rem;color:var(--muted)}
.map-layout{display:grid;grid-template-columns:minmax(0,1fr) 185px}
.incidence-legend{padding:13px;border-left:1px solid var(--line);font-size:.79rem}
.incidence-legend ul{padding:0;margin:8px 0 0;list-style:none;display:grid;gap:5px}
.incidence-legend li{display:flex;align-items:center;gap:7px}
.incidence-legend canvas{width:13px;height:13px;flex:0 0 13px;border:1px solid #0004;cursor:default;border-radius:50%}
#history-control{max-width:260px}
@media(max-width:640px){
  .map-layout{grid-template-columns:1fr}
  .incidence-legend{border-left:0;border-top:1px solid var(--line)}
  .incidence-legend ul{grid-template-columns:repeat(2,minmax(0,1fr))}
}
.map-frame{position:relative;background:#edf1e7}
#map{display:block;width:100%;height:clamp(360px,62vh,620px);touch-action:none;cursor:grab}
#map:active{cursor:grabbing}
.zoom{position:absolute;top:12px;left:12px;display:grid;gap:5px}
.zoom button{padding:4px;width:35px;height:36px;font-size:1.2rem}
.attribution{position:absolute;right:0;bottom:0;background:white;padding:1px 6px;color:var(--green);font-size:.7rem}
.map-info{padding:10px 17px;display:flex;gap:9px;align-items:center;flex-wrap:wrap}
.entry-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start}
.entry-grid section:first-child,.submit{grid-column:1/-1}
.entry-grid section:nth-child(2){grid-row:span 2}
label{display:grid;gap:4px;margin-top:13px;font-size:.92rem;font-weight:600}
input,select,textarea{border:1px solid #aebfb0;border-radius:8px;padding:9px;background:#fff;color:#21352a;width:100%;min-width:0}
input[type=file]{border-style:dashed}
#locate{margin-top:10px}
.pair{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.previews,.photos,.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.previews img,.photos img{display:block;width:130px;height:100px;object-fit:cover;border-radius:8px}
.previews button{margin-top:4px}
.submit{margin-bottom:30px}
.message{position:fixed;bottom:15px;right:15px;z-index:5;padding:12px 17px;background:var(--green);color:white;border-radius:9px;max-width:min(90vw,480px);white-space:pre-line}
.message.problem{background:#892b23}
.item{display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid var(--line);padding:12px 0}
.item:last-child{border-bottom:0}
.item p{color:var(--muted);font-size:.88rem}
.item strong{display:block}
.badge{border-radius:20px;padding:4px 9px;background:#edf2e7;font-size:.82rem}
.badge.pending{background:#faedcc}
.badge.rejected{background:#fae2df}
dialog{padding:0;border:0;border-radius:14px;width:min(650px,94vw);max-height:90vh;color:inherit}
dialog::backdrop{background:#13271f99}
dialog .card-title{border-bottom:1px solid var(--line)}
dl{display:grid;grid-template-columns:minmax(100px,1fr) 2fr;gap:6px 12px;margin:0}
dt{color:var(--muted)}
dd{margin:0;overflow-wrap:anywhere;white-space:pre-wrap}
@media(max-width:650px){.intro{align-items:flex-start;flex-direction:column}.entry-grid{grid-template-columns:1fr}.entry-grid section:nth-child(2){grid-row:auto}#account{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:4px}.item{flex-wrap:wrap}}

.map-filters,.period-controls{display:flex;align-items:flex-end;gap:8px 12px;flex-wrap:wrap}
.map-filters{padding:10px 19px;border-top:1px solid var(--line)}
.map-filters label{margin:0}
#week-label{align-self:center;color:var(--muted);font-size:.88rem}

#lookup-locality{margin-top:8px}
#password-form{border-top:1px solid var(--line)}

@media(max-width:640px){
  .top{padding-block:8px;flex-wrap:wrap;gap:6px}
  #account{min-width:0;justify-content:flex-start}
  .intro{padding-block:17px;gap:10px}
  .map-filters{padding-inline:13px}
  #week-controls{width:100%;display:grid;grid-template-columns:44px minmax(0,1fr) 44px}
  #week-label{grid-column:1/-1;text-align:center}
  #week-before,#week-after,.zoom button{width:44px;height:44px}
  #map{height:clamp(290px,50svh,460px)}
}

.member-profile{min-width:0;flex:1 1 260px}
.member-profile summary{cursor:pointer;font-weight:650;overflow-wrap:anywhere}
.account-fields{margin-top:8px}
