*{box-sizing:border-box}body{margin:0;color:#182c41;font:16px/1.45 system-ui,sans-serif}header{height:60px;background:#102d4c;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(16px,4vw,60px)}header a{color:white;text-decoration:none}.brand{font-size:1.8rem;font-weight:800;letter-spacing:-.06em}.brand span{font-weight:500}nav{display:flex;gap:18px;font-size:.875rem}main{height:calc(100vh - 60px);height:calc(100dvh - 60px);position:relative;isolation:isolate}#map{position:absolute;inset:0;background:#e3ebe6;z-index:0}.tools{position:absolute;top:18px;left:18px;right:18px;display:flex;justify-content:space-between;gap:12px;pointer-events:none}.tools>*{pointer-events:auto}button,input,select{font:inherit}button{cursor:pointer;border:0;border-radius:8px;background:#eaf0f5;color:#183650;padding:9px 14px;font-weight:650}.report{background:#b75500;color:white}#search,#panel,.legend,#notice{background:white;border-radius:12px;box-shadow:0 3px 18px #17354e30}#search{display:flex;padding:5px;max-width:100%;width:360px}#query{border:0;min-width:0;flex:1;padding:8px}#panel{position:absolute;top:85px;left:18px;width:min(395px,calc(100% - 36px));padding:20px;max-height:calc(100% - 148px);overflow:auto}h2{font-size:1.18rem;margin:0 32px 10px 0}.close{float:right;font-size:22px;line-height:1;background:transparent;padding:4px}label{display:block;margin:12px 0;font-size:.92rem}label input:not([type=checkbox]),select{width:100%;padding:9px;border:1px solid #a8b7c1;border-radius:6px;margin-top:4px}.check{display:flex;align-items:flex-start;gap:8px}output{display:block;font-size:.85rem}.legend,#notice{position:absolute;bottom:22px;left:16px;padding:8px 12px;font-size:.85rem}.legend i,.pin{display:inline-block;background:#e58a0a;border-radius:50%;border:2px solid white;box-shadow:0 0 0 1px #975706}.legend i{width:12px;height:12px;margin-right:7px}.pin{width:19px;height:19px}.selected{background:#2171c2}#notice{bottom:68px;max-width:calc(100% - 32px);pointer-events:none}.match{display:block;width:100%;text-align:left;margin:6px 0}.warning{color:#913e00;font-weight:700}.sr{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}.leaflet-container:focus-visible,button:focus-visible,input:focus-visible{outline:3px solid #407fbc}
@media(max-width:640px){.tools{inset:10px 10px auto;align-items:flex-start;flex-direction:column;gap:6px}#search{width:100%}.tools>.report{align-self:flex-end}#panel{top:auto;bottom:0;left:0;width:100%;max-height:calc(100% - 115px);z-index:2;border-radius:16px 16px 0 0}.legend{font-size:.75rem}#notice{top:110px;bottom:auto;z-index:3}}

body { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
header { height: auto; gap: 16px; padding-block: 12px; color: white; }
header h1 { font-size: clamp(1.12rem, 2.3vw, 1.7rem); margin: 0; line-height: 1.2; }
header p { margin: 4px 0 0; font-size: .88rem; color: #e3eef6; }
main { flex: 1; height: auto; min-height: 0; }
.legend { max-width: min(430px, calc(100% - 85px)); }
@media (max-width: 640px) {
  header { flex-wrap: wrap; gap: 6px; padding-block: 8px; }
  header p, nav { font-size: .8rem; }
}

.legend .with-evidence, .pin.with-evidence { background: #cc3035; box-shadow: 0 0 0 1px #8b1c21; }
#reportForm fieldset { min-width: 0; margin: 14px 0; border: 1px solid #bfcdd7; border-radius: 8px; }
#reportForm legend { font-weight: 650; }

#panel:has(#reportForm:not([hidden])) { width:min(480px,calc(100% - 36px)); padding:24px; overscroll-behavior:contain; }
#reportForm h2,#reportReceipt h2 { font-size:1.4rem; line-height:1.25; color:#102d4c; }
.report-intro,#reportReceipt p { color:#43586a; line-height:1.5; }
#reportForm fieldset { background:#f8fafb; border-color:#d5dfe6; margin:18px 0; padding:6px 15px 13px; border-radius:12px; }
#reportForm legend { padding:0 6px; color:#16446a; }
#reportForm label { line-height:1.45; font-weight:550; }
#reportForm small { color:#4a5f70; display:block; }
#reportForm input:not([type=checkbox]), #reportForm select { min-width:0; min-height:44px; font-size:16px; background:white; color:#18344b; }
#reportForm .check { align-items:flex-start; font-weight:400; }
#reportForm input[type=checkbox] { flex:0 0 20px; width:20px; height:20px; accent-color:#164c72; }
#reportForm button,#reportReceipt button,#panel .close { min-height:44px; }
#panel .close { min-width:44px; }
#reportForm .report,#reportReceipt button { width:100%; }
#reportForm .report:disabled { opacity:.65; }
#reportError { padding:12px; background:#fff1e8; border-left:3px solid #a54412; }
#reportReceipt { width:min(410px,calc(100% - 32px)); padding:26px; border:0; border-radius:18px; color:#18344b; box-shadow:0 18px 70px #102d4c33; }
#reportReceipt::backdrop { background:#0b2038a6; }
.receipt-check { display:grid; place-items:center; border-radius:50%; width:46px; height:46px; margin-bottom:15px; font-size:26px; background:#e1f4e9; color:#1e6947; }
#reportReceipt button { color:white; background:#16446a; }
@media(max-width:640px), (max-height:520px) {
  #panel:has(#reportForm:not([hidden])) { position:fixed; inset:0; width:100%; height:100vh; height:100dvh; max-height:none; border-radius:0; padding:16px max(16px,env(safe-area-inset-right)) max(22px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left)); overflow-y:auto; z-index:5; }
  #panel:has(#reportForm:not([hidden])) .close { position:sticky; top:0; background:white; border:1px solid #d5dfe6; border-radius:50%; }
  #reportForm h2 { padding-right:20px; }
}

#inlineBoundary:not([hidden]) { height:210px; margin-top:12px; border-radius:8px; overflow:hidden; }

#panel:has(#reportForm:not([hidden])) ~ .legend { display:none; }

.tools > #reportHint { margin:0; align-self:flex-start; max-width:32rem; padding:6px 10px; border-radius:6px; background:white; color:#183650; font-size:.875rem; pointer-events:none; }

.map-header { align-items:flex-start; flex-wrap:nowrap; gap:10px; padding-block:8px; max-height:65dvh; overflow:auto; flex-shrink:0; }
.map-header h1 { font-size:clamp(1rem, 2vw, 1.25rem); }
.map-header p, .map-header summary, .map-header nav { font-size:.8125rem; line-height:1.4; }
.map-header summary { width:fit-content; padding:3px 0; cursor:pointer; text-decoration:underline; text-underline-offset:2px; }
.map-header details:not([open]) summary span:last-child,
.map-header details[open] summary span:first-child { display:none; }
.map-header details p { margin:6px 0; }

#panel:has(#reportForm:not([hidden])) > .close { display:none; }
#closeReport {
  position:fixed; z-index:6; right:max(16px,env(safe-area-inset-right));
  bottom:max(16px,env(safe-area-inset-bottom)); min-height:44px;
  color:white; background:#183650; border-radius:24px; box-shadow:0 2px 12px #102d4c44;
}
@media(max-width:640px), (max-height:520px) {
  #panel:has(#reportForm:not([hidden])) { padding-bottom:calc(76px + env(safe-area-inset-bottom)); }
}

#pointPreview { margin:12px 0; }
#pointPreview figcaption { display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 10px; margin-bottom:5px; }
#pointPreviewCoords { font-size:.8rem; color:#43586a; font-variant-numeric:tabular-nums; }
#pointPreviewMap { height:clamp(125px,19vh,175px); border-radius:8px; background:#e3ebe6; isolation:isolate; }

#panel .radio-options label { display:flex; align-items:center; gap:10px; margin:0; min-height:44px; cursor:pointer; }
#panel .radio-options input[type=radio] { flex:none; width:18px; height:18px; min-height:0; margin:0; padding:0; accent-color:#164c72; }
