* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #0f1115;
  color: white;
}

.topbar {
  min-height: 70px;
  background: #151821;
  border-bottom: 1px solid #2b3040;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
}

.logo {
  font-size: 26px;
  font-weight: 800;
}

.subtitle {
  color: #9ca3af;
  font-size: 13px;
  margin-top: 2px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.main-nav {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
}

.main-nav a {
  color: #d1d5db;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 9px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
  background: #252b3a;
  color: #7dd3fc;
}

#searchInput {
  width: 300px;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid #303545;
  background: #0f1115;
  color: white;
  outline: none;
}

#searchInput:focus {
  border-color: #4f8cff;
}

#reportBtn {
  padding: 11px 15px;
  border: none;
  border-radius: 10px;
  background: #4f8cff;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

#reportBtn:hover {
  background: #3977e8;
}

.app {
  display: flex;
  height: calc(100vh - 70px);
}

.map-wrap {
  flex: 1;
  position: relative;
}

#map {
  width: 100%;
  height: 100%;
}

.map-status {
  position: absolute;
  bottom: 66px;
  left: 18px;
  z-index: 500;
  background: rgba(15, 17, 21, 0.92);
  border: 1px solid #303545;
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #d1d5db;
}

.sidebar {
  width: 420px;
  background: #11141c;
  border-left: 1px solid #2b3040;
  padding: 15px 15px 70px;
  overflow-y: auto;
}

.sidebar h2 {
  margin: 14px 0;
  font-size: 20px;
}

.filters,
.area-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.area-filters {
  align-items: center;
  margin-bottom: 10px;
}

.filter-label {
  color: #9ca3af;
  font-size: 12px;
  font-weight: 700;
}

.filter,
.area-filter {
  border: 1px solid #303545;
  background: #191d29;
  color: #d1d5db;
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
}

.filter:hover,
.filter.active,
.area-filter:hover,
.area-filter.active {
  background: #4f8cff;
  border-color: #4f8cff;
  color: white;
}

.event {
  background: #191d29;
  border: 1px solid #2b3040;
  padding: 13px;
  margin-bottom: 12px;
  border-radius: 14px;
  border-left: 5px solid #777;
  cursor: pointer;
}

.event:hover {
  background: #202535;
}

.event-category {
  font-size: 13px;
  opacity: 0.85;
}

.event-title {
  font-weight: 800;
  margin: 6px 0;
}

.event-desc {
  font-size: 14px;
  color: #d1d5db;
  line-height: 1.35;
}

.event-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #9ca3af;
  margin-top: 9px;
}

.apa { border-left-color: #0ea5e9; }
.electricitate,
.curent { border-left-color: #facc15; }
.incident {
  border-left-color: #dc2626;
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.14), #191d29 35%);
}
.drumuri { border-left-color: #f97316; }
.drum_inchis { border-left-color: #c2410c; }
.lucrari { border-left-color: #f97316; }
.restrictie_circulatie { border-left-color: #f59e0b; }
.deviere { border-left-color: #14b8a6; }
.inchidere_temporara { border-left-color: #ea580c; }
.cultural,
.eveniment { border-left-color: #8b5cf6; }
.pierdut { border-left-color: #2ecc71; }
.incendiu { border-left-color: #dc2626; }

.severity-high {
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.35);
}

.no-results {
  color: #9ca3af;
  text-align: center;
  margin-top: 40px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

.hidden {
  display: none !important;
}

.modal-box {
  width: 420px;
  background: #151821;
  border: 1px solid #303545;
  border-radius: 16px;
  padding: 20px;
}

.modal-box input,
.modal-box textarea {
  width: 100%;
  margin-bottom: 10px;
  padding: 11px;
  border-radius: 10px;
  border: 1px solid #303545;
  background: #0f1115;
  color: white;
}

.modal-box textarea {
  height: 100px;
  resize: none;
}

.modal-box button {
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: 10px;
  background: #4f8cff;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

.wip-notice {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 700;
  padding: 8px 18px;
  border-top: 1px solid rgba(48, 53, 69, 0.9);
  background: rgba(17, 20, 28, 0.94);
  color: #9ca3af;
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
  backdrop-filter: blur(8px);
}

.report-modal-box {
  width: min(760px, calc(100vw - 32px));
  max-height: 92vh;
  overflow-y: auto;
}

.modal-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal-heading h2 {
  margin: 0;
}

.modal-eyebrow {
  margin: 0 0 5px;
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.modal-box .modal-close {
  width: 38px;
  min-width: 38px;
  padding: 5px;
  border: 1px solid #303545;
  background: #191d29;
  color: #d1d5db;
  font-size: 24px;
  line-height: 26px;
}

.report-intro {
  margin: 12px 0 20px;
  color: #b8c0ce;
  font-size: 14px;
  line-height: 1.5;
}

.report-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.report-form-grid label {
  display: grid;
  gap: 7px;
  color: #d1d5db;
  font-size: 13px;
  font-weight: 700;
}

.report-form-grid .report-full {
  grid-column: 1 / -1;
}

.report-form-grid input,
.report-form-grid textarea,
.report-form-grid select {
  width: 100%;
  margin: 0;
  padding: 11px;
  border: 1px solid #303545;
  border-radius: 10px;
  outline: none;
  background: #0f1115;
  color: white;
  font: inherit;
}

.report-form-grid input:focus,
.report-form-grid textarea:focus,
.report-form-grid select:focus {
  border-color: #4f8cff;
}

.report-form-grid textarea {
  height: auto;
  min-height: 92px;
  resize: vertical;
}

.report-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.report-map-help,
.map-attribution-note {
  margin: 15px 0 8px;
  color: #9ca3af;
  font-size: 12px;
  line-height: 1.45;
}

.map-attribution-note {
  margin-top: 7px;
}

#reportMap {
  height: 280px;
  border: 1px solid #303545;
  border-radius: 12px;
  overflow: hidden;
}

.report-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.modal-box .report-actions button {
  width: auto;
}

.modal-box .report-actions .report-secondary {
  background: #2b3040;
}

.report-message {
  min-height: 20px;
  margin: 12px 0 0;
  color: #fca5a5;
  font-size: 13px;
}

.report-message.success {
  color: #86efac;
}

@media (max-width: 1200px) {
  .topbar {
    height: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .top-actions {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
  }

  .main-nav {
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  #searchInput {
    width: 100%;
  }

  .app {
    height: calc(100vh - 185px);
  }
}

@media (max-width: 900px) {
  .app {
    flex-direction: column;
  }

  .map-wrap {
    height: 58%;
  }

  .sidebar {
    width: 100%;
    height: 42%;
    border-left: none;
    border-top: 1px solid #2b3040;
  }
}
.local-clock{
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:flex-end;
    margin-right:10px;
    min-width:120px;
}

#localClockTime{
    font-size:22px;
    font-weight:700;
    color:#fff;
    line-height:1;
    font-variant-numeric:tabular-nums;
}

#localClockDate{
    margin-top:4px;
    font-size:12px;
    color:#9ca3af;
}

#lastUpdated{
    color:#7dd3fc;
    font-weight:600;
}

.event-countdown{
    margin-top:8px;
    font-size:13px;
    color:#ffcc66;
    font-weight:600;
}

@media (max-width: 560px) {
  .local-clock {
    display: none;
  }

  .top-actions {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .report-form-grid {
    grid-template-columns: 1fr;
  }

  .report-form-grid .report-full {
    grid-column: auto;
  }

  .report-modal-box {
    max-height: 95vh;
    padding: 18px;
  }

  #reportMap {
    height: 230px;
  }

  .wip-notice {
    padding: 6px 10px;
    font-size: 10px;
  }
}

.event-status {
  margin-top: 8px;
  color: #b45309;
  font-size: 12px;
  font-weight: 700;
}

.event-source-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 9px;
  color: #9ca3af;
  font-size: 11px;
}

.event-source-meta a {
  color: #7dd3fc;
  font-weight: 700;
}

.overlay-panel {
  position: absolute;
  z-index: 500;
  top: 12px;
  right: 12px;
  width: min(260px, calc(100% - 24px));
  border: 1px solid #303545;
  border-radius: 12px;
  background: rgba(15, 17, 21, .94);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
  overflow: hidden;
}

.overlay-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: #fff;
  font-weight: 800;
}

.overlay-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px 8px;
  padding: 4px 10px 10px;
}

.overlay-option {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #d1d5db;
  font-size: 11px;
  cursor: pointer;
}

.city-summary,
.my-street-card {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #303545;
  border-radius: 12px;
  background: #171a22;
}

.city-score {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #a7f3d0;
}

.city-score strong { font-size: 30px; }
.city-score span { font-size: 13px; font-weight: 800; }
.city-summary details { margin-top: 5px; color: #9ca3af; font-size: 11px; }
.city-summary ul { margin: 7px 0 0; padding-left: 18px; }

.section-heading h2 { margin: 2px 0 8px; }
.eyebrow { color: #7dd3fc; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.street-search { display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.street-search input {
  min-width: 0;
  padding: 9px;
  border: 1px solid #303545;
  border-radius: 8px;
  background: #0f1115;
  color: #fff;
}
.street-search button { width: auto; padding: 8px 10px; }
.street-result { margin-top: 9px; color: #cbd5e1; font-size: 12px; line-height: 1.45; }
.street-result > b { display: block; margin-bottom: 7px; color: #fff; }
.street-result ul { margin: 8px 0; padding-left: 18px; }
.street-statuses { display: grid; gap: 4px; }
.street-statuses span { padding: 5px 7px; border-radius: 6px; }
.street-statuses .clear { background: #143327; color: #86efac; }
.street-statuses .has-event { background: #4a2f13; color: #fdba74; }

.module-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 9px; }
.module-tab { border-radius: 8px 8px 0 0; background: #252a38; }
.module-tab.active { background: #2563eb; }
.module-panel { margin-bottom: 15px; }
.timeline-group { margin-bottom: 10px; }
.timeline-group h3 {
  display: flex;
  justify-content: space-between;
  margin: 6px 0;
  color: #e5e7eb;
  font-size: 13px;
}
.timeline-group h3 span { color: #7dd3fc; }
.timeline-group p { color: #6b7280; font-size: 11px; }
.timeline-item,
.beach-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  margin-bottom: 5px;
  padding: 9px;
  text-align: left;
  background: #1d2230;
}
.timeline-item small,
.beach-card small { display: block; margin-top: 3px; color: #9ca3af; }
.beach-card { flex-direction: row; justify-content: space-between; }
.beach-card > span:last-child { text-align: right; color: #7dd3fc; }

.city-data-marker { background: transparent; border: 0; }
.city-data-marker span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 3px 9px rgba(0, 0, 0, .45);
  font-size: 17px;
}

.event-popup-urgent {
  border-left: 5px solid #dc2626;
  padding-left: 9px;
}

.urgent-marker {
  animation: urgent-pulse 1.4s ease-in-out infinite;
}

@keyframes urgent-pulse {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(220, 38, 38, 0.4)); }
  50% { filter: drop-shadow(0 0 9px rgba(220, 38, 38, 0.95)); }
}

/* Interfața principală: contrast, ritm și ierarhie vizuală. */
:root {
  --surface: #111620;
  --surface-raised: #171e2b;
  --surface-hover: #202a3b;
  --line: #293448;
  --muted: #91a0b7;
  --text: #f4f7fb;
  --accent: #4f8cff;
  --accent-soft: rgba(79, 140, 255, .14);
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--text);
}

.sidebar {
  width: clamp(390px, 31vw, 470px);
  padding: 16px 18px 72px;
  border-left-color: var(--line);
  background:
    radial-gradient(circle at 90% 0, rgba(79, 140, 255, .08), transparent 260px),
    #0e131c;
  scrollbar-color: #33415a transparent;
  scrollbar-width: thin;
}

.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: #33415a;
  background-clip: padding-box;
}

.city-summary,
.my-street-card {
  margin-bottom: 12px;
  padding: 15px;
  border-color: var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(26, 34, 49, .98), rgba(17, 23, 34, .98));
  box-shadow: 0 12px 30px rgba(0, 0, 0, .14);
}

.city-score {
  gap: 12px;
  color: #8df2c2;
}

.city-score strong {
  font-size: 34px;
  line-height: 1;
  letter-spacing: -1.5px;
}

.city-score span {
  color: #d8fff0;
  font-size: 14px;
}

.city-summary details {
  margin-top: 10px;
  color: var(--muted);
}

.city-summary summary {
  width: fit-content;
  cursor: pointer;
  color: #b9c7da;
  font-weight: 650;
}

.city-summary details[open] {
  padding-top: 2px;
}

.section-heading h2 {
  margin: 2px 0 11px;
  font-size: 22px;
  letter-spacing: -.45px;
}

.street-search {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.street-search input {
  height: 42px;
  padding: 0 12px;
  border-color: #344158;
  background: #0c1119;
}

.street-search input:focus {
  border-color: var(--accent);
  outline: 3px solid var(--accent-soft);
}

.street-search button {
  height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 750;
  cursor: pointer;
}

.street-result {
  margin-top: 11px;
  color: #b9c5d6;
}

.module-tabs {
  position: sticky;
  z-index: 4;
  top: -16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin: 0 -2px 12px;
  padding: 8px 2px;
  background: rgba(14, 19, 28, .94);
  backdrop-filter: blur(10px);
}

.module-tab {
  min-height: 38px;
  padding: 8px 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #151c28;
  color: #aebbd0;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.module-tab:hover {
  border-color: #40506a;
  background: #1c2534;
  color: #fff;
}

.module-tab.active {
  border-color: #5d97ff;
  background: linear-gradient(135deg, #3979ec, #2864d6);
  color: #fff;
  box-shadow: 0 7px 18px rgba(42, 104, 220, .22);
}

.module-panel { margin-bottom: 8px; }

.timeline-group {
  margin: 0 0 14px;
}

.timeline-group h3 {
  margin: 0 0 7px;
  padding: 0 2px;
  color: #eaf0f8;
  font-size: 13px;
}

.timeline-group h3 span {
  min-width: 23px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(56, 189, 248, .12);
  color: #67d3ff;
  text-align: center;
}

.timeline-item,
.beach-card {
  min-height: 58px;
  margin-bottom: 7px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
  color: var(--text);
  font: inherit;
  line-height: 1.25;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.timeline-item:hover,
.beach-card:hover {
  border-color: #405476;
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.timeline-item b {
  color: #f4f7fb;
  font-size: 13px;
  font-weight: 720;
}

.timeline-item {
  position: relative;
  overflow: hidden;
  padding: 12px 13px 12px 15px;
  border-left: 4px solid #64748b;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .1);
}
.timeline-type {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(100, 116, 139, .16);
  color: #cbd5e1;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}
.timeline-type i { font-style: normal; }
.timeline-type-apa { border-left-color: #0ea5e9; }
.timeline-type-electricitate { border-left-color: #facc15; }
.timeline-type-termoficare { border-left-color: #ef4444; }
.timeline-type-lucrari { border-left-color: #f97316; }
.timeline-type-trafic { border-left-color: #f59e0b; }
.timeline-type-meteo { border-left-color: #38bdf8; }
.timeline-type-plaje { border-left-color: #06b6d4; }
.timeline-type-raportari { border-left-color: #ec4899; }

.timeline-item small,
.beach-card small {
  color: #92a6c2;
  font-size: 10.5px;
}

.filters,
.area-filters {
  gap: 7px;
}

.area-filters {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #121925;
}

.filter,
.area-filter {
  border-color: var(--line);
  background: #171e2a;
  color: #b8c4d5;
}

.event {
  border-color: var(--line);
  background: var(--surface-raised);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .1);
}

.event:hover {
  background: var(--surface-hover);
}

.overlay-panel {
  width: 276px;
  border-color: rgba(70, 86, 111, .85);
  border-radius: 15px;
  background: rgba(15, 21, 31, .94);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .3);
  backdrop-filter: blur(12px);
}

.overlay-toggle {
  padding: 12px 14px 9px;
  font-size: 13px;
  cursor: pointer;
}

.overlay-options {
  gap: 7px 10px;
  padding: 7px 13px 14px;
}

.overlay-option {
  min-height: 22px;
  color: #c7d1df;
  font-size: 11px;
}

.overlay-option input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: #151c27;
  color: #edf3fb;
}

.leaflet-popup-content {
  line-height: 1.4;
}

.leaflet-popup-content a { color: #7dd3fc; }

@media (max-width: 900px) {
  .sidebar {
    width: 100%;
    padding: 14px 14px 72px;
  }

  .module-tabs { top: -14px; }
}

@media (max-width: 560px) {
  .overlay-panel {
    top: 8px;
    right: 8px;
    width: min(250px, calc(100% - 16px));
  }

  .overlay-options { grid-template-columns: 1fr; }
  .street-search { grid-template-columns: 1fr; }
  .street-search button { width: 100%; }
}

/* City data card, lightweight weather layers and mobile bottom sheet. */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  touch-action: manipulation;
}

.now-card {
  position: absolute;
  z-index: 510;
  top: 12px;
  right: 12px;
  width: 290px;
  min-height: 132px;
  padding: 13px 14px;
  border: 1px solid rgba(100, 116, 139, .55);
  border-radius: 17px;
  background: rgba(13, 20, 31, .93);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .3);
  color: var(--text);
  text-align: left;
  backdrop-filter: blur(14px);
  cursor: pointer;
}

.now-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.now-card-heading > span:first-child {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.now-card-heading small,
.now-freshness,
.now-details small {
  color: #91a0b7;
  font-size: 10px;
}

.now-card-heading strong { font-size: 14px; }
.now-expand { color: #7dd3fc; transition: transform .18s ease; }
.now-card[aria-expanded="true"] .now-expand { transform: rotate(180deg); }

.now-compact {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 7px 10px;
  color: #cbd5e1;
  font-size: 11px;
}

.now-temperature {
  grid-row: span 2;
  color: #fff;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
}

.status-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 23px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #263245;
  color: #dbeafe;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.status-badge.good { background: rgba(22, 163, 74, .2); color: #86efac; }
.status-badge.moderate { background: rgba(245, 158, 11, .19); color: #fcd34d; }
.status-badge.poor { background: rgba(239, 68, 68, .18); color: #fca5a5; }

.now-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid #293448;
}

.now-details[hidden] { display: none; }
.now-details span { display: grid; gap: 2px; }
.now-details b { color: #edf4ff; font-size: 11px; }
.now-details .now-wide { grid-column: span 2; }
.now-details .now-source { grid-column: 1 / -1; }
.now-freshness { display: block; margin-top: 9px; }

.skeleton-card { pointer-events: none; }
.skeleton-line {
  height: 20px;
  border-radius: 7px;
  background: linear-gradient(90deg, #202a3b 25%, #2c394e 50%, #202a3b 75%);
  background-size: 200% 100%;
  animation: skeleton 1.2s infinite linear;
}
@keyframes skeleton { to { background-position: -200% 0; } }

.overlay-panel { top: 158px; }
.overlay-option b { font-weight: 650; }

.map-legend {
  position: absolute;
  z-index: 509;
  bottom: 34px;
  left: 12px;
  width: min(390px, calc(100% - 24px));
  overflow: hidden;
  border: 1px solid rgba(71, 85, 105, .72);
  border-radius: 13px;
  background: rgba(13, 20, 31, .91);
  color: #dbeafe;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
  backdrop-filter: blur(12px);
}
.legend-toggle {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  padding: 7px 11px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
}
.legend-toggle[aria-expanded="true"] span:last-child { transform: rotate(180deg); }
.legend-content {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 13px;
  padding: 0 11px 10px;
}
.legend-group { min-width: 118px; }
.legend-group > b { display: block; margin-bottom: 4px; color: #f8fafc; font-size: 10px; }
.legend-group > div { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.legend-group small { display: block; margin-top: 4px; color: #91a0b7; font-size: 8px; }
.legend-item { display: inline-flex; align-items: center; gap: 4px; color: #aebbd0; font-size: 9px; }
.legend-item i {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--legend-color);
}
.legend-gradient .legend-item i { border-radius: 2px; }

.timeline-tabs {
  position: sticky;
  z-index: 6;
  top: 44px;
  display: flex;
  gap: 6px;
  margin: 0 0 10px;
  padding: 6px 0;
  overflow-x: auto;
  background: var(--panel);
  scrollbar-width: none;
}
.timeline-tabs::-webkit-scrollbar { display: none; }
.timeline-tab {
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid #344158;
  border-radius: 999px;
  background: #182131;
  color: #afbdd0;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}
.timeline-tab.active {
  border-color: #0ea5e9;
  background: #075985;
  color: #fff;
}

.wind-arrow-marker {
  border: 0;
  background: transparent;
  color: #0369a1;
  text-align: center;
  opacity: .66;
  filter: drop-shadow(0 1px 1px rgba(255, 255, 255, .75));
  pointer-events: none;
}
.wind-arrow-marker span {
  display: block;
  color: #0284c7;
  font-size: 26px;
  font-weight: 900;
  line-height: 24px;
}
.wind-arrow-marker small { font-size: 8px; font-weight: 800; }
.city-data-marker span { background: var(--marker); }
.beach-marker-selected span {
  outline: 4px solid rgba(125, 211, 252, .48);
  transform: scale(1.14);
  transition: transform .16s ease, outline .16s ease;
}

.sheet-handle {
  display: none;
  width: 100%;
  min-height: 48px;
  border: 0;
  background: transparent;
  color: #e5edf8;
  font: inherit;
}
.sheet-handle span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 42px;
  height: 4px;
  border-radius: 99px;
  background: #4b5a70;
  transform: translateX(-50%);
}
.sheet-handle b { margin-top: 7px; font-size: 12px; }

.mobile-detail {
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid #344158;
  border-radius: 15px;
  background: #171f2c;
}
.mobile-detail-heading {
  display: flex;
  justify-content: space-between;
}
.mobile-detail-heading button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #263246;
  color: #fff;
  font-size: 22px;
}
.mobile-detail h2 { margin: 4px 0 8px; font-size: 19px; }
.mobile-detail p { color: #c3cede; font-size: 13px; line-height: 1.45; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 9px 0; }
.detail-share,
.inline-share,
.event-share {
  min-height: 38px;
  margin-top: 10px;
  padding: 0 12px;
  border: 1px solid #40506a;
  border-radius: 10px;
  background: #202a3a;
  color: #dbeafe;
  font-weight: 750;
  cursor: pointer;
}
.event-share { min-height: 34px; font-size: 11px; }

.beach-card {
  position: relative;
  display: block;
  padding: 0;
  overflow: hidden;
}
.beach-main {
  width: 100%;
  min-height: 138px;
  padding: 12px 42px 10px 12px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.beach-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.beach-title b { font-size: 13px; }
.beach-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin: 11px 0 7px;
}
.beach-metrics > span { display: grid; gap: 2px; }
.beach-metrics small { margin: 0; }
.beach-metrics b { color: #eaf4ff; font-size: 11px; }
.beach-updated { display: block; }
.beach-risks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 7px;
}
.beach-risks i {
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(239, 68, 68, .14);
  color: #fca5a5;
  font-size: 9px;
  font-style: normal;
  font-weight: 750;
}
.beach-risks .risk-clear { background: rgba(22, 163, 74, .14); color: #86efac; }
.card-share {
  position: absolute;
  top: 48px;
  right: 8px;
  width: 34px;
  height: 34px;
  border: 1px solid #35435a;
  border-radius: 10px;
  background: #222d3e;
  color: #7dd3fc;
}
.beach-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.beach-detail-grid div {
  padding: 9px;
  border-radius: 10px;
  background: #111824;
}
.beach-detail-grid dt { color: #91a0b7; font-size: 10px; }
.beach-detail-grid dd { margin: 3px 0 0; font-size: 13px; font-weight: 800; }

.app-toast {
  position: fixed;
  z-index: 100000;
  bottom: 24px;
  left: 50%;
  padding: 10px 15px;
  border-radius: 10px;
  background: #e5eefb;
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: .2s ease;
  pointer-events: none;
}
.app-toast.visible { opacity: 1; transform: translate(-50%, 0); }

.cookie-consent-root {
  position: fixed !important;
  z-index: 100100;
  inset: 0 !important;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  contain: strict;
  isolation: isolate;
  pointer-events: none;
}
.cookie-consent {
  position: absolute;
  right: 50%;
  bottom: 18px;
  width: min(680px, calc(100vw - 36px));
  padding: 16px;
  border: 1px solid #40506a;
  border-radius: 16px;
  background: #151d2a;
  box-shadow: 0 18px 55px rgba(0, 0, 0, .48);
  color: #eef5ff;
  transform: translateX(50%);
  pointer-events: auto;
}
.cookie-copy strong { font-size: 14px; }
.cookie-copy p { margin: 5px 0 4px; color: #b7c3d5; font-size: 12px; line-height: 1.4; }
.cookie-copy a { color: #7dd3fc; font-size: 11px; font-weight: 750; }
.cookie-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.cookie-consent button,
.cookie-settings {
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid #40506a;
  border-radius: 10px;
  background: #222d3e;
  color: #e5edf8;
  font-weight: 750;
  cursor: pointer;
}
.cookie-consent .cookie-accept { border-color: #0284c7; background: #0369a1; color: #fff; }
.cookie-options {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #344158;
}
.cookie-options label { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.cookie-options label span { display: grid; gap: 2px; }
.cookie-options small { color: #91a0b7; font-size: 10px; }
.cookie-options input { width: 22px; height: 22px; accent-color: #0284c7; }
.cookie-options .cookie-save { margin-top: 10px; background: #26364d; }
.cookie-settings {
  position: absolute;
  right: 14px;
  bottom: 14px;
  min-height: 38px;
  background: rgba(21, 29, 42, .94);
  font-size: 11px;
  pointer-events: auto;
}

.skeleton-list {
  display: grid;
  gap: 10px;
  min-height: 92px;
  padding: 13px;
  pointer-events: none;
}
.skeleton-list .skeleton-line:nth-child(2) { width: 82%; }
.skeleton-list .skeleton-line:nth-child(3) { width: 58%; }

@media (max-width: 900px) {
  body { overflow: hidden; }
  .topbar {
    position: fixed;
    z-index: 900;
    top: 0;
    right: 0;
    left: 0;
    min-height: 104px;
    padding: 8px 10px;
    gap: 7px;
  }
  .brand { display: flex; align-items: baseline; gap: 8px; }
  .logo { font-size: 20px; }
  .subtitle { font-size: 10px; }
  .main-nav { display: none; }
  .top-actions { grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
  #searchInput { min-height: 44px; font-size: 16px; }
  #reportBtn {
    width: 46px;
    min-height: 44px;
    padding: 0;
    overflow: hidden;
    font-size: 0;
  }
  #reportBtn::before { content: "+"; font-size: 23px; }
  .app {
    position: fixed;
    inset: 104px 0 0;
    display: block;
    height: auto;
  }
  .map-wrap { width: 100%; height: 100%; }
  .sidebar {
    position: fixed;
    z-index: 800;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: min(78vh, 720px);
    padding: 0 12px calc(22px + env(safe-area-inset-bottom));
    border: 1px solid #344158;
    border-bottom: 0;
    border-radius: 20px 20px 0 0;
    background: rgba(13, 19, 29, .98);
    box-shadow: 0 -18px 50px rgba(0, 0, 0, .42);
    transform: translateY(calc(100% - 68px));
    transition: transform .25s cubic-bezier(.2, .8, .2, 1);
    overscroll-behavior: contain;
    scrollbar-width: none;
    backdrop-filter: blur(16px);
  }
  .sidebar.sheet-open { transform: translateY(0); }
  .sidebar::-webkit-scrollbar { display: none; }
  .sheet-handle {
    position: sticky;
    z-index: 8;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 -12px 8px;
    width: calc(100% + 24px);
    background: rgba(13, 19, 29, .98);
    touch-action: none;
  }
  .city-summary,
  .my-street-card { padding: 12px; }
  .city-summary { display: none; }
  .now-card {
    top: 8px;
    right: 8px;
    width: min(218px, calc(100% - 66px));
    min-height: 108px;
    padding: 10px 11px;
  }
  .now-card-heading { margin-bottom: 6px; }
  .now-temperature { font-size: 27px; }
  .now-compact { gap: 4px 8px; font-size: 9.5px; }
  .now-details { grid-template-columns: 1fr 1fr; }
  .now-details .now-wide { grid-column: 1 / -1; }
  .now-details .now-source { grid-column: 1 / -1; }
  .overlay-panel {
    top: 124px;
    right: 8px;
    width: 156px;
  }
  .overlay-toggle { min-height: 44px; padding: 10px 12px; }
  .overlay-options {
    grid-template-columns: 1fr 1fr;
    max-height: 48vh;
    overflow-y: auto;
    padding: 5px 9px 10px;
  }
  .overlay-option { min-height: 38px; font-size: 10px; }
  .overlay-option input { width: 20px; height: 20px; }
  .overlay-option span { display: none; }
  .map-legend {
    bottom: 76px;
    left: 8px;
    width: min(310px, calc(100% - 16px));
  }
  .legend-toggle { min-height: 44px; }
  .legend-content {
    max-height: 29vh;
    overflow-y: auto;
  }
  .map-status { display: none; }
  .leaflet-control-attribution { font-size: 8px; }
  .wip-notice { display: none; }
  .module-tabs { top: 48px; }
  .module-tab { min-height: 44px; }
  .timeline-tabs {
    top: 92px;
    margin-right: -12px;
    padding-right: 12px;
    scroll-snap-type: x proximity;
  }
  .timeline-tab {
    min-height: 44px;
    scroll-snap-align: start;
  }
  #timelineList {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  #timelineList::-webkit-scrollbar { display: none; }
  .timeline-group {
    flex: 0 0 min(84vw, 390px);
    scroll-snap-align: start;
  }
  .timeline-item { min-height: 54px; }
  #beachList { display: grid; gap: 9px; }
  .beach-card { min-width: 0; }
  .beach-main { min-height: 146px; }
  .filter,
  .area-filter { min-height: 40px; }
  .modal {
    align-items: flex-end;
    padding: 0;
  }
  .report-modal-box {
    width: 100%;
    max-height: 90vh;
    padding: 18px 14px calc(18px + env(safe-area-inset-bottom));
    border-radius: 20px 20px 0 0;
  }
  .cookie-consent {
    right: 0;
    bottom: 0;
    width: 100vw;
    max-height: min(52dvh, 430px);
    overflow-y: auto;
    padding: 15px 14px calc(14px + env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 18px 18px 0 0;
    transform: none;
  }
  .cookie-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; }
  .cookie-actions button { min-width: 0; padding: 0 8px; }
  .cookie-settings { bottom: calc(76px + env(safe-area-inset-bottom)); }
}

@media (max-width: 400px) {
  .subtitle { display: none; }
  .overlay-panel { width: 142px; }
  .overlay-options { grid-template-columns: 1fr; }
  .now-card { width: min(204px, calc(100% - 62px)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
