
:root{
  --famgen-bg: rgb(253,246,228);
  --famgen-yellow: rgb(247,212,8);
  --famgen-blue: #0c63b7;
  --famgen-border: #cfd8e1;
}

.page{
  width:1600px;
  max-width:calc(100vw - 24px);
  margin:28px auto 50px;
}
.header{text-align:center;margin:0 0 20px}
.header h1{margin:0;font-size:30px;color:rgb(214,14,77)}
.header h2{margin:8px 0 0;font-size:20px;color:rgb(4,74,125)}
.map-shell{
  position:relative;
  width:100%;
  height:850px;
  background:#fff;
  border:1px solid var(--famgen-border);
  box-shadow:0 2px 9px rgba(0,0,0,.12);
}
#map{width:100%;height:100%}
#legend{
  position:absolute;
  z-index:1000;
  top:12px;
  right:12px;
  width:225px;
  max-height:calc(100% - 24px);
  overflow:auto;
  background:#fff;
  padding:12px 14px;
  border-radius:8px;
  box-shadow:0 2px 10px #777;
  font-size:13px;
}
#legend h3{margin:0 0 9px;font-size:15px}
#legend .county{font-size:11px;color:#61798d;margin-bottom:10px;line-height:1.3}
#layers label{display:flex;align-items:center;gap:7px;margin:5px 0;cursor:pointer}
#layers input{margin:0}
.legend-icon{width:22px;height:22px;object-fit:contain;flex:0 0 22px}
.legend-military{
  width:22px;height:22px;border-radius:50%;background:#7a3434;color:#fff;
  display:inline-flex;align-items:center;justify-content:center;font-size:12px;flex:0 0 22px
}
.status{
  position:absolute;z-index:1100;left:55px;top:12px;max-width:520px;
  background:#fff;padding:10px 13px;border:1px solid #aebdca;border-radius:7px;
  box-shadow:0 2px 8px rgba(0,0,0,.16);font-size:12px
}
.status.error{border-color:#a33;color:#7a1111}
/* Links in den FamGEN-Infoblasen wie in data_ge.html */
.leaflet-popup-content a:link,
.leaflet-popup-content a:visited{
  color:#0645ad;
  text-decoration:underline;
}
.leaflet-popup-content a:hover,
.leaflet-popup-content a:focus{
  color:#0b0080;
  text-decoration:underline;
}

.fg-label{
  background:transparent;border:0;box-shadow:none;color:#17243b;font-weight:700;
  font-size:12px;white-space:nowrap;text-shadow:0 1px 2px #fff,1px 0 2px #fff,-1px 0 2px #fff
}
@media(max-width:900px){
  .map-shell{height:700px}
  #legend{width:190px}
}

.county-map-actions{
  width:1600px;
  max-width:calc(100vw - 24px);
  margin:14px auto 0;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}
.county-map-actions .map-btn{
  height:42px;
  min-width:0;
  padding:0 4px;
  border:1px solid #c9af00;
  border-radius:8px;
  background:rgb(247,212,8);
  color:#111;
  font-family:Arial,Helvetica,sans-serif;
  font-size:11px;
  font-weight:700;
  cursor:pointer;
  white-space:nowrap;
}
@media(max-width:900px){
  .county-map-actions{grid-template-columns:1fr}
}



.historical-page{width:1600px;max-width:calc(100vw - 24px);margin:28px auto 0}
.historical-shell{position:relative;width:100%;height:850px;background:#fff;border:1px solid #cfd8e1;box-shadow:0 2px 9px rgba(0,0,0,.12);overflow:hidden}
#slubBaseMap{width:100%;height:100%}
#slubFamgenLegend,#slubHistoricalLegend{position:absolute;z-index:1000;right:12px;width:245px;max-height:385px;overflow:auto;background:#fff;padding:12px 14px;border-radius:8px;box-shadow:0 2px 10px #777;font:13px Arial,Helvetica,sans-serif}
#slubFamgenLegend{top:12px}
#slubHistoricalLegend{top:425px}
#slubFamgenLegend h3,#slubHistoricalLegend h3{margin:0 0 8px;font-size:15px}
#slubFamgenLegend .county,#slubHistoricalLegend .sub{font-size:11px;color:#61798d;margin-bottom:9px;line-height:1.3}
#slubFamgenLayers label{display:flex;align-items:center;gap:7px;margin:5px 0;cursor:pointer}
#slubFamgenLayers input{margin:0}
@media(max-width:900px){.historical-shell{height:700px}#slubFamgenLegend,#slubHistoricalLegend{width:195px}#slubHistoricalLegend{top:400px}}

.historical-action-row{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:18px;
  width:100%;
  margin:22px 0 0;
  align-items:stretch;
}
.historical-action-row a.historical-action-btn{
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:0;
  min-height:46px;
  box-sizing:border-box;
  padding:10px 12px;
  border:1px solid #d2b500;
  border-radius:10px;
  background:rgb(247,212,8);
  color:#111;
  font:700 16px Arial,Helvetica,sans-serif;
  text-align:center;
  text-decoration:none;
  cursor:pointer;
}
.historical-action-row a.historical-action-btn:hover,
.historical-action-row a.historical-action-btn:focus{
  background:rgb(247,212,8);
  filter:brightness(.97);
  color:#111;
  text-decoration:none;
}
@media(max-width:900px){
  .historical-action-row{grid-template-columns:1fr;}
}



.ohm-timeline{
  position:absolute;
  left:50%;
  bottom:18px;
  transform:translateX(-50%);
  z-index:950;
  width:min(760px,calc(100% - 620px));
  min-width:420px;
  box-sizing:border-box;
  padding:10px 14px 8px;
  background:rgba(255,255,255,.94);
  border:1px solid #bbb;
  border-radius:8px;
  box-shadow:0 2px 8px rgba(0,0,0,.22);
  font:14px Arial,Helvetica,sans-serif;
}
.ohm-timeline-row{
  display:grid;
  grid-template-columns:54px 1fr 58px;
  gap:10px;
  align-items:center;
}
.ohm-timeline-title{font-weight:700;}
.ohm-timeline input[type="range"]{width:100%;margin:0;}
.ohm-timeline-year{
  font-size:18px;
  font-weight:700;
  text-align:right;
}
.ohm-timeline-scale{
  display:flex;
  justify-content:space-between;
  margin:3px 68px 0 64px;
  color:#666;
  font-size:11px;
}
@media(max-width:900px){
  .ohm-timeline{width:calc(100% - 30px);min-width:0;bottom:12px;}
}
