html, body { margin: 0; height: 100%; }
#map { position: absolute; inset: 0; background: #e9e5dc; }

/* --- typografi --- */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1f2937;
}

/* --- info-knapp + panel --- */
#infoToggle {
  position: absolute; top: 12px; left: 12px; z-index: 1000;
  background: #fff; border: 1px solid #d6d3cc; border-radius: 8px;
  padding: 8px 12px; font-size: 14px; font-weight: 600; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
}
#infoToggle:hover { background: #fafaf8; }

#infoPanel {
  position: absolute; top: 12px; left: 12px; z-index: 1001;
  width: min(360px, calc(100vw - 24px));
  max-height: calc(100vh - 24px); overflow-y: auto;
  background: #fff; border-radius: 12px; padding: 18px 20px 20px;
  box-shadow: 0 6px 28px rgba(0,0,0,.24);
}
#infoPanel.hidden { display: none; }
#infoClose {
  position: absolute; top: 8px; right: 10px; border: none; background: none;
  font-size: 26px; line-height: 1; cursor: pointer; color: #9ca3af;
}
#infoClose:hover { color: #374151; }

#infoPanel h1 { font-size: 20px; margin: 0 24px 2px 0; }
#infoPanel .sub { margin: 0 0 12px; color: #6b7280; font-size: 13px; }
#infoPanel p { font-size: 13.5px; line-height: 1.5; margin: 10px 0; }
#infoPanel h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em;
  color: #6b7280; margin: 4px 0 8px; }

.legend-block { margin: 14px 0; padding: 12px; background: #faf9f6;
  border: 1px solid #eee7db; border-radius: 8px; }
.lg { display: flex; align-items: center; font-size: 13px; margin: 5px 0; }
.sw { width: 20px; height: 14px; border-radius: 3px; margin-right: 9px; display: inline-block; }
.dot { width: 13px; height: 13px; border-radius: 50%; margin: 0 9px 0 3px;
  background: #7f1d1d; border: 2px solid #fff; box-shadow: 0 0 0 1px #7f1d1d; display: inline-block; }

.warn { background: #fef2f2; border: 1px solid #fecaca; color: #7f1d1d;
  border-radius: 8px; padding: 10px 12px; font-size: 12.5px; line-height: 1.5; margin: 12px 0; }
.warn a { color: #991b1b; }
.note { background: #f0f9ff; border: 1px solid #bae6fd; color: #075985;
  border-radius: 8px; padding: 10px 12px; font-size: 12.5px; line-height: 1.5; margin: 12px 0; }

details { margin-top: 12px; font-size: 13px; }
details summary { cursor: pointer; font-weight: 600; color: #374151; }
details ul { margin: 8px 0; padding-left: 18px; }
details li { margin: 3px 0; }
.tiny { font-size: 11.5px; color: #6b7280; line-height: 1.45; }

/* --- popups --- */
.leaflet-popup-content { margin: 12px 14px; font-size: 13px; line-height: 1.45; }
.pop-title { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.pop-score { font-size: 22px; font-weight: 800; }
.pop-grid { display: grid; grid-template-columns: auto auto; gap: 1px 12px; margin-top: 8px; }
.pop-grid dt { color: #6b7280; }
.pop-grid dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.bar { height: 5px; border-radius: 3px; background: #e5e7eb; margin-top: 3px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: #d97706; }

/* --- sesong-badge (timing) --- */
#timingBadge {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 1000; background: #fff; border-radius: 20px; padding: 7px 15px;
  font-size: 13.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,.22); border-left: 6px solid #9ca3af;
}
#timingBadge.hidden, #timingDetail.hidden { display: none; }
#timingDetail {
  position: absolute; top: 52px; left: 50%; transform: translateX(-50%);
  z-index: 1000; background: #fff; border-radius: 10px; padding: 12px 15px;
  width: min(320px, calc(100vw - 24px)); box-shadow: 0 6px 24px rgba(0,0,0,.24);
  font-size: 12.5px; line-height: 1.55;
}
#timingDetail h3 { margin: 0 0 6px; font-size: 13px; }
#timingDetail ul { margin: 6px 0 4px; padding-left: 18px; }
#timingDetail .advice { font-weight: 600; margin-top: 6px; }
#timingDetail .src { color: #9ca3af; font-size: 11px; margin-top: 8px; }

/* --- lokaliser-knapp --- */
.locate-btn { font-size: 18px; line-height: 30px; text-align: center; cursor: pointer;
  width: 34px; height: 34px; display: block; }

/* --- fangst-logg --- */
.minibtn { font-size: 12px; font-weight: 600; border: 1px solid #d6d3cc; background: #fff;
  border-radius: 6px; padding: 5px 10px; cursor: pointer; margin-right: 6px; }
.minibtn:hover { background: #faf9f6; }
.leaflet-container.logmode { cursor: crosshair; }
.logform label { display: block; font-size: 13px; margin: 3px 0; cursor: pointer; }
.logform input[type="text"] { width: 100%; box-sizing: border-box; margin-top: 6px;
  padding: 5px 7px; border: 1px solid #d6d3cc; border-radius: 6px; font-size: 13px; }
