:root{
  --redcross:#ED1B2E;
  --ink:#222225;
  --muted:#6b6f76;
  --paper:#ffffff;
  --line:#d7d9de;
  --panel-shadow:0 18px 50px rgba(18,22,30,.16);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
*{box-sizing:border-box}
html,body,#app{width:100%;height:100%;margin:0;overflow:hidden;background:#fff;color:var(--ink);font-family:var(--font)}
#mapSvg{position:absolute;inset:0;width:100%;height:100%;z-index:1;touch-action:none;background:
  radial-gradient(circle at 52% 45%, #fff 0%, #fff 45%, #fafafa 100%);}
.country{stroke:#fff;stroke-width:.55;vector-effect:non-scaling-stroke;cursor:pointer;transition:opacity .18s ease, fill .18s ease, stroke .18s ease}
.country.no-data{fill:#f1f1f1;stroke:#e7e7e7;cursor:default}
.country:focus{outline:none}
.country.selected{stroke:#fff;stroke-width:.55;filter:none}
.graticule{fill:none;stroke:#eeeeee;stroke-width:.65;pointer-events:none}
.sphere{fill:#fff;stroke:none;pointer-events:none}
#titleBlock{position:absolute;top:clamp(12px,2vw,24px);left:clamp(14px,2.2vw,30px);z-index:20;max-width:min(620px,calc(100vw - 115px));pointer-events:none;background-color: white; border-radius: 5px}
h1{margin:0;color:var(--redcross);font-size:clamp(1.05rem,2vw,1.65rem);line-height:1.05;font-weight:720;letter-spacing:-.035em}
#titleBlock p{margin:.4rem 0 0;color:#6d6f76;font-size:clamp(.76rem,1.05vw,.95rem);line-height:1.35;max-width:560px; padding-right: 10px}
.brand-red{color:var(--redcross);font-weight:720}
.panel{background:rgba(255,255,255,.96);border:1px solid rgba(215,217,222,.9);box-shadow:var(--panel-shadow);backdrop-filter:blur(12px);border-radius:18px}
#legend{position:absolute;right:clamp(12px,2vw,24px);bottom:clamp(14px,2vw,24px);z-index:25;width:min(330px,calc(100vw - 28px));overflow:hidden}
#legendHeader{all:unset;width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;cursor:pointer;color:#2a2d31;font-weight:720;font-size:.92rem;border-bottom:1px solid var(--line)}
#legendCaret{font-size:1.1rem;color:var(--redcross);transition:transform .18s}
#legend.collapsed #legendBody{display:none}
#legend.collapsed #legendHeader{border-bottom:0}
#legend.collapsed #legendCaret{transform:rotate(180deg)}
#legendBody{padding:12px 14px 14px}
.legend-axis.top{display:grid;grid-template-columns:82px repeat(2,1fr);gap:6px;margin-bottom:7px;font-size:.68rem;color:#5e636b;text-align:center;font-weight:650}
#legendGrid{display:grid;grid-template-columns:82px repeat(2,1fr);gap:6px;align-items:stretch}
.row-label{display:flex;align-items:center;justify-content:flex-end;text-align:right;padding-right:4px;font-size:.72rem;color:#596069;font-weight:650}
.legend-cell{height:46px;border:1px solid rgba(0,0,0,.12);border-radius:10px;cursor:pointer;position:relative;box-shadow:inset 0 0 0 1px rgba(255,255,255,.28);transition:transform .12s ease, box-shadow .12s ease, opacity .12s ease}
.legend-cell:hover{transform:translateY(-1px)}
.legend-cell.active{box-shadow:0 0 0 3px rgba(237,27,46,.22), inset 0 0 0 2px #fff}
.legend-cell:focus-visible{outline:3px solid rgba(237,27,46,.5);outline-offset:2px}
.legend-note{margin:10px 2px 0;color:#6a6f76;font-size:.73rem;line-height:1.3}
#infoButton{position:absolute;right:clamp(12px,2vw,24px);top:clamp(12px,2vw,24px);z-index:30;width:38px;height:38px;border-radius:50%;border:1px solid #dadde2;background:#fff;color:var(--redcross);font-weight:800;font-size:1rem;box-shadow:0 8px 25px rgba(0,0,0,.12);cursor:pointer}
#infoWindow{position:absolute;z-index:60;display:none;width:min(380px,calc(100vw - 30px));padding:18px;color:#222}
#infoWindow h2{margin:0 0 8px;color:var(--redcross);font-size:1.25rem;line-height:1.1}
#infoWindow .org{font-weight:720;margin-bottom:10px}
.info-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}
.info-card{border:1px solid #e3e5e8;border-radius:12px;padding:10px;background:#fff}
.info-card b{display:block;font-size:.68rem;text-transform:uppercase;letter-spacing:.06em;color:#777d85;margin-bottom:3px}
.info-card span{font-size:.92rem}
.source{border-top:1px solid #eceef1;margin-top:12px;padding-top:10px;font-size:.76rem;color:#666b73;line-height:1.35}
#modalBackdrop{position:absolute;inset:0;z-index:100;display:none;align-items:center;justify-content:center;background:rgba(25,28,34,.28);padding:18px}
#modalBackdrop.open{display:flex}
#sourceModal{position:relative;width:min(620px,calc(100vw - 30px));max-height:calc(100vh - 36px);overflow:auto;padding:24px}
#sourceModal h2{margin:0 0 10px;color:var(--redcross)}
#sourceModal p{line-height:1.5;color:#4b5058}
#sourceModal a{color:var(--redcross);font-weight:650}
#modalClose{position:absolute;right:14px;top:10px;border:0;background:transparent;font-size:1.8rem;color:#6c7078;cursor:pointer}
#loading{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:40;background:#fff;border:1px solid #e1e3e8;border-radius:999px;padding:10px 16px;box-shadow:0 10px 30px rgba(0,0,0,.1);color:#6a6f76;font-size:.9rem}
#credit{position:absolute;left:16px;bottom:12px;z-index:15;color:#9a9da3;font-size:.68rem;letter-spacing:.02em;pointer-events:none}
#landscapeNotice{display:none;position:absolute;inset:0;z-index:200;background:#fff;align-items:center;justify-content:center;text-align:center;padding:28px}
#landscapeNotice strong{color:var(--redcross);font-size:1.35rem}
#landscapeNotice p{color:#626871}
@media (max-width:760px) and (orientation:portrait){
  #landscapeNotice{display:flex}
}
@media (max-height:520px){
  #titleBlock p{display:none}
  #legend{width:330px}
  .legend-cell{height:34px}
  #legendHeader{padding:10px 12px}
  #legendBody{padding:9px 12px 10px}
}
