@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@500;600;700&family=Exo+2:wght@300;400;500;600&display=swap');

:root {
  /* LIGHT MODE (default) */
  --bg: #f4f7f5;
  --bg2: #ffffff;
  --bg3: #e9eee9;
  --border: #d0dcd3;
  --border2: #a8c2ae;
  --green: #1d9e75;
  --green-dark: #0f6e56;
  --green-muted: #5a9070;
  --green-faint: #8aaf96;
  --frost-gold: #e6bf24;
  --frost-gold-soft: rgba(232, 198, 64, 0.56);
  --frost-gold-faint: rgba(232, 198, 64, 0.24);
  --frost-gold-border: rgba(158, 127, 20, 0.40);
  --text: #0a0a0a;
  --text-dim: #111111;
  --text-muted: #111111;
  --amber: #c48010;
  --amber-bg: #fef4e0;
  --amber-border: #f0c970;
  --red: #c8323a;
  --red-bg: #fde8ea;
  --red-border: #f0a0a5;
  --blue: #2478d4;
  --blue-bg: #e0edf8;
  --shadow: 0 2px 8px rgba(20, 40, 30, 0.08);
  --shadow-lg: 0 8px 32px rgba(20, 40, 30, 0.15);
  --font-mono: 'IBM Plex Mono', Consolas, monospace;
  --font: 'Exo 2', sans-serif;
  --radius: 10px;
  --radius-lg: 14px;
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

body.dark {
  /* ── Dark cockpit palette — neutral grey, not green-tinted ── */
  --bg:           #0d0e11;
  --bg2:          #141518;
  --bg3:          #1c1e22;
  --border:       rgba(255,255,255,0.10);
  --border2:      rgba(255,255,255,0.18);
  /* greens kept only for FLY status & flight trail accents */
  --green:        #1dff88;
  --green-dark:   #00c96a;
  --green-muted:  #5a6068;
  --frost-gold:   #e6bf24;
  --frost-gold-soft: rgba(232, 198, 64, 0.50);
  --frost-gold-faint: rgba(232, 198, 64, 0.20);
  --frost-gold-border: rgba(232, 198, 64, 0.42);
  --green-faint:  rgba(255,255,255,0.05);
  --text:         #dde1e7;
  --text-dim:     #8a9099;
  --text-muted:   #52585f;
  --amber:        #f0b840;
  --amber-bg:     #1c1500;
  --amber-border: rgba(240,184,64,0.28);
  --red:          #f04050;
  --red-bg:       #1a0a0c;
  --red-border:   rgba(240,64,80,0.28);
  --blue:         #4aabff;
  --blue-bg:      #080f1a;
  --shadow:       0 2px 8px rgba(0,0,0,0.45);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.65);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: var(--font);
  font-variant-numeric: tabular-nums slashed-zero;
  font-feature-settings: "tnum" 1, "zero" 1;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.app {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ─────────────────────────── TOP BAR (floating) ─────────────────────────── */
.topbar {
  position: absolute;
  top: var(--safe-area-top);
  left: 0; right: 0;
  z-index: 500;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.topbar > * { pointer-events: auto; }

.user-zone-ribbon {
  position: absolute;
  top: 10px;
  left: 44px;
  right: 12px;
  min-height: 36px;
  border: 2px solid #111111;
  border-radius: 10px;
  background: #ffcf23;
  color: #111111;
  box-shadow: var(--shadow);
  display: flex;
  align-items: stretch;
  overflow: hidden;
  font-family: var(--font-mono);
}

/* Left section: opens the User Zone (keeps the original look) */
.uzr-main {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  background: transparent;
  border: none;
  color: #111111;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.uzr-main span,
.uzr-main strong { min-width: 0; line-height: 1; white-space: nowrap; }
.uzr-main span { font-size: 14px; font-weight: 900; letter-spacing: 1px; }
.uzr-main strong { overflow: hidden; text-overflow: ellipsis; font-size: 10px; font-weight: 900; letter-spacing: 0.25px; opacity: 0.82; }

/* Right section: HAVE IT ALL — inverse colours so it pops; hidden once a member */
.uzr-haveall {
  flex: 0 0 auto;
  border: none;
  border-radius: 8px;
  margin: 3px;
  background: #111111;
  color: #ffcf23;
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.5px;
  padding: 0 14px;
  cursor: pointer;
  white-space: nowrap;
}
.uzr-main { border-radius: 8px 0 0 8px; }
.uzr-haveall[hidden] { display: none; }

/* Dimmed "Have it all" upsell (e.g. inside Set & Notify) — inviting, not screaming */
.haveall-dim {
  display: block;
  width: 100%;
  text-align: left;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1.5px solid rgba(255,207,35,0.6);
  border-radius: 10px;
  background: rgba(255,207,35,0.12);
  color: var(--text);
  cursor: pointer;
  font-family: var(--font);
}
.haveall-dim span { display: block; font-weight: 900; font-size: 13px; letter-spacing: 0.3px; }
.haveall-dim small { display: block; margin-top: 3px; font-size: 11px; opacity: 0.72; }
.haveall-dim[hidden] { display: none; }

/* Subtle back-to-landing link in the User Zone */
.zone-home-link {
  display: inline-block;
  margin: 16px 0 4px;
  font-size: 12px;
  color: var(--text-dim);
  text-decoration: none;
  opacity: 0.82;
}
.zone-home-link:hover { text-decoration: underline; opacity: 1; }
/* Top-of-User-Zone variant: a clear return-to-landing link at the very top. */
.zone-home-link-top { margin: 2px 0 10px; font-weight: 700; }
/* Brand: green is banned (status-only). `.modal-panel a` paints all modal links green, which made
   these two utility links "screaming green" — override to plain readable dark text, underline only
   on hover. Higher specificity (.modal-panel a.zone-home-link) so it wins over the blanket rule. */
.modal-panel a.zone-home-link,
.modal-panel a.zone-home-link:visited {
  color: var(--text);
  text-decoration: none;
}
.modal-panel a.zone-home-link:hover {
  color: var(--text);
  text-decoration: underline;
}

.brand-pill {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 6px 12px 6px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow);
}

.brand-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--green-dark);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.search-pill {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow);
  position: relative;
}

.search-pill input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  outline: none;
  width: 100%;
}

.search-pill input::placeholder { color: var(--text-muted); }

.theme-btn {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  flex-shrink: 0;
  color: var(--text-dim);
}

.theme-btn:active { transform: scale(0.95); }
.theme-btn.active {
  color: #0c1a12;
  background: #1dff88;
  border-color: #1dff88;
  box-shadow: 0 0 0 1px rgba(29,255,136,0.5), 0 2px 10px rgba(29,255,136,0.35);
}

.landing-btn {
  text-decoration: none;
  color: var(--text-dim);
  width: auto;
  min-width: 82px;
  gap: 6px;
  padding: 0 10px;
  border-radius: 8px;
  background: #ffcf23;
  border-color: #111111;
  color: #111111;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
}

.landing-btn span {
  line-height: 1;
}

.landing-btn:active {
  transform: scale(0.95);
}

/* ─────────────────────────── SEARCH DROPDOWN ─────────────────────────── */
.search-dd {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 60vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 600;
}

.dd-region {
  padding: 8px 14px 4px;
  font-size: 9px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 2px;
  text-transform: uppercase;
  border-top: 1px solid var(--border);
  margin-top: 2px;
  background: var(--bg3);
}
.dd-region:first-child { border-top: none; margin-top: 0; }

.dd-item {
  padding: 12px 14px;
  font-size: 14px;
  color: #111111;
  cursor: pointer;
  font-family: var(--font-mono);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dd-item:last-child { border-bottom: none; }
.dd-item:active { background: var(--bg3); }

.dd-empty {
  padding: 20px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.dd-tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  font-family: var(--font-mono);
  letter-spacing: 1px;
}
.dd-tag.fpso { background: var(--blue-bg); color: var(--blue); }
.dd-tag.rig  { background: var(--amber-bg); color: var(--amber); }
.dd-flight .dd-tag { background: rgba(58,122,212,0.14); color: #2f64b3; }
.dd-operator {
  border-left: 4px solid #111111;
  background: rgba(17, 17, 17, 0.04);
}
.dd-operator span:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dd-operator strong {
  font-size: 13px;
  color: #111111;
  letter-spacing: 0.4px;
}
.dd-operator small {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ─────────────────────────── MAP ─────────────────────────── */
#map {
  flex: 1;
  width: 100%;
  height: 100%;
  background: var(--bg);
  z-index: 1;
}

/* Custom Leaflet overrides for our theme */
.leaflet-control-attribution {
  font-size: 9px !important;
  background: rgba(255, 255, 255, 0.7) !important;
  padding: 2px 6px !important;
}

body.dark .leaflet-control-attribution {
  background: rgba(10, 15, 10, 0.7) !important;
  color: var(--text-muted) !important;
}

body.dark .leaflet-control-attribution a { color: var(--green) !important; }

.leaflet-control-zoom {
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  overflow: hidden;
  box-shadow: var(--shadow) !important;
}

/* Push zoom controls below topbar — topbar is ~80px on mobile */
.leaflet-top.leaflet-right {
  margin-top: 130px !important;
}

.leaflet-control-zoom a {
  background: var(--bg2) !important;
  color: var(--text) !important;
  border-bottom: 1px solid var(--border) !important;
  font-family: var(--font) !important;
  font-weight: 400 !important;
}

.leaflet-control-zoom a:hover { background: var(--bg3) !important; }

/* ── PLATFORM MARKERS ───────────────────────────────────────────────────── */
/* Green dot  = production platform                                           */
/* Brown dot  = drilling rig                                                  */
/* Blue sq    = heliport / airport                                            */
/* Yellow +   = helicopter in flight (rotating cross)                         */

.marker-platform {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1d9e75;
  border: none;
  box-shadow: 0 0 0 1.5px rgba(0,0,0,0.5);
  cursor: pointer;
  transition: transform 0.15s;
}
.marker-platform:hover { transform: scale(1.5); }
.marker-platform.highlighted {
  width: 16px !important;
  height: 16px !important;
  background: #1dff88 !important;
  box-shadow: none;
  animation: pulse-marker 1.2s ease-in-out infinite;
  z-index: 9999 !important;
}

body.dark .marker-platform { box-shadow: 0 0 0 1.5px rgba(255,255,255,0.3); }

/* Drilling rig — brown/amber dot */
.marker-rig {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c47a20;
  border: none;
  box-shadow: 0 0 0 1.5px rgba(0,0,0,0.5);
  cursor: pointer;
  transition: transform 0.15s;
}
.marker-rig:hover { transform: scale(1.4); }
.marker-rig.highlighted {
  width: 16px; height: 16px;
  border-color: white;
  animation: pulse-marker-amber 1.5s infinite;
}

body.dark .marker-rig { border-color: rgba(0,0,0,0.6); }

/* Heliport / airport — blue square */
.marker-airport {
  width: 14px;
  height: 14px;
  background: var(--blue);
  border: 2px solid rgba(255,255,255,0.85);
  border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
  cursor: pointer;
}

/* Helicopter — yellow rotating cross */
.marker-chopper {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.45));
  transition: transform 0.15s;
}
.marker-chopper:hover { transform: scale(1.25); }

@keyframes pulse-marker {
  0%   { box-shadow: 0 0 0 0   rgba(29,222,122,0.9),  0 0 0 0   rgba(29,222,122,0.5); }
  50%  { box-shadow: 0 0 0 10px rgba(29,222,122,0.0), 0 0 0 18px rgba(29,222,122,0.0); }
  100% { box-shadow: 0 0 0 0   rgba(29,222,122,0.9),  0 0 0 0   rgba(29,222,122,0.5); }
}
@keyframes pulse-marker-amber {
  0%   { box-shadow: 0 0 0 0   rgba(255,160,0,0.9),   0 0 0 0   rgba(255,160,0,0.5); }
  50%  { box-shadow: 0 0 0 10px rgba(255,160,0,0.0),  0 0 0 18px rgba(255,160,0,0.0); }
  100% { box-shadow: 0 0 0 0   rgba(255,160,0,0.9),   0 0 0 0   rgba(255,160,0,0.5); }
}

/* Platform labels — no white halo on satellite */
.platform-label {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-shadow: 1px 1px 2px #000, -1px -1px 2px #000, 1px -1px 2px #000, -1px 1px 2px #000;
  pointer-events: none;
  white-space: nowrap;
}

body.dark .platform-label {
  color: #ffffff;
  text-shadow: 1px 1px 2px #000, -1px -1px 2px #000;
}

/* ─────────────────────────── BOTTOM SHEET ─────────────────────────── */
.sheet {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--bg2);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
  z-index: 400;
  transform: translateY(calc(100% - 72px));
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding-bottom: var(--safe-area-bottom);
  max-height: 85vh;
}

.sheet.expanded {
  transform: translateY(0);
}

.sheet.full {
  transform: translateY(0);
  height: 85vh;
}

.sheet-handle {
  width: 100%;
  padding: 8px 0 4px;
  display: flex;
  justify-content: center;
  cursor: pointer;
}

.sheet-handle-bar {
  width: 40px;
  height: 4px;
  background: var(--border2);
  border-radius: 2px;
}

.sheet-head {
  padding: 4px 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.sheet-head-text { flex: 1; min-width: 0; }

.sheet-title {
  font-size: 16px;
  font-weight: 500;
  color: #111111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet-sub {
  font-size: 11px;
  color: #555555;
  font-family: var(--font-mono);
  letter-spacing: 1px;
  margin-top: 2px;
}

.sheet-quick {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.quick-badge {
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  background: var(--bg3);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.quick-badge.go { background: #e0f3e8; color: var(--green-dark); border-color: #a8d8b8; }
.quick-badge.warn { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-border); }
.quick-badge.nogo { background: var(--red-bg); color: var(--red); border-color: var(--red-border); }

body.dark .quick-badge.go { background: rgba(0,201,106,0.12); border-color: rgba(0,201,106,0.35); color: var(--green); }

/* ─────────────────────────── CONDITIONS GRID ─────────────────────────── */
.sheet-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: calc(85vh - 72px);
  padding-bottom: 20px;
}

.conditions {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--border);
  margin: 0 16px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.cond-cell {
  background: var(--bg2);
  padding: 12px 6px;
  text-align: center;
}

.cond-val {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  margin-bottom: 4px;
}

.cond-sub {
  font-size: 9px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.cond-lbl {
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.go { color: var(--green-dark); }
.warn { color: var(--amber); }
.nogo { color: var(--red); }

body.dark .go { color: var(--green); }

/* Section header */
.sec-hdr {
  padding: 14px 16px 8px;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: var(--font-mono);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.live-badge {
  background: #e0f3e8;
  border: 1px solid #a8d8b8;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 9px;
  color: var(--green-dark);
  display: flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 1px;
}

body.dark .live-badge {
  background: rgba(0,201,106,0.12);
  border-color: rgba(0,201,106,0.35);
  color: var(--green);
}

.pulse {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* ─────────────────────────── FLIGHT CARDS ─────────────────────────── */
.flight-list {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.flight-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.flight-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
}

.flight-card.airborne::before { background: var(--green); }
.flight-card.airborne { border-color: #a8d8b8; background: #f4fbf6; }
.flight-card.delayed::before { background: var(--amber); }
.flight-card.delayed { border-color: var(--amber-border); background: var(--amber-bg); }
.flight-card.scheduled::before { background: var(--green-muted); }
.flight-card.cancelled::before { background: var(--red); }
.flight-card.cancelled { opacity: 0.92; }

body.dark .flight-card.airborne { background: #0d1f10; border-color: #2a5e35; }

.flight-aircraft-strip {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: -2px 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(0,0,0,0.08);
}

.flight-aircraft-img-wrap {
  min-width: 0;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 7px;
  background: rgba(6,16,14,0.08);
}

.flight-aircraft-img {
  width: 100%;
  height: 100%;
  display: block;
}

.flight-aircraft-svg {
  object-fit: contain;
}

.flight-aircraft-photo {
  object-fit: cover;
  object-position: center;
}

.flight-aircraft-meta {
  min-width: 0;
}

.flight-aircraft-type {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.05;
}

.flight-aircraft-operator {
  margin-top: 3px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

body.dark .flight-aircraft-strip {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.10);
}

.flight-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.flight-id {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--green-dark);
  font-weight: 500;
}

body.dark .flight-id { color: var(--green); }

.flight-op {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.pill {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 20px;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

.pill-airborne   { background: #e0f3e8; color: var(--green-dark); border: 1px solid #a8d8b8; }
.pill-delayed    { background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-border); }
.pill-scheduled  { background: var(--bg3); color: var(--text-muted); border: 1px solid var(--border); }
.pill-plan,
.pill-estimated  { background: rgba(100,160,255,0.12); color: #2a6fcc; border: 1px solid rgba(100,160,255,0.32); }
.pill-cancelled  { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-border); }
.pill-coastguard {
  background: #fff0f0;
  color: #c00016;
  border: 1px solid #f5b0b8;
  font-weight: 700;
  letter-spacing: 0.5px;
  animation: cg-pill-flash 0.75s ease-in-out infinite alternate;
}
@keyframes cg-pill-flash {
  from { background: #fff0f0; color: #c00016; border-color: #f5b0b8; }
  to   { background: #c00016; color: #ffffff; border-color: #c00016; }
}

body.dark .pill-airborne   { background: #0f3a1a; border-color: var(--green-dark); color: var(--green); }
body.dark .pill-plan,
body.dark .pill-estimated  { background: rgba(100,160,255,0.12); color: #7ab0ff; border-color: rgba(100,160,255,0.26); }
body.dark .pill-coastguard {
  animation: cg-pill-flash-dark 0.75s ease-in-out infinite alternate;
}
@keyframes cg-pill-flash-dark {
  from { background: rgba(200,0,22,0.15); color: #ff4455; border-color: rgba(200,0,22,0.4); }
  to   { background: #c00016; color: #ffffff; border-color: #c00016; }
}

.flight-route {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.route-pt {
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.route-line {
  flex: 1;
  height: 1px;
  background: var(--border2);
}

.flight-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}

.flight-time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.flight-times {
  display: grid;
  gap: 3px;
  min-width: 112px;
}

.flight-time-row {
  display: grid;
  grid-template-columns: 56px auto;
  align-items: baseline;
  column-gap: 8px;
  font-family: var(--font-mono);
  line-height: 1.2;
}

.flight-time-row span {
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 1px;
}

.flight-time-row strong {
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
}

.operator-schedule-list {
  display: grid;
  gap: 6px;
}

.operator-schedule-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) minmax(86px, auto);
  align-items: stretch;
  min-height: 60px;
  overflow: hidden;
  border: 1px solid rgba(120,130,126,0.18);
  border-radius: 8px;
  background: rgba(255,255,255,0.42);
}

.schedule-time,
.schedule-status {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 900;
}

.schedule-time {
  color: #d01822;
  font-size: 18px;
  background: rgba(255,255,255,0.26);
}

.schedule-main {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 9px 10px;
}

.schedule-destination {
  min-width: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.schedule-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 9px;
  align-items: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.25;
}

.schedule-meta span {
  min-width: 0;
}

.schedule-status {
  min-width: 86px;
  padding: 0 8px;
  color: #fff;
  font-size: 10px;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.schedule-departed .schedule-status { background: #24b89a; }
.schedule-boarding .schedule-status,
.schedule-checkin .schedule-status { background: #2fca74; }
.schedule-ontime .schedule-status,
.schedule-scheduled .schedule-status { background: #b9bdc2; }
.schedule-manned .schedule-status { background: #5d9ed6; }
.schedule-delayed .schedule-status { background: #c48010; }
.schedule-cancelled .schedule-status { background: #c8323a; }

body.dark .operator-schedule-row {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.12);
}

body.dark .schedule-time {
  background: rgba(255,255,255,0.04);
  color: #ff626c;
}

@media (max-width: 430px) {
  .operator-schedule-row {
    grid-template-columns: 64px minmax(0, 1fr) 78px;
    min-height: 56px;
  }

  .schedule-time { font-size: 16px; }
  .schedule-destination { font-size: 14px; }
  .schedule-status { min-width: 78px; font-size: 9px; }
}

.flight-eta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.notify-btn {
  background: var(--bg2);
  border: 1px solid var(--green-muted);
  border-radius: 6px;
  color: var(--green-dark);
  font-size: 11px;
  padding: 6px 12px;
  font-family: var(--font);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.notify-btn.on {
  background: var(--green-dark);
  color: white;
  border-color: var(--green-dark);
}

body.dark .notify-btn.on { background: var(--green); color: var(--bg); }

.progress-bar {
  height: 3px;
  background: var(--bg3);
  border-radius: 2px;
  margin: 4px 0;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 2px;
}

.progress-bar.returning .progress-fill {
  margin-left: auto;
}

/* ─────────────────────────── LOCATE ME BUTTON ─────────────────────────── */
.locate-btn {
  position: absolute;
  left: 12px;
  bottom: calc(80px + var(--safe-area-bottom));
  width: 44px;
  height: 44px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 50%;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 350;
  color: var(--text-dim);
  transition: bottom 0.3s;
}

.locate-btn:active { transform: scale(0.95); }

/* ─────────────────────────── FAB (Settings) ─────────────────────────── */
.fab {
  position: absolute;
  left: 12px;
  bottom: calc(140px + var(--safe-area-bottom));
  width: 44px;
  height: 44px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 50%;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 350;
  color: var(--text-dim);
}

.fab:active { transform: scale(0.95); }

/* Legend (on map) */
.legend {
  position: absolute;
  left: 12px;
  bottom: calc(44px + var(--safe-area-bottom));
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  box-shadow: var(--shadow);
  font-size: 10px;
  font-family: var(--font-mono);
  z-index: 350;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-dot.platform { background: #1d9e75; }
.legend-dot.fpso { background: var(--blue); }
.legend-dot.rig {
  background: #8B4513;
  border-radius: 50%;
}
.legend-dot.airport {
  background: var(--blue);
  border-radius: 2px;
}

/* ─────────────────────────── SETTINGS MODAL ─────────────────────────── */
.modal {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 700;
  align-items: flex-end;
}

.modal.open { display: flex; }

.modal.tool-fullscreen {
  align-items: stretch;
  background: rgba(5, 10, 9, 0.62);
}

.modal-panel {
  width: 100%;
  max-height: 90vh;
  background: rgba(255,255,255,0.90);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  overflow-y: auto;
  padding-bottom: var(--safe-area-bottom);
}

.modal.tool-fullscreen .modal-panel {
  max-height: none;
  height: 100%;
  border-radius: 0;
  padding-bottom: calc(14px + var(--safe-area-bottom));
}

.modal-head {
  padding: 12px 16px 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: none;
}

.user-zone-head {
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(29,158,117,0.42);
  position: sticky;
  top: 0;
  z-index: 12;
  background: rgba(29, 158, 117, 0.28);
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
  box-shadow: none;
  padding-bottom: 14px;
}

.zone-back-btn {
  display: none;
  min-height: 34px;
  border: 2px solid #111;
  border-radius: 8px;
  background: rgba(255, 204, 38, 0.82);
  color: #111;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.6px;
  padding: 6px 10px;
}

.modal.tool-fullscreen .zone-back-btn {
  display: inline-flex;
  align-items: center;
}

.modal.tool-fullscreen .modal-title {
  font-size: 18px;
}

.modal-kicker {
  color: var(--green-dark);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.4px;
}

.modal-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: 1.1px;
}

/* USER ZONE header: title centred on the true midline, Back pinned left, X pinned right (P2 #12). */
.user-zone-head { justify-content: center; }
.user-zone-head > div { text-align: center; }
.user-zone-head .zone-back-btn {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%); margin: 0;
}
.user-zone-head .modal-close {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
}

/* Account strip — Sync / Manage / Sign out + Force update, pinned under the header in every tool. */
.zone-account-strip {
  display: none;
}
.zone-account-strip:empty { display: none; }
.zone-account-strip .zas-email {
  flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text-muted);
}
/* Brand: NO white/grey buttons. Secondary = transparent + 2px black outline + black text;
   primary (Sign in) = yellow #ffcf23 fill. (Dark theme flips the outline to the light text colour.) */
.zone-account-strip button {
  flex: 0 0 auto; border: 2px solid #111; background: transparent;
  -webkit-appearance: none; appearance: none;  /* kill the native grey button chrome */
  border-radius: 7px; padding: 5px 9px; font-size: 11px; font-family: var(--font-mono);
  color: #111; font-weight: 700; cursor: pointer; white-space: nowrap;
}
body.dark .zone-account-strip button { border-color: var(--text); color: var(--text); }
.zone-account-strip button.zas-primary { background: #ffcf23; border-color: #111; color: #111; font-weight: 700; }
body.dark .zone-account-strip button.zas-primary { border-color: #111; color: #111; }
/* Signed-in = green status (matches the FULL ACCESS card). Strip is always a light bar, so use
   fixed greens rather than the theme vars (which flip too bright on light in dark mode). */
.zone-account-strip.zas-signed-in {
  border-bottom-color: rgba(29,158,117,0.45);
}
.zone-account-strip .zas-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1d9e75;
  box-shadow: 0 0 0 3px rgba(29,158,117,0.18);
}
.zone-account-strip.zas-signed-in .zas-email {
  color: #0f6e56;
  font-weight: 800;
}
/* Dark theme: glass header + strip go dark; signed-in email brightens for contrast. */
body.dark .user-zone-head,
body.dark .zone-account-strip {
  background: rgba(15, 110, 86, 0.34);
}
body.dark .zone-account-strip.zas-signed-in .zas-email {
  color: #1dff88;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 4px;
}

.setting-row {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.setting-info { flex: 1; min-width: 0; }
.setting-title { font-size: 14px; color: var(--text); }
.setting-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

[data-zone-section="setup"] .setting-title,
[data-zone-section="setup"] .setting-desc {
  color: #111111;
}

[data-zone-section="setup"] .setting-title,
[data-zone-section="setup"] .zone-link-title,
[data-zone-section="setup"] .zone-tool-row strong {
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

[data-zone-section="setup"] .setting-desc {
  color: rgba(17, 17, 17, 0.70);
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.32;
}

[data-zone-section="setup"] .zone-link-desc,
[data-zone-section="setup"] .zone-tool-row em {
  color: rgba(17, 17, 17, 0.70);
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.32;
}

.user-zone-card {
  margin: 14px 16px 10px;
  border: 1px solid rgba(29, 158, 117, 0.35);
  border-radius: 8px;
  background: rgba(61, 112, 105, 0.36);
  box-shadow: inset 0 1px 0 rgba(170, 232, 215, 0.24);
}

.modal.tool-fullscreen .zone-section.active.user-zone-card,
.modal.tool-fullscreen .zone-section.active.zone-placeholder {
  margin: 8px 10px 0;
  min-height: calc(100vh - 84px - var(--safe-area-bottom));
  padding: 14px;
  border-radius: 10px;
}

.modal.tool-fullscreen .zone-section.active:not(.user-zone-card) {
  min-height: calc(100vh - 84px - var(--safe-area-bottom));
  padding-bottom: 20px;
}

.member-price-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 13px;
  margin-top: 2px;
}
/* applyPaidLock() sets hidden on this for members; the grid display would otherwise beat
   [hidden]'s display:none, leaving the £14.95 card showing after you've subscribed. */
.member-price-card[hidden] { display: none !important; }

/* Once you're a member, body loses .paid-locked — drop the free-vs-Have-it-all upsell clutter
   in the rota so a paying member just sees their full rota, not the comparison/sell copy. */
body:not(.paid-locked) .rota-tier-line,
body:not(.paid-locked) .rota-trip-note,
body:not(.paid-locked) .rota-member-lock,
body:not(.paid-locked) .rota-head .zone-pill-free,
body:not(.paid-locked) .rota-trip-actions span { display: none !important; }

.member-copy,
.member-price-copy,
.member-price {
  min-width: 0;
}

.member-state,
.zone-feature-label,
.member-price span,
.member-price em,
.zone-pill {
  font-family: var(--font-mono);
  font-weight: 900;
  letter-spacing: 0.8px;
}

.member-state {
  color: var(--green-dark);
  font-size: 11px;
}

.member-title {
  margin-top: 4px;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.member-desc,
.zone-feature-desc {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.35;
}

.rota-tier-line,
.rota-trip-note {
  margin-top: 7px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.35px;
  line-height: 1.35;
}

.rota-tier-line {
  display: grid;
  gap: 4px;
}

.rota-tier-line div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.rota-tier-line strong,
.rota-tier-line span {
  display: inline-block;
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(29, 158, 117, 0.18);
  border: 1px solid rgba(29, 158, 117, 0.42);
}

.rota-tier-line span {
  background: rgba(255, 204, 38, 0.28);
  border-color: rgba(255, 204, 38, 0.58);
}

.member-price {
  align-self: stretch;
  min-width: 104px;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid rgba(17,17,17,0.12);
  background: rgba(255, 204, 38, 0.74);
  color: #111;
  text-align: right;
}

.member-price span,
.member-price em {
  display: block;
  font-size: 9px;
}

.member-price strong {
  display: block;
  margin: 3px 0 2px;
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 1;
}

.user-zone-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 16px 8px;
}

.zone-section {
  display: none;
}

.zone-section.active {
  display: block;
}

.zone-section[data-zone-section="overview"].active {
  padding-top: 10px;
}

.zone-section.zone-placeholder.active {
  padding-top: 10px;
}

.zone-feature-card {
  min-width: 0;
  width: 100%;
  text-align: left;
  font-family: var(--font);
  cursor: pointer;
  padding: 10px;
  border: 1px solid rgba(17,17,17,0.09);
  border-left: 3px solid rgba(29, 158, 117, 0.58);
  border-radius: 8px;
  background: rgba(255,255,255,0.19);
}

.zone-feature-card:active {
  transform: scale(0.99);
}

.zone-feature-ready {
  border-left-color: var(--green-dark);
}

.zone-feature-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.zone-feature-label {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.25px;
  line-height: 1.2;
}

.zone-feature-title {
  margin-top: 8px;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.15;
}

.zone-pill {
  flex-shrink: 0;
  padding: 4px 7px;
  border-radius: 999px;
  border: 1px solid rgba(17,17,17,0.12);
  background: rgba(255,255,255,0.28);
  color: var(--text);
  font-size: 8px;
  line-height: 1;
}

.zone-pill-free {
  color: var(--green-dark);
  border-color: rgba(29, 158, 117, 0.34);
}

.zone-pill-member {
  border-color: var(--frost-gold-border);
  background: rgba(255, 204, 38, 0.68);
  color: #111;
}
/* Locked member tool: the MEMBER pill carries the "· SOON" state in one badge (no overlap). */
.zone-pill.zone-pill-soon {
  font-family: var(--font-mono);
  font-weight: 900;
  letter-spacing: 0.5px;
  background: rgba(255, 204, 38, 0.92);
  white-space: nowrap;
}

.zone-pill-planned {
  color: var(--text-muted);
}

/* --- Member-tools launch gate (teaser lock) --------------------------------- */
.zone-feature-card {
  position: relative;
}
.zone-soon-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid var(--frost-gold-border);
  background: rgba(255, 204, 38, 0.92);
  color: #111;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1;
}
.zone-card-locked {
  opacity: 0.92;
}
.zone-card-locked::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 204, 38, 0.05),
    rgba(255, 204, 38, 0.05) 6px,
    rgba(255, 204, 38, 0.11) 6px,
    rgba(255, 204, 38, 0.11) 12px
  );
  pointer-events: none;
}
.zone-locked-section {
  text-align: center;
}
.zone-locked-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 38px 22px 28px;
}
.zone-locked-icon {
  font-size: 40px;
  line-height: 1;
}
.zone-locked-title {
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: clamp(2.4rem, 9vw, 3.6rem);
  line-height: 1.0;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #07111f;
  -webkit-text-stroke: 1.4px #07111f;
  text-stroke: 1.4px #07111f;
  text-shadow: 0 0 24px rgba(255, 207, 35, 0.85), 0 0 6px rgba(255, 207, 35, 0.6);
}
.zone-locked-desc {
  max-width: 30rem;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.55;
}
/* Founding Member offer (pre-contract disclosure + consent + checkout) */
.founder-card {
  width: 100%;
  max-width: 430px;
  margin: 4px auto 14px;
  padding: 22px 18px 20px;
  border-radius: 22px;
  border: 4px solid #07111f;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,0.45), transparent 34%),
    linear-gradient(180deg, #ffd83f 0%, #ffc20f 100%);
  color: #07111f;
  text-align: center;
  box-shadow: 0 10px 0 rgba(7, 17, 31, 0.22);
}

.founder-card .trial-badge {
  display: inline-block;
  margin-bottom: 16px;
  padding: 7px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  border: 2px solid rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  box-shadow: inset 0 -2px 0 rgba(7, 17, 31, 0.08);
}

.founder-card .founder-pill {
  display: inline-block;
  margin-bottom: 18px;
  padding: 10px 24px;
  border-radius: 999px;
  background: #07111f;
  color: #ffd83f;
  font-size: 1rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  box-shadow: 0 5px 0 rgba(7, 17, 31, 0.18);
}

.founder-card .price-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 2px 0 14px;
}

.founder-card .price {
  font-size: clamp(3.6rem, 15vw, 5.2rem);
  line-height: 0.9;
  font-weight: 1000;
  letter-spacing: -0.07em;
}

.founder-card .price-note {
  padding-left: 12px;
  border-left: 2px solid rgba(7, 17, 31, 0.22);
  max-width: 100px;
  text-align: left;
  font-size: 0.9rem;
  line-height: 1.08;
  font-weight: 900;
}

.founder-card .renewal-line {
  margin: 14px auto 0;
  padding-top: 14px;
  width: 88%;
  border-top: 2px solid rgba(255, 255, 255, 0.42);
  font-size: 1.2rem;
  font-weight: 950;
}

.founder-card .reassurance {
  margin: 16px auto 0;
  max-width: 350px;
  font-size: 0.84rem;
  line-height: 1.35;
  font-weight: 700;
  color: rgba(7, 17, 31, 0.82);
}

/* Centre the header (USER ZONE / HAVE IT ALL) on the locked upsell view only.
   1fr auto 1fr keeps the title dead-centre regardless of Back/X button widths. */
.modal.zone-locked-view .user-zone-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.modal.zone-locked-view .user-zone-head > .zone-back-btn { justify-self: start; }
.modal.zone-locked-view .user-zone-head > div { text-align: center; }
.modal.zone-locked-view .user-zone-head > .modal-close { justify-self: end; }
/* Big "HAVE IT ALL" beams in the body, so drop the duplicate header title (keep "USER ZONE"). */
.modal.zone-locked-view .user-zone-head .modal-title { display: none; }
.member-offer-fineprint {
  max-width: 30rem;
  margin: 2px auto 0;
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.5;
}

/* ── Invoice generator: VAT row, generate button, history, and the printable document ── */
.invoice-vat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 4px;
  font-size: 13px;
}
.invoice-vat-toggle-label { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.invoice-vat-rate-wrap { display: inline-flex; align-items: center; gap: 6px; }
#invoice-vat-rate { width: 64px; }
.invoice-generate-btn {
  width: 100%;
  margin-top: 6px;
  background: #ffcf23;
  color: #111111;
  border: 2px solid #111111;
  font-weight: 900;
  letter-spacing: 0.5px;
}
.invoice-generate-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.invoice-history { margin-top: 14px; }
.invoice-history-head {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.invoice-history-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line, rgba(0,0,0,0.12));
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 13px;
}
.invoice-history-row em { color: var(--text-dim); font-style: normal; font-size: 12px; }
.invoice-history-row button {
  border: 1px solid rgba(29,158,117,0.4);
  background: rgba(29,158,117,0.16);
  color: #111;
  border-radius: 6px;
  padding: 3px 10px;
  font-weight: 800;
  font-size: 11px;
  cursor: pointer;
}

/* Full-screen branded invoice document (rendered to PDF via the device print dialog) */
#invoice-doc-overlay { display: none; }
#invoice-doc-overlay.open {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 4000;
  overflow: auto;
  background: #5a6b6b;
  padding: 16px 12px 60px;
}
.invoice-doc-actions {
  max-width: 720px;
  margin: 0 auto 12px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.invoice-doc-btn {
  border: 2px solid #111111;
  border-radius: 9px;
  background: #ffcf23;
  color: #111111;
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 13px;
  padding: 10px 18px;
  cursor: pointer;
}
.invoice-doc-btn.ghost { background: #fff; }
.invoice-doc {
  max-width: 720px;
  margin: 0 auto;
  background: #ffffff;
  color: #111111;
  border-radius: 6px;
  padding: 32px 34px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}
.invoice-doc-top { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 3px solid #111; padding-bottom: 14px; }
.invoice-doc-title { font-size: 34px; font-weight: 900; letter-spacing: 2px; }
.invoice-doc-meta { text-align: right; font-size: 13px; }
.invoice-doc-meta div { margin-bottom: 3px; }
.invoice-doc-meta span { color: #666; margin-right: 8px; }
.invoice-doc-parties { display: flex; gap: 30px; margin: 22px 0; }
.invoice-doc-parties > div { flex: 1; }
.invoice-doc-parties h4 { margin: 0 0 6px; font-size: 11px; letter-spacing: 1px; color: #666; text-transform: uppercase; }
.invoice-doc-parties p { margin: 0; font-size: 14px; }
.invoice-doc-table { width: 100%; border-collapse: collapse; margin: 8px 0 4px; font-size: 14px; }
.invoice-doc-table th { text-align: left; border-bottom: 2px solid #111; padding: 8px 6px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.invoice-doc-table td { padding: 8px 6px; border-bottom: 1px solid #e2e2e2; }
.invoice-doc-table .num { text-align: right; white-space: nowrap; }
.invoice-doc-totals { margin: 14px 0 0; margin-left: auto; width: 260px; font-size: 14px; }
.invoice-doc-totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.invoice-doc-totals .grand { border-top: 2px solid #111; margin-top: 6px; padding-top: 8px; font-size: 17px; font-weight: 900; }
.invoice-doc-bank { margin-top: 24px; border-top: 1px solid #e2e2e2; padding-top: 12px; }
.invoice-doc-bank h4 { margin: 0 0 6px; font-size: 11px; letter-spacing: 1px; color: #666; text-transform: uppercase; }
.invoice-doc-bank p { margin: 0; font-size: 14px; }
.invoice-doc-note { margin-top: 14px; font-size: 12px; color: #666; }
.invoice-doc-foot { margin-top: 26px; text-align: center; font-size: 11px; color: #999; letter-spacing: 0.5px; }

@media print {
  body * { visibility: hidden !important; }
  #invoice-doc-overlay, #invoice-doc-overlay * { visibility: visible !important; }
  #invoice-doc-overlay { position: absolute; inset: 0; background: #fff; padding: 0; overflow: visible; }
  .invoice-doc-actions { display: none !important; }
  .invoice-doc { box-shadow: none; max-width: none; margin: 0; border-radius: 0; padding: 0; }
}
.member-signin-email {
  width: min(22rem, 90%);
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line, rgba(0,0,0,0.2));
  border-radius: 8px;
  font-size: 14px;
}
.member-subscribe-btn {
  min-height: 44px;
  padding: 0 26px;
  border: 2px solid #111111;
  border-radius: 9px;
  background: #ffcf23;
  color: #111111;
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.5px;
  cursor: pointer;
}
.member-subscribe-btn:disabled { opacity: 0.45; cursor: not-allowed; }
/* In-place confirmation after the one-tap sign-in link is emailed. */
.signin-sent {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 18px 14px 8px;
}
.signin-sent-icon { font-size: 40px; line-height: 1; }
.signin-sent-title { font-family: var(--font-mono); font-weight: 900; font-size: 20px; color: var(--text, #111); }
.signin-sent-desc { font-size: 14px; line-height: 1.55; color: var(--text-muted, #555); max-width: 22rem; }
.signin-sent-desc strong { color: var(--text, #111); word-break: break-all; }
.signin-sent-hint { font-size: 12px; color: var(--text-muted, #777); max-width: 22rem; margin-bottom: 4px; }
.cloud-join-btn {
  background: #ffcf23 !important;
  border-color: #111111 !important;
  color: #111111 !important;
}

.zone-search-btn {
  flex-shrink: 0;
  border: 2px solid #111111;
  border-radius: 8px;
  background: #ffcf23;
  color: #111111;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.8px;
  padding: 8px 11px;
}

.zone-search-btn:active {
  transform: scale(0.97);
}

.zone-platform-search {
  padding: 0 16px 10px;
}

[data-zone-section="setup"] .setting-row {
  margin: 0 16px 8px;
  padding: 10px 11px;
  border: 1px solid rgba(29, 158, 117, 0.22);
  border-radius: 8px;
  background: rgba(29, 158, 117, 0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14);
}

[data-zone-section="setup"] .setting-row + .setting-row,
[data-zone-section="setup"] .zone-platform-search + .setting-row,
[data-zone-section="setup"] .zone-link-card + .zone-sec-hdr {
  margin-top: 8px;
}

[data-zone-section="setup"] .zone-sec-hdr {
  margin-top: 14px;
  color: #111111;
  font-size: 10px;
  line-height: 1.2;
}

[data-zone-section="setup"] .zone-sec-hdr:first-child {
  margin-top: 0;
}

[data-zone-section="setup"] .profile-block {
  margin: 0 16px 10px;
}

[data-zone-section="setup"] .profile-block .zone-sec-hdr {
  padding-inline: 0;
}

[data-zone-section="setup"] .invoice-form-grid {
  margin-top: 8px;
}

[data-zone-section="setup"] .invoice-form-grid span {
  color: rgba(17, 17, 17, 0.74);
  font-size: 9px;
  line-height: 1.2;
}

[data-zone-section="setup"] .rota-input,
[data-zone-section="setup"] .settings-select {
  min-height: 42px;
  border: 1px solid rgba(29, 158, 117, 0.30);
  border-radius: 8px;
  background: rgba(29, 158, 117, 0.14);
  color: #111111;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14);
}

[data-zone-section="setup"] .rota-input {
  font-size: 12px;
  padding: 9px 10px;
}

[data-zone-section="setup"] .settings-select {
  max-width: 190px;
  padding: 8px 9px;
  font-size: 12px;
  font-weight: 900;
  text-align: left;
}

[data-zone-section="setup"] .rota-input::placeholder {
  color: rgba(17, 17, 17, 0.50);
}

[data-zone-section="setup"] .zone-platform-search {
  padding: 0 16px 8px;
}

.setting-note {
  margin: 0 16px 8px;
  padding: 9px 10px;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: rgba(29, 158, 117, 0.12);
  color: rgba(17, 17, 17, 0.72);
  font-size: 10.5px;
  font-weight: 850;
  line-height: 1.32;
}

.zone-tool-list {
  display: grid;
  gap: 8px;
  padding: 0 16px 6px;
}

.zone-tool-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid rgba(29, 158, 117, 0.22);
  border-radius: 8px;
  background: rgba(29, 158, 117, 0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14);
}

.zone-tool-row > span:first-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.zone-tool-row strong,
.zone-tool-row em {
  color: #111111;
}

.zone-tool-row strong {
  font-size: 13px;
  font-weight: 900;
}

.zone-tool-row em {
  color: #111111;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.25;
}

.zone-platform-results {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.zone-platform-result {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(17,17,17,0.12);
  border-left: 3px solid var(--green-dark);
  border-radius: 8px;
  background: rgba(255,255,255,0.22);
  color: var(--text);
  cursor: pointer;
  padding: 9px 10px;
  text-align: left;
}

.zone-platform-result strong,
.zone-platform-result span,
.zone-platform-hint {
  display: block;
  font-family: var(--font-mono);
}

.zone-platform-result strong {
  font-size: 12px;
  font-weight: 900;
}

.zone-platform-result span,
.zone-platform-hint {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.3;
}

.zone-placeholder {
  padding: 13px;
}

.zone-link-list {
  display: grid;
  gap: 8px;
  margin-top: 11px;
}

.zone-link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 16px 10px;
  padding: 10px 11px;
  border: 1px solid rgba(29, 158, 117, 0.28);
  border-radius: 8px;
  background: rgba(255,255,255,0.20);
  color: var(--text);
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22);
}

.zone-placeholder .zone-link-card {
  margin: 0;
}

.zone-link-card:active {
  transform: translateY(1px);
}

.zone-link-card-static {
  cursor: default;
}

.zone-link-tag,
.zone-link-card > span {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.8px;
}

.zone-link-tag {
  color: var(--green-dark);
}

.zone-link-title {
  margin-top: 2px;
  color: #111111;
  font-size: 14px;
  font-weight: 900;
}

.zone-link-title span {
  margin-left: 7px;
  color: #111111;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.7px;
}

.zone-link-desc {
  margin-top: 2px;
  color: #111111;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
}

.zone-link-card > span {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 204, 38, 0.40);
  color: #111;
}

[data-zone-section="setup"] .zone-link-card {
  margin-inline: 16px;
  padding: 10px 11px;
  border: 1px solid rgba(29, 158, 117, 0.22);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: rgba(29, 158, 117, 0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14);
}

[data-zone-section="setup"] .zone-link-card > span {
  background: rgba(29, 158, 117, 0.24);
  color: #111111;
}

[data-zone-section="setup"] .zone-link-title span {
  font-size: 9px;
}

[data-zone-section="setup"] .marine-terms {
  margin: 10px 16px 8px;
  border-color: rgba(29, 158, 117, 0.22);
  background: rgba(29, 158, 117, 0.12);
}

[data-zone-section="setup"] .marine-terms summary {
  color: #111111;
  font-size: 13px;
}

[data-zone-section="setup"] .cloud-account-card {
  margin: 0 16px 10px;
  border-color: rgba(29, 158, 117, 0.24);
  background: rgba(29, 158, 117, 0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14);
}

.settings-save-btn {
  width: 100%;
  min-height: 44px;
  border: 2px solid #111111;
  border-radius: 8px;
  background: rgba(29, 158, 117, 0.72);
  color: #111111;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.8px;
}

.cert-file-field input {
  width: 100%;
  color: #111111;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
}

.cert-file-field input::file-selector-button {
  min-height: 34px;
  margin-right: 9px;
  border: 2px solid #111111;
  border-radius: 8px;
  background: #ffcf23;
  color: #111111;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.6px;
  padding: 6px 10px;
}

.cert-file-field input::-webkit-file-upload-button {
  min-height: 34px;
  margin-right: 9px;
  border: 2px solid #111111;
  border-radius: 8px;
  background: #ffcf23;
  color: #111111;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.6px;
  padding: 6px 10px;
}

.cert-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.cert-notify-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #111111;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.7px;
}

/* Inline "rename uploads" consent toggle. */
.cert-rename-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
  color: #111111;
  font-size: 11px;
  line-height: 1.35;
  cursor: pointer;
}
.cert-rename-toggle .toggle { flex-shrink: 0; }
.cert-rename-toggle b { font-weight: 900; }

.cert-bulk-note {
  margin-top: 10px;
  padding: 9px 10px;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: rgba(29, 158, 117, 0.18);
  color: #111111;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.3;
}

.cert-preview,
.cert-empty {
  margin-top: 10px;
  color: #111111;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.35;
}

.cert-preview {
  padding: 8px 0;
  border-top: 1px solid rgba(17,17,17,0.18);
  border-bottom: 1px solid rgba(17,17,17,0.18);
}

.cert-add-btn {
  margin-top: 8px;
}

.cert-action-row,
.cert-client-tools {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.cert-action-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cert-client-tools {
  grid-template-columns: minmax(0, 1fr);
  padding: 10px;
  border: 1px solid rgba(17,17,17,0.16);
  border-radius: 8px;
  background: rgba(29,158,117,0.12);
}

.cert-client-tools .invoice-time-btn {
  width: auto;
  min-height: 32px;
  justify-self: start;
  margin-top: 0;
  border-color: rgba(29, 158, 117, 0.36);
  background: rgba(61, 112, 105, 0.34);
  color: #111111;
  padding: 6px 10px;
  font-size: 10px;
}

.cert-client-tools label {
  display: grid;
  gap: 4px;
}

.cert-client-tools label span {
  color: #111111;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.cert-preview-panel {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(17,17,17,0.18);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: rgba(255,255,255,0.28);
  color: #111111;
}

.cert-preview-panel[hidden] {
  display: none;
}

.cert-preview-panel > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cert-preview-panel strong,
.cert-preview-panel span {
  color: #111111;
  font-weight: 900;
}

.cert-preview-panel button {
  border: none;
  background: transparent;
  color: #111111;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
}

.cert-preview-panel img,
.cert-preview-panel iframe {
  width: 100%;
  min-height: 280px;
  border: 1px solid rgba(17,17,17,0.18);
  border-radius: 8px;
  background: rgba(255,255,255,0.58);
  object-fit: contain;
}

.cert-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.cert-legend span {
  min-height: 22px;
  border-radius: 999px;
  color: #111111;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.45px;
  padding: 5px 8px;
}

.cert-legend-ok {
  background: rgba(29,158,117,0.34);
}

.cert-legend-warn {
  background: rgba(232, 198, 64, 0.46);
}

.cert-legend-bad {
  background: rgba(218, 35, 44, 0.88);
  color: #111111;
}

.cert-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.cert-empty {
  color: #111111;
}

.cert-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 8px 0 8px 12px;
  border-left: 4px solid var(--green);
}

.cert-row-main,
.cert-row strong,
.cert-row span {
  display: block;
  min-width: 0;
}

.cert-row strong {
  color: #111111;
  font-size: 13px;
  font-weight: 900;
}

.cert-row span {
  margin-top: 2px;
  color: #111111;
  font-size: 10px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.cert-share-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #111111;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.4px;
}

.cert-share-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.cert-row-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.cert-row-actions button {
  min-height: 28px;
  border: 2px solid #111111;
  border-radius: 8px;
  background: transparent;
  color: #111111;
  -webkit-appearance: none;
  appearance: none;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  padding: 4px 8px;
  cursor: pointer;
}

.cert-row-actions button:first-child {
  background: #ffcf23;
}

.cert-row-actions .cert-delete-btn {
  border-color: rgba(17,17,17,0.76);
}

[data-zone-section="certs"] .member-desc,
[data-zone-section="certs"] .zone-link-desc {
  color: #111111;
  font-weight: 800;
}

[data-zone-section="certs"] .zone-link-tag {
  color: #111111;
}

[data-zone-section="certs"] .invoice-form-grid span {
  color: #111111;
}

.cert-status {
  grid-column: 2;
  justify-self: start;
  padding: 4px 7px;
  border-radius: 999px;
  color: #111111;
  font-family: var(--font-mono);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.4px;
}

.cert-status-ok {
  background: rgba(29,158,117,0.34);
}

.cert-status-warn {
  background: rgba(232, 198, 64, 0.46);
}

.cert-status-bad {
  background: rgba(218, 35, 44, 0.88);
  color: #111111;
}

@media (min-width: 720px) {
  .cert-client-tools {
    grid-template-columns: minmax(220px, 1fr) max-content max-content;
    align-items: end;
  }
}

.rota-card {
  padding: 13px;
}

.rota-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.rota-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.rota-controls label {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rota-controls label span {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.rota-input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(17,17,17,0.16);
  border-radius: 8px;
  background: rgba(255,255,255,0.36);
  color: rgba(17, 24, 22, 0.82);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
  outline: none;
  padding: 9px 9px;
}

.rota-input::placeholder {
  color: rgba(17, 24, 22, 0.46);
}

.rota-custom-field {
  display: none !important;
}

.rota-custom-field.show {
  display: flex !important;
}

.rota-trip-note {
  display: none;
  padding: 9px 10px;
  border: 1px solid var(--frost-gold-border);
  border-radius: 8px;
  background: rgba(255, 204, 38, 0.15);
}

.rota-trip-actions {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.rota-trip-note.show {
  display: block;
}

.rota-trip-actions.show {
  display: flex;
}

.rota-trip-actions span {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
}

.rota-add-trip {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 8px 13px;
  border: 2px solid #111;
  border-radius: 8px;
  background: #ffcf23;
  color: #111111;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.rota-extra-trip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
  padding: 9px;
  border: 1px solid rgba(29, 158, 117, 0.34);
  border-radius: 8px;
  background: rgba(255,255,255,0.16);
}

.rota-extra-trip label {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rota-extra-trip label span {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.rota-trip-summary {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

.rota-trip-summary:empty {
  display: none;
}

.rota-trip-summary div {
  padding: 6px 8px;
  border-left: 4px solid var(--green);
  border-radius: 6px;
  background: rgba(29, 158, 117, 0.18);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.28;
}

.rota-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.rota-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.rota-key {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  border: 1px solid rgba(17,17,17,0.18);
}

.rota-key-offshore { background: #1d9e75; }
.rota-key-travel { background: #ffcf23; }
.rota-key-prep { background: #67a7d8; }
.rota-key-home { background: rgba(255,255,255,0.32); }

.rota-day-note {
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(29, 158, 117, 0.30);
  border-radius: 8px;
  background: rgba(255,255,255,0.18);
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
}
.rota-note-hint { color: var(--text-muted); font-weight: 700; }
.rota-note-hint[hidden] { display: none; }
/* Pop-out editor that opens when a day is tapped. */
.rota-note-editor[hidden] { display: none; }
.rota-note-editor.pop-in { animation: rotaNotePop 0.18s ease-out; transform-origin: top center; }
@keyframes rotaNotePop { from { opacity: 0; transform: translateY(-6px) scale(0.97); } to { opacity: 1; transform: none; } }
.rota-note-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.rota-note-head strong { font-family: var(--font-mono); font-weight: 900; font-size: 12px; color: var(--text); }
.rota-note-close { border: none; background: transparent; color: var(--text-muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; }
#rota-note-save { background: #ffcf23 !important; border-color: #111111 !important; color: #111111 !important; font-weight: 900; }
/* Short note preview shown on a noted day cell (Excel-comment style). */
.rota-day .rota-day-preview {
  position: absolute;
  top: 4px;
  left: 5px;
  right: 15px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #111111;
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 900;
  line-height: 1;
  text-align: left;
  pointer-events: none;
}
/* The day currently being edited. */
.rota-day-selected { box-shadow: inset 0 0 0 2px var(--green, #1d9e75), 0 0 0 2px var(--green, #1d9e75) !important; }

.rota-note-actions {
  display: flex;
  gap: 6px;
  margin-top: 7px;
}

.rota-note-actions button {
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(17,17,17,0.26);
  border-radius: 7px;
  background: rgba(255,255,255,0.28);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.7px;
}

.rota-note-actions button:last-child {
  background: rgba(255, 204, 38, 0.50);
}

.rota-note-input {
  width: 100%;
  margin-top: 7px;
  resize: vertical;
  border: 1px solid rgba(17,17,17,0.20);
  border-radius: 8px;
  background: rgba(255,255,255,0.28);
  color: var(--text);
  font: 800 11px var(--font);
  line-height: 1.35;
  padding: 8px;
  outline: none;
}

.rota-calendar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

/* Trips list = editable source of truth; controls pinned, calendar scrolls under (P1 rebuild + #4). */
.rota-controls-sticky {
  position: sticky;
  top: 54px;            /* sits just under the sticky USER ZONE header */
  z-index: 6;
  background: rgba(29, 158, 117, 0.22);
  backdrop-filter: blur(16px) saturate(1.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
  padding: 12px 12px 14px;
  margin: 8px 0 10px;
  border: 1px solid rgba(29,158,117,0.34);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}
.rota-trips-head { color: #111111; font-family: var(--font-mono); font-weight: 900; font-size: 12px; letter-spacing: 1px; }
.rota-trips-head small { display: block; font-weight: 800; font-size: 11px; color: rgba(17,17,17,0.74); letter-spacing: 0; margin-top: 2px; }
.rota-trips-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.rota-trip-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(17,17,17,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.20);
}
.rota-trip-field { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rota-trip-field span { font-size: 10px; color: rgba(17,17,17,0.72); font-family: var(--font-mono); font-weight: 900; }
.rota-trip-days-field { flex: 0 0 64px; }
.rota-trip-del {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 8px;
  border: 2px solid #111; background: transparent; color: #111111;
  font-family: var(--font-mono); font-size: 18px; font-weight: 900; line-height: 1; cursor: pointer;
}
.rota-trip-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.rota-add-trip { margin-top: 0; }
.rota-gen-toggle {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 8px 13px;
  border: 2px solid #111111;
  border-radius: 8px;
  background: transparent;
  color: #111111;
  -webkit-appearance: none;
  appearance: none;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}
.rota-gen-toggle span,
.rota-gen-toggle em {
  display: inline-block;
  font-style: normal;
  line-height: 1;
}
.rota-gen-toggle em {
  margin-left: 7px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 207, 35, 0.86);
  color: #111111;
  font-size: 8px;
  letter-spacing: 0.7px;
  vertical-align: middle;
}
.rota-gen-toggle.active {
  background: rgba(255, 207, 35, 0.30);
}
.rota-gen-panel {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(17,17,17,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.20);
}
.rota-gen-panel[hidden] {
  display: none;
}
.rota-gen-title {
  color: #111111;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.8px;
}
.rota-gen-copy {
  margin-top: 3px;
  color: rgba(17,17,17,0.74);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
}
.rota-gen-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 9px;
}
.rota-gen-grid label {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.rota-gen-grid span {
  color: rgba(17,17,17,0.72);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
}
.rota-gen-build {
  width: 100%;
  min-height: 34px;
  margin-top: 10px;
  border: 2px solid #111111;
  border-radius: 8px;
  background: #ffcf23;
  color: #111111;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}
.rota-trip-empty { font-size: 12px; color: #111111; padding: 6px 0; font-weight: 800; }

.rota-month {
  min-width: 0;
  border: 1px solid rgba(17,17,17,0.10);
  border-radius: 8px;
  background: rgba(255,255,255,0.16);
  padding: 9px;
}

.rota-month-title {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  text-align: center;
}

.rota-weekdays,
.rota-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.rota-weekdays {
  margin-top: 8px;
}

.rota-weekdays span {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  text-align: center;
}

.rota-days {
  margin-top: 4px;
}

.rota-day {
  position: relative;
  aspect-ratio: 1 / 1;
  min-width: 0;
  border: 1px solid rgba(17,17,17,0.10);
  border-radius: 6px;
  background: rgba(255,255,255,0.24);
  color: var(--text);
  display: grid;
  place-items: center;
  grid-template-rows: 1fr auto;
  padding: 2px 1px;
  box-sizing: border-box;
  cursor: help;
  font-family: var(--font);
}

/* Saved-note marker — keeps the status letter visible and flags noted days at a glance. */
.rota-day-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffcf23;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.55);
  pointer-events: none;
}

.rota-day strong,
.rota-day span {
  display: block;
  min-width: 0;
  line-height: 1;
  text-align: center;
}

.rota-day strong {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
}

.rota-day span {
  color: rgba(17,17,17,0.62);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 900;
}

.rota-day-has-note {
  padding-top: 12px;
}

.rota-day-empty {
  visibility: hidden;
}

.rota-day-offshore {
  background: rgba(29,158,117,0.82);
  color: #07140f;
  border-color: rgba(5,65,46,0.28);
}

.rota-day-travel {
  background: #ffcf23;
  color: #111111;
  border-color: rgba(17,17,17,0.28);
}

.rota-day-prep {
  background: rgba(103, 167, 216, 0.76);
  color: #07111a;
  border-color: rgba(24, 70, 106, 0.30);
}

.rota-day-home {
  background: rgba(255,255,255,0.28);
}

.rota-day-today {
  outline: 2px solid #111111;
  outline-offset: 1px;
}

.rota-day-has-note {
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.56), 0 0 0 2px var(--frost-gold-border);
}

.rota-member-lock {
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px dashed rgba(17,17,17,0.22);
  background: rgba(255, 204, 38, 0.18);
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.32;
}

.invoice-time-btn {
  width: 100%;
  min-height: 40px;
  margin-top: 10px;
  border: 2px solid #111;
  border-radius: 8px;
  background: rgba(255, 204, 38, 0.86);
  color: #111;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.7px;
}

.invoice-hero {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.invoice-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.invoice-mode-grid button {
  min-height: 34px;
  border: 1px solid rgba(17,17,17,0.18);
  border-radius: 8px;
  background: rgba(255,255,255,0.24);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
}

.invoice-mode-grid button.active {
  border-color: var(--frost-gold-border);
  background: rgba(255, 204, 38, 0.50);
}

.invoice-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.invoice-form-grid label {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.invoice-wide-field {
  grid-column: 1 / -1;
}

.invoice-wide-field textarea.rota-input {
  min-height: 94px;
  resize: vertical;
  line-height: 1.35;
}

.invoice-form-grid span,
.invoice-timesheet-head span {
  color: rgba(17, 24, 22, 0.74);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.money-input {
  display: flex;
  align-items: center;
  min-width: 0;
  border: 1px solid rgba(17,17,17,0.16);
  border-radius: 8px;
  background: rgba(255,255,255,0.36);
  overflow: hidden;
}

.money-input b {
  padding: 0 0 0 10px;
  color: rgba(17, 24, 22, 0.68);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
}

.money-input .rota-input {
  border: 0;
  background: transparent;
  border-radius: 0;
  padding-left: 5px;
}

.invoice-extra-panel {
  margin-top: 12px;
  border: 1px solid rgba(29, 158, 117, 0.24);
  border-radius: 8px;
  background: rgba(255,255,255,0.14);
  overflow: hidden;
}

.invoice-extra-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(96px, 0.42fr) 58px;
  gap: 7px;
  padding: 9px 10px;
  border-top: 1px solid rgba(255,255,255,0.20);
}

.invoice-add-item-btn,
.invoice-extra-row button {
  border: 1px solid rgba(17,17,17,0.18);
  border-radius: 8px;
  background: rgba(255, 204, 38, 0.54);
  color: rgba(17,24,22,0.82);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
}

.invoice-extra-list {
  display: grid;
  gap: 0;
}

.invoice-extra-empty,
.invoice-extra-row {
  padding: 8px 10px;
  border-top: 1px solid rgba(255,255,255,0.20);
  color: rgba(17,24,22,0.68);
  font-size: 11px;
  font-weight: 800;
}

.invoice-extra-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 30px;
  align-items: center;
  gap: 8px;
}

.invoice-extra-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-extra-row strong {
  color: rgba(17,24,22,0.82);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
}

.invoice-extra-row button {
  min-height: 26px;
  background: rgba(255,255,255,0.24);
}

.invoice-timesheet {
  margin-top: 12px;
  border: 1px solid rgba(29, 158, 117, 0.30);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255,255,255,0.16);
}

.invoice-timesheet-head,
.invoice-timesheet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.20);
}

.invoice-timesheet-row:last-child {
  border-bottom: none;
}

.invoice-timesheet-head em {
  color: rgba(17, 24, 22, 0.64);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.invoice-file-upload {
  display: block;
  padding: 10px;
}

.invoice-file-upload input {
  display: none;
}

.invoice-file-upload span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px dashed rgba(17,17,17,0.24);
  border-radius: 8px;
  background: rgba(255,255,255,0.20);
  color: rgba(17,24,22,0.72);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  text-align: center;
  padding: 8px;
}

.invoice-total-panel {
  margin-top: 12px;
  border: 1px solid rgba(17,17,17,0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.20);
  overflow: hidden;
}

.invoice-total-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.22);
}

.invoice-total-head span {
  color: rgba(17,24,22,0.68);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
}

.invoice-total-head strong {
  color: rgba(17,24,22,0.86);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 900;
}

.invoice-total-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.invoice-total-grid div {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border-right: 1px solid rgba(255,255,255,0.20);
  border-bottom: 1px solid rgba(255,255,255,0.20);
}

.invoice-total-grid div:nth-child(2n) {
  border-right: 0;
}

.invoice-total-grid span {
  color: rgba(17,24,22,0.60);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.invoice-total-grid strong,
.invoice-total-grid em,
.invoice-attachment-note {
  color: rgba(17,24,22,0.78);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.invoice-attachment-note {
  padding: 8px 10px;
  color: rgba(17,24,22,0.58);
}

.invoice-timesheet-row span {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.invoice-timesheet-row strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
}

.invoice-note {
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(255, 204, 38, 0.16);
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.ropes-add-btn {
  margin-top: 10px;
  background: rgba(29, 158, 117, 0.72) !important;
  color: #111111 !important;
}

.ropes-tech-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.ropes-empty {
  padding: 10px;
  border: 1px dashed rgba(17,17,17,0.22);
  border-radius: 8px;
  background: rgba(255,255,255,0.14);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
}

.ropes-tech-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: rgba(255,255,255,0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
}

.ropes-tech-card-team {
  border-left-color: var(--green);
}

.ropes-tech-card strong,
.ropes-tech-card span,
.ropes-tech-card small,
.ropes-tech-card em {
  display: block;
}

.ropes-tech-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.ropes-tech-card strong {
  color: #111111;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.1;
}

.ropes-tech-card em {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid rgba(17,17,17,0.16);
  border-radius: 999px;
  background: rgba(29, 158, 117, 0.20);
  color: #111111;
  font-family: var(--font-mono);
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.ropes-tech-card-team em {
  background: rgba(29, 158, 117, 0.28);
}

.ropes-tech-card span {
  margin-top: 2px;
  color: #111111;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
}

.ropes-tech-card small {
  margin-top: 2px;
  color: rgba(17, 17, 17, 0.62);
  font-size: 10px;
  font-weight: 900;
}

.ropes-card-actions {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  justify-items: end;
  gap: 6px;
}

.ropes-export-select {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 3px 6px;
  border: 1px solid rgba(17,17,17,0.20);
  border-radius: 999px;
  background: rgba(29, 158, 117, 0.18);
  color: #111111;
  cursor: pointer;
  font-family: var(--font-mono);
}

.ropes-export-select input {
  width: 13px;
  height: 13px;
  accent-color: var(--green);
}

.ropes-export-select span {
  margin: 0;
  color: #111111;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.45px;
}

.ropes-card-actions button {
  flex: 0 0 auto;
  min-width: 42px;
  min-height: 30px;
  padding: 0 8px;
  border: 2px solid rgba(17,17,17,0.72);
  border-radius: 8px;
  background: transparent;
  color: #111111;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.ropes-tech-summary {
  min-width: 0;
}

.ropes-hour-log {
  grid-column: 1 / -1;
  border: none;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.ropes-hour-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0 6px;
  border-bottom: none;
}

.ropes-hour-head span,
.ropes-hour-head strong {
  font-family: var(--font-mono);
  font-weight: 900;
  letter-spacing: 0.45px;
}

.ropes-hour-head span {
  color: rgba(17, 17, 17, 0.58);
  font-size: 10px;
  text-transform: uppercase;
}

.ropes-hour-head strong {
  color: #111111;
  font-size: 14px;
  font-weight: 950;
}

.ropes-hour-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(86px, 1fr);
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding: 0 2px 8px;
  background: transparent;
  scrollbar-width: thin;
}

.ropes-hour-cell {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 7px;
  border: none;
  border-radius: 8px;
  background: rgba(255,255,255,0.13);
  scroll-snap-align: start;
}

.ropes-hour-cell span,
.ropes-hour-cell em {
  display: block;
}

.ropes-hour-cell span {
  color: #111111;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
}

.ropes-hour-cell em {
  margin-top: 1px;
  color: rgba(17, 17, 17, 0.62);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}

.ropes-hour-cell input {
  width: 100%;
  min-height: 34px;
  min-width: 0;
  border: 1px solid rgba(17,17,17,0.18);
  border-bottom: 2px solid rgba(17,17,17,0.28);
  border-radius: 7px;
  background: rgba(255,255,255,0.20);
  color: #111111;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 900;
  padding: 5px 4px;
  text-align: center;
}

.ropes-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 4px 0 6px;
}

.ropes-mode-btn {
  padding: 8px 6px;
  border: 2px solid rgba(17, 17, 17, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  cursor: pointer;
}

.ropes-mode-btn.active {
  border-color: #111111;
  background: rgba(29, 158, 117, 0.72);
  color: #111111;
}

/* The grid's `label { display:flex }` rule out-specifies the [hidden] UA default, so the Name
   field stays visible in self mode without this — force it hidden when self-logging. */
#ropes-name-field[hidden] {
  display: none;
}

.ropes-self-hint {
  margin: 0 0 8px;
  color: rgba(17, 17, 17, 0.62);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
}

.ropes-self-hint strong {
  color: #111111;
}

.ropes-export-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.ropes-export-btn {
  padding: 10px 8px;
  border: 2px solid #111111;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  color: #111111;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.5px;
  cursor: pointer;
}

.ropes-export-btn:hover {
  background: rgba(29, 158, 117, 0.72);
}

@media (max-width: 760px) {
  .ropes-hour-grid {
    grid-auto-columns: minmax(82px, 30%);
  }
}

@media (max-width: 520px) {
  .ropes-hour-grid {
    grid-auto-columns: minmax(86px, 44%);
  }

  .ropes-mode {
    grid-template-columns: 1fr;
  }
}

.zone-sec-hdr {
  padding: 14px 16px 6px;
}

@media (max-width: 430px) {
  .member-price-card {
    grid-template-columns: 1fr;
  }

  .member-price {
    text-align: left;
  }

  .user-zone-grid {
    grid-template-columns: 1fr;
  }

  .invoice-form-grid,
  .invoice-mode-grid {
    grid-template-columns: 1fr;
  }

  .rota-head,
  .rota-controls,
  .rota-extra-trip,
  .rota-calendar {
    grid-template-columns: 1fr;
  }

  .rota-head {
    display: grid;
  }
}

.settings-select {
  max-width: 152px;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: right;
  outline: none;
}

.marine-terms {
  margin: 10px 16px 2px;
  border: 1px solid rgba(17,17,17,0.09);
  border-radius: 8px;
  background: rgba(255,255,255,0.24);
  overflow: hidden;
}

.marine-terms summary {
  padding: 11px 12px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.terms-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 0 10px 11px;
}

.terms-grid div {
  min-width: 0;
  padding: 8px;
  border-radius: 7px;
  background: rgba(255,255,255,0.34);
  border: 1px solid rgba(17,17,17,0.06);
}

.terms-grid strong,
.terms-grid span {
  display: block;
}

.terms-grid strong {
  color: var(--green-dark);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
}

.terms-grid span {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.28;
}

@media (max-width: 430px) {
  .terms-grid {
    grid-template-columns: 1fr;
  }
}

.toggle { position: relative; width: 44px; height: 26px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0;
  background: var(--bg3);
  border-radius: 26px;
  cursor: pointer;
  border: 1px solid var(--border2);
  transition: background 0.2s;
}
.slider::before {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  left: 2px; top: 2px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}
input:checked + .slider { background: var(--green-dark); border-color: var(--green-dark); }
input:checked + .slider::before { transform: translateX(18px); background: white; }

/* ─────────────────────────── TOAST ─────────────────────────── */
.toast {
  position: fixed;
  bottom: calc(18px + var(--safe-area-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 11px;
  font-size: 11px;
  color: var(--text);
  font-family: var(--font-mono);
  z-index: 540;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  box-shadow: var(--shadow-lg);
  letter-spacing: 0.5px;
}

.toast.show { opacity: 1; }

/* ─────────────────────────── ONBOARDING HINT ─────────────────────────── */
.hint {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  z-index: 300;
  max-width: 280px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.hint.show { opacity: 1; }

.hint-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--green-dark);
  margin-bottom: 6px;
}

.hint-body {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  .pulse, .progress-fill, .sheet, .marker-platform.highlighted { animation: none; transition: none; }
}

/* ─────────────────────── AIRPORT JOURNEY PLANNER ─────────────────────── */
.journey-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 16px 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.journey-tab {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-dim);
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  transition: all 0.15s;
}

.journey-tab:hover { background: var(--bg3); }
.journey-tab.active {
  background: var(--green-dark);
  color: white;
  border-color: var(--green-dark);
}

body.dark .journey-tab.active { background: var(--green); color: var(--bg); }

.journey-content { padding: 0 16px 16px; }

.parking-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
  position: relative;
}

.parking-card.warning {
  border-color: var(--amber-border);
  background: var(--amber-bg);
}

.parking-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.parking-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}

.parking-price {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--green-dark);
  font-weight: 500;
  background: #e0f3e8;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
}

body.dark .parking-price { background: #0f3a1a; color: var(--green); }

.parking-card.warning .parking-price {
  background: transparent;
  color: var(--amber);
  border: 1px solid var(--amber-border);
}

.parking-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin: 4px 0;
  line-height: 1.5;
}

.parking-rating {
  font-size: 11px;
  color: var(--amber);
  margin: 4px 0 6px;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

.parking-serves {
  font-size: 11px;
  color: var(--text-dim);
  font-style: italic;
  margin: 4px 0 6px;
}

.parking-tips {
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--bg3);
  border-radius: 6px;
  font-size: 11px;
  color: var(--text-dim);
}

.parking-tips-title {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.parking-tip { display: block; padding: 2px 0; }
.parking-tip::before { content: '• '; color: var(--green-dark); }

.parking-book-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 12px;
  background: var(--green-dark);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-family: var(--font);
  text-decoration: none;
  cursor: pointer;
}

body.dark .parking-book-btn { background: var(--green); color: var(--bg); }

.warning-box {
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 11px;
  color: var(--amber);
  margin-top: 8px;
  line-height: 1.4;
}

.operator-terminal {
  background: var(--bg3);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.operator-terminal strong {
  color: var(--green-dark);
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.5px;
}

body.dark .operator-terminal strong { color: var(--green); }

.operator-terminal-side {
  font-size: 11px;
  color: var(--text-muted);
}

.quick-fact {
  font-size: 12px;
  color: var(--text-dim);
  padding: 4px 0;
  line-height: 1.4;
}

.quick-fact::before {
  content: '→ ';
  color: var(--green-dark);
  font-family: var(--font-mono);
}

/* ─────────────────────── FLIGHT POPUP (FlightRadar style) ─────────────────────── */
.flight-popup {
  position: absolute;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 12px 14px;
  min-width: 200px;
  z-index: 500;
  pointer-events: auto;
}

.flight-popup-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.flight-popup-id {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--green-dark);
}

body.dark .flight-popup-id { color: var(--green); }

.flight-popup-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
}

.flight-popup-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  font-size: 12px;
  color: var(--text-dim);
}

.flight-popup-row strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-weight: 500;
}

/* ─────────────────────── MOVING CHOPPER MARKERS ─────────────────────── */
.marker-chopper {
  width: 18px;
  height: 18px;
  position: relative;
  cursor: pointer;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.4));
  transition: transform 0.1s;
}

.marker-chopper:hover { transform: scale(1.3); }

.marker-chopper svg {
  width: 100%;
  height: 100%;
  fill: var(--green-dark);
}

body.dark .marker-chopper svg { fill: var(--green); }

.chopper-trail {
  stroke: var(--green-dark);
  stroke-width: 1.5;
  fill: none;
  stroke-dasharray: 3 3;
  opacity: 0.5;
}

body.dark .chopper-trail { stroke: var(--green); }

/* ─────────────────────── WELCOME HINT REFRESH ─────────────────────── */
.welcome-banner {
  position: absolute;
  top: calc(70px + var(--safe-area-top));
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  letter-spacing: 1px;
  z-index: 300;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.welcome-banner.show { opacity: 1; }

.welcome-banner .pulse {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

/* ─────────────────────── REGION SEARCH HINT ─────────────────────── */
.search-mode-toggle {
  padding: 8px 16px 4px;
  display: flex;
  gap: 6px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 1px;
}

.search-mode-toggle span {
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
}

.search-mode-toggle span.active {
  background: var(--green-dark);
  color: white;
}

body.dark .search-mode-toggle span.active { background: var(--green); color: var(--bg); }

/* ═══════════════════════════════════════════════════════════════════════ */
/*  v0.5.0 additions — helicopter markers, flight popups, airport sheet    */
/* ═══════════════════════════════════════════════════════════════════════ */

/* Moving helicopter marker */
.marker-chopper {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.35));
}
.marker-chopper:hover { transform: scale(1.25); }

.marker-chopper svg {
  width: 24px;
  height: 24px;
  animation: rotor-buzz 0.1s linear infinite alternate;
}

@keyframes rotor-buzz {
  0%   { transform: scale(1,1); }
  100% { transform: scale(1.04, 0.96); }
}

.marker-chopper.bristow  svg { color: #1d9e75; }
.marker-chopper.nhv      svg { color: #d4773a; }
.marker-chopper.ohs      svg { color: #3a7ad4; }
.marker-chopper.chc      svg { color: #9b3ad4; }
.marker-chopper.default  svg { color: #5d5d5d; }

body.dark .marker-chopper.bristow  svg { color: #5dde7a; }
body.dark .marker-chopper.nhv      svg { color: #e8a76a; }
body.dark .marker-chopper.ohs      svg { color: #6aa8e8; }
body.dark .marker-chopper.chc      svg { color: #c47aea; }

/* Flight info popup (appears when tapping chopper) */
.flight-popup {
  font-family: var(--font);
  min-width: 250px;
}

.flight-popup-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 8px;
}

.flight-popup-id {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--green-dark);
  font-weight: 500;
  letter-spacing: 1px;
}

body.dark .flight-popup-id { color: var(--green); }

.flight-popup-op {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.flight-popup-route {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}

.route-end {
  text-align: center;
  flex-shrink: 0;
}

.route-code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

.route-time {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.route-arrow {
  flex: 1;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  position: relative;
}

.route-progress {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: var(--green);
  border-radius: 2px;
  transition: width 1s linear;
}

.route-arrow-head {
  position: absolute;
  right: -3px;
  top: -10px;
  font-size: 14px;
  color: var(--green-dark);
}

body.dark .route-arrow-head { color: var(--green); }

.flight-popup-alert {
  padding: 8px 10px;
  background: var(--amber-bg);
  color: var(--amber);
  border: 1px solid var(--amber-border);
  border-radius: 6px;
  font-size: 12px;
  font-family: var(--font-mono);
  margin-bottom: 6px;
}

.flight-popup-note {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-align: center;
}

/* (old airport-tabs CSS removed in v0.5.2) */

/* Mode switch — "heading out" vs "heading home" */
.mode-switch {
  display: flex;
  background: var(--bg3);
  border-radius: 20px;
  padding: 3px;
  gap: 2px;
  margin: 0 8px;
}

.mode-btn {
  flex: 1;
  padding: 6px 10px;
  background: transparent;
  border: none;
  border-radius: 18px;
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font);
  white-space: nowrap;
}

.mode-btn.active {
  background: var(--bg2);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* ═══════════════════════════════════════════════════════════════════════ */
/*  v0.5.2 — airport operator tiles, summary stats, terminals modal        */
/* ═══════════════════════════════════════════════════════════════════════ */

/* Airport live activity summary */
.airport-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}

.summary-stat {
  text-align: center;
}

.summary-num {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  color: #111111;
  line-height: 1;
}

body.dark .summary-num { color: var(--green); }

.summary-stat.warn .summary-num { color: var(--amber); }

.summary-lbl {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: var(--font-mono);
  margin-top: 4px;
}

/* Terminals button in header */
.terminals-btn {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 14px;
  padding: 4px 10px;
  font-size: 10px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s;
  display: none;
}
.terminals-btn:hover { background: var(--bg3); color: var(--text); }
.terminals-btn:active { transform: scale(0.96); }

/* Operator tiles grid */
.op-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}

.op-tile {
  background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(238,245,244,0.76));
  border: 2px solid rgba(17, 17, 17, 0.86);
  border-left: 6px solid var(--green);
  border-radius: 8px;
  padding: 13px 11px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  transition: all 0.15s;
  box-shadow: 0 3px 0 rgba(17,17,17,0.82), 0 8px 16px rgba(0,0,0,0.12);
}

.op-tile:hover {
  background: linear-gradient(180deg, #ffffff, rgba(232,242,240,0.95));
  transform: translateY(-2px);
  box-shadow: 0 5px 0 rgba(17,17,17,0.82), 0 12px 22px rgba(0,0,0,0.16);
}
.op-tile:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(17,17,17,0.82), 0 4px 10px rgba(0,0,0,0.12);
}

.op-tile-name {
  font-size: 14px;
  font-weight: 800;
  color: #111111;
  margin-bottom: 4px;
  letter-spacing: 0.4px;
}

.op-tile-count {
  font-size: 10px;
  color: #111111;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  font-weight: 700;
  opacity: 0.72;
}

.op-bristow { border-left-color: #1d9e75; }
.op-nhv     { border-left-color: #d4773a; }
.op-ohs     { border-left-color: #3a7ad4; }
.op-chc     { border-left-color: #9b3ad4; }
.op-default { border-left-color: var(--text-muted); }

/* ABZ heliport — fixed 4-column operator row, no wrap at any viewport */
.abz-op-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.abz-op-grid .op-tile {
  padding: 10px 5px;
  min-height: 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border-left-width: 5px;
}
.abz-op-grid .op-tile-name {
  font-size: clamp(10px, 2.8vw, 14px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  white-space: nowrap;
}
.abz-op-grid .op-tile-count {
  font-size: clamp(8px, 2.1vw, 10px);
  margin-top: 4px;
}
@media (min-width: 641px) {
  .abz-op-grid { gap: 10px; }
  .abz-op-grid .op-tile { padding: 14px 10px; min-height: 68px; border-left-width: 6px; }
  .abz-op-grid .op-tile-name { font-size: 14px; }
  .abz-op-grid .op-tile-count { font-size: 10px; }
}

.op-bristow-text { color: #1d9e75; }
.op-nhv-text     { color: #d4773a; }
.op-ohs-text     { color: #3a7ad4; }
.op-chc-text     { color: #9b3ad4; }

body.dark .op-bristow-text { color: #5dde7a; }
body.dark .op-nhv-text     { color: #e8a76a; }
body.dark .op-ohs-text     { color: #6aa8e8; }
body.dark .op-chc-text     { color: #c47aea; }

body.dark .op-tile {
  background: linear-gradient(180deg, rgba(28,33,32,0.96), rgba(12,16,15,0.94));
  border-color: rgba(255,255,255,0.88);
  box-shadow: 0 3px 0 rgba(255,255,255,0.34), 0 10px 18px rgba(0,0,0,0.42);
}
body.dark .op-tile:hover {
  background: linear-gradient(180deg, rgba(38,44,43,0.98), rgba(18,23,22,0.96));
  box-shadow: 0 5px 0 rgba(255,255,255,0.36), 0 14px 24px rgba(0,0,0,0.50);
}
body.dark .op-tile-name,
body.dark .op-tile-count {
  color: #ffffff;
}
body.dark .dd-operator {
  border-left-color: #ffffff;
  background: rgba(255,255,255,0.06);
}
body.dark .dd-operator strong {
  color: #ffffff;
}

/* Back button (when viewing an operator's flights) */
.back-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.back-btn:hover { background: var(--bg2); color: var(--text); }

.airport-note-strip {
  margin: 10px 16px 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.32);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-dim);
}

.airport-note-strip.compact {
  margin: 0 0 10px;
  font-size: 11px;
}

.parking-stack {
  display: grid;
  gap: 8px;
}

.parking-card.compact {
  margin-bottom: 0;
  background: rgba(255,255,255,0.28);
}

.abz-guide-wrap {
  padding: 0 16px 8px;
}

.abz-airfield-card {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.25);
  background:
    linear-gradient(180deg, rgba(166,185,140,0.35), rgba(109,131,91,0.28)),
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.18), transparent 40%);
  box-shadow: 0 10px 26px rgba(0,0,0,0.14);
}

.abz-airfield {
  position: relative;
  height: 208px;
  background:
    linear-gradient(90deg, rgba(122,144,100,0.42), rgba(94,118,82,0.30)),
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(0,0,0,0.05));
}

.abz-runway {
  position: absolute;
  left: 12%;
  right: 10%;
  top: 50%;
  height: 28px;
  margin-top: -14px;
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(60,65,68,0.92), rgba(84,88,90,0.85));
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.08);
}

.abz-runway::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.8) 0 14px, transparent 14px 24px);
}

.abz-spot {
  position: absolute;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #fff;
  cursor: pointer;
  padding: 0;
}

.abz-spot-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.88);
  box-shadow: 0 4px 10px rgba(0,0,0,0.28);
}

.abz-spot-name {
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(14,15,18,0.55);
  backdrop-filter: blur(4px);
}

.abz-spot-bristow { left: 14%; top: 56%; }
.abz-spot-bristow .abz-spot-dot { background: #1d9e75; }
.abz-spot-chc { left: 12%; top: 70%; }
.abz-spot-chc .abz-spot-dot { background: #9b3ad4; }
.abz-spot-nhv { left: 55%; top: 22%; }
.abz-spot-nhv .abz-spot-dot { background: #d4773a; }
.abz-spot-ohs { right: 10%; top: 48%; }
.abz-spot-ohs .abz-spot-dot { background: #3a7ad4; }

.abz-spot.active .abz-spot-name,
.abz-spot:hover .abz-spot-name {
  background: rgba(14,15,18,0.78);
}

.abz-spot.active .abz-spot-dot,
.abz-spot:hover .abz-spot-dot {
  transform: scale(1.12);
}

.abz-terminal-card {
  margin-top: 10px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.34);
  padding: 12px;
}

.abz-terminal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.abz-terminal-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.abz-terminal-note {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.abz-terminal-visual {
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.24);
  border: 1px dashed rgba(0,0,0,0.14);
}

.abz-terminal-visual-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.abz-terminal-visual-copy {
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-muted);
}

.open-map-btn.small {
  width: auto;
  padding: 10px 12px;
  white-space: nowrap;
  font-size: 12px;
}

.empty-state {
  padding: 16px;
  background: var(--bg3);
  border-radius: 10px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

/* Installation markers — on the main map */
.platform-info-card {
  margin: 0 16px 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.34);
  border: 1px solid rgba(255,255,255,0.46);
}

.platform-info-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.platform-info-row:first-child {
  padding-top: 0;
}

.platform-info-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.platform-info-row span {
  color: var(--text-muted);
  font-size: 10px;
  font-family: var(--font-mono);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.platform-info-row strong {
  color: var(--text);
  font-size: 12px;
  text-align: right;
}

.marker-installation {
  cursor: pointer;
  transition: transform 0.15s;
}
.marker-installation:hover { transform: scale(1.2); }

.marker-installation.highlighted {
  animation: pulse-ring 1.5s infinite;
}

@keyframes pulse-ring {
  0%, 100% { filter: drop-shadow(0 2px 3px rgba(0,0,0,0.5)) drop-shadow(0 0 0 rgba(93, 222, 122, 0.8)); }
  50%      { filter: drop-shadow(0 2px 3px rgba(0,0,0,0.5)) drop-shadow(0 0 8px rgba(93, 222, 122, 0.9)); }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/*  v0.5.3 additions                                                        */
/* ═══════════════════════════════════════════════════════════════════════ */

/* FR24-style helicopter marker */
.marker-chopper-fr24 {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
  transition: filter 0.15s;
}
.marker-chopper-fr24:hover {
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.7)) brightness(1.15);
}

/* Estimated (schedule/inferred) flights — now rendered the same as confirmed
   live ADS-B positions (full opacity, no dashed ring) per request 2026-06-05.
   Class is kept in place so the distinction can be re-enabled later if needed. */
.marker-chopper-est {
  position: relative;
  opacity: 1;
}

/* Airport label — inline with marker, properly anchored */
.marker-airport-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: auto;
}
.marker-airport {
  width: 14px;
  height: 14px;
  background: var(--blue);
  border: 2px solid rgba(255,255,255,0.9);
  border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
  flex-shrink: 0;
}
.marker-airport-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  color: #ffffff;
  background: transparent;
  padding: 0 4px;
  border-radius: 0;
  border: none;
  white-space: nowrap;
  box-shadow: none;
  letter-spacing: 1px;
  text-shadow: 1px 1px 2px #000, -1px -1px 2px #000, 1px -1px 2px #000, -1px 1px 2px #000;
}
body.dark .marker-airport-label {
  color: #ffffff;
  text-shadow: 1px 1px 2px #000, -1px -1px 2px #000;
}

/* 5-cell conditions grid */
.conditions {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--border);
  margin: 0 16px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

/* Clothing badge in tips header */
.clothing-badge {
  font-size: 10px;
  padding: 3px 9px;
  border-radius: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  font-weight: 500;
}
.clothing-badge.summer {
  background: #fff8e0;
  color: #8a6200;
  border: 1px solid #f0d070;
}
.clothing-badge.winter {
  background: #e0eaf8;
  color: #1a4080;
  border: 1px solid #a0bcdc;
}
body.dark .clothing-badge.summer {
  background: #2a1e00;
  color: #e8c84a;
  border-color: #5a4a10;
}
body.dark .clothing-badge.winter {
  background: #0a1a30;
  color: #6ab0f8;
  border-color: #1a3a60;
}

/* Flight path label on map */
.path-label {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  font-weight: 600;
  text-shadow: 1px 1px 2px #000, -1px -1px 2px #000;
  white-space: nowrap;
}

/* ─── Rotor spin animation ─────────────────────────────────────────────── */
@keyframes spin-rotor {
  from { transform: rotate(0deg);   }
  to   { transform: rotate(360deg); }
}

/* FR24-style chopper marker — fixed 22px, never scales with map zoom */
.marker-chopper-fr24 {
  width: 22px !important;
  height: 22px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  /* Fixed size regardless of zoom — Leaflet markers don't zoom by default,
     this just enforces the container matches the icon */
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
  transition: filter 0.15s;
}
.marker-chopper-fr24:hover {
  filter: drop-shadow(0 1px 6px rgba(0,0,0,0.7)) brightness(1.2);
  transform: scale(1.3);
}

/* Selected chopper - red/orange target ring to stand out from map yellows */
.marker-chopper-selected .marker-chopper-fr24 {
  filter: brightness(1.35) saturate(1.55) drop-shadow(0 0 7px rgba(228,56,32,1)) drop-shadow(0 0 14px rgba(255,96,48,0.78)) !important;
}

.marker-chopper-selected .marker-chopper-fr24::before {
  content: "";
  position: absolute;
  inset: -7px;
  border: 3px solid rgba(228, 56, 32, 0.95);
  background: rgba(228, 56, 32, 0.16);
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.72), 0 0 18px rgba(228,56,32,0.78);
  pointer-events: none;
  z-index: -1;
}

/* Coastguard — red/white alternating flash */
.marker-chopper-coastguard {
  animation: cg-drop-shadow 0.75s ease-in-out infinite alternate;
}
.marker-chopper-coastguard .cg-icon {
  color: #e8001a;
  animation: cg-color-flash 0.75s ease-in-out infinite alternate;
}
@keyframes cg-color-flash {
  from { color: #e8001a; }
  to   { color: #ffffff; }
}
@keyframes cg-drop-shadow {
  from { filter: drop-shadow(0 1px 5px rgba(232,0,26,0.7)); }
  to   { filter: drop-shadow(0 1px 5px rgba(255,255,255,0.6)); }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/*  v0.5.5 / v0.5.6 additions                                              */
/* ═══════════════════════════════════════════════════════════════════════ */

/* ABZ mini-map container */
#abz-mini-map {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* Leaflet popup — black text always */
.leaflet-popup-content {
  color: #111111 !important;
  font-family: Arial, sans-serif !important;
}

.wind-tap-popup .leaflet-popup-content-wrapper {
  background: rgba(255,255,255,0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  padding: 0;
}
.wind-tap-popup .leaflet-popup-content {
  font-family: var(--font-mono, 'Share Tech Mono', monospace) !important;
  font-size: 12px !important;
  margin: 8px 13px !important;
  white-space: nowrap;
  color: #111111 !important;
  line-height: 1.7;
}
.wind-tap-popup .leaflet-popup-content b {
  color: #111111 !important;
  font-size: 13px;
}
body.dark .wind-tap-popup .leaflet-popup-content b {
  color: #111111 !important;
}
.wind-tap-popup .leaflet-popup-tip-container { display: none; }

/* Parking map buttons */
.parking-map-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 8px;
  border-radius: var(--radius);
  text-decoration: none;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  transition: opacity 0.15s;
  border: 1px solid transparent;
}
.parking-map-btn span {
  font-size: 10px;
  font-weight: 400;
  opacity: 0.85;
}
.parking-map-btn:active { opacity: 0.92; }
.bristow-btn {
  background: #e8f5ef;
  color: var(--green-dark);
  border-color: #a8d8b8;
}
.ohs-btn {
  background: #e0eaf8;
  color: #3a7ad4;
  border-color: #a0bcdc;
}
body.dark .bristow-btn { background: #0f2b1a; border-color: var(--green-dark); color: var(--green); }
body.dark .ohs-btn     { background: #0a1a30; border-color: #1a3a60; color: #6ab0f8; }

/* Open on map button */
.open-map-btn {
  width: 100%;
  background: var(--green-dark);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 12px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: opacity 0.15s;
}
.open-map-btn:active { opacity: 0.85; }
body.dark .open-map-btn { background: var(--green); color: var(--bg); }

/* Terminal pins on map — clean coloured pills, no white border halo */
.terminal-pin {
  display: flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 10px;
  color: white;
  font-size: 10px;
  font-weight: 700;
  font-family: Arial, sans-serif;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(0,0,0,0.55);
  border: none;
  cursor: pointer;
  transition: transform 0.15s;
  letter-spacing: 0.3px;
}
.terminal-pin:hover { transform: scale(1.08); }

/* Wave overlay FAB active state */
.wave-fab.active {
  background: #1a4080;
  color: white;
  border-color: #1a4080;
}
body.dark .wave-fab.active {
  background: #2060c0;
  border-color: #2060c0;
}

/* Wave overlay legend (appears bottom-left when active) */
.wave-legend {
  position: absolute;
  left: 12px;
  bottom: calc(120px + var(--safe-area-bottom));
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  box-shadow: var(--shadow);
  font-size: 10px;
  font-family: var(--font-mono);
  z-index: 350;
  display: none;
  flex-direction: column;
  gap: 3px;
}
.wave-legend.show { display: flex; }
.wave-legend-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
}
.wave-legend-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Satellite label fix moved to base .platform-label style */

/* ── Remove all white boxes from Leaflet labels on satellite map ────────── */
.leaflet-tooltip {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.leaflet-tooltip::before { display: none !important; }

/* Platform marker dots — slightly larger on satellite for visibility */
.marker-platform {
  width: 10px !important;
  height: 10px !important;
  box-shadow: 0 0 0 1.5px rgba(0,0,0,0.5), 0 0 4px rgba(0,0,0,0.4) !important;
}
.marker-rig {
  box-shadow: 0 0 0 1.5px rgba(0,0,0,0.5), 0 0 4px rgba(0,0,0,0.4) !important;
}

/* ─── Kill Leaflet tooltip white box on flight path labels ─────────── */
.path-label.leaflet-tooltip {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  text-shadow: 1px 1px 2px #000, -1px -1px 2px #000,
               1px -1px 2px #000, -1px  1px 2px #000 !important;
}
.path-label.leaflet-tooltip::before { display: none !important; }

/* ─── Kill any remaining Leaflet tooltip halos on platform labels ──── */
.platform-label.leaflet-tooltip {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.platform-label.leaflet-tooltip::before { display: none !important; }

/* ═══════════════════════════════════════════════════════════════════════ */
/*  v0.5.8 — dual search, pulse ring, unified dots                         */
/* ═══════════════════════════════════════════════════════════════════════ */

/* Dual search stack */
.search-stack {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  margin-top: 56px;
}

.search-stack-single {
  gap: 0;
}

.search-pill-top,
.search-pill-bottom {
  background: var(--bg2);
  border: 2px solid #111111;
  border-radius: 20px;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow);
  position: relative;
}

.search-pill-top input,
.search-pill-bottom input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #111111;
  outline: none;
  font-weight: 500;
}

.search-pill-top input::placeholder,
.search-pill-bottom input::placeholder {
  color: #333333;
  font-weight: 500;
}

body.dark .search-pill-top,
body.dark .search-pill-bottom {
  border-color: var(--green);
}

body.dark .search-pill-top input,
body.dark .search-pill-bottom input {
  color: var(--text);
}

body.dark .search-pill-top input::placeholder,
body.dark .search-pill-bottom input::placeholder {
  color: var(--text-dim);
}

/* Keep dropdown positioned relative to each pill */
.search-pill-top .search-dd,
.search-pill-bottom .search-dd {
  position: absolute;
  top: calc(100% + 4px);
  left: -2px;
  right: -2px;
}

/* Pulsing ring marker — separate layer on selected platform */
.pulse-ring {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid #1dff88;
  animation: pulse-ring-anim 1.2s ease-out infinite;
  pointer-events: none;
}

@keyframes pulse-ring-anim {
  0%   { transform: scale(0.3); opacity: 1; }
  100% { transform: scale(1);   opacity: 0; }
}

/* Override search-pill for the old single pill (topbar uses .search-pill) */
.topbar .search-pill {
  border: 2px solid #111111;
}

/* Unified dot sizes — 8px for both */
.marker-platform,
.marker-rig {
  width: 8px !important;
  height: 8px !important;
}

/* Make platform highlighted dot same size as ring target */
.marker-platform.highlighted {
  width: 10px !important;
  height: 10px !important;
  background: #1dff88 !important;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/*  v0.5.9 — tap area, status colours, clear X, SVG map                   */
/* ═══════════════════════════════════════════════════════════════════════ */

/* Invisible 36px hit area wrapping visible 8px dot */
.marker-hit-area {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: transparent;
}

/* Platform sheet status colour tints */
.sheet[data-status="go"] .sheet-head {
  background: linear-gradient(180deg, rgba(29,158,117,0.08) 0%, transparent 100%);
  border-bottom: 1px solid rgba(29,158,117,0.2);
}
.sheet[data-status="warn"] .sheet-head {
  background: linear-gradient(180deg, rgba(196,128,16,0.08) 0%, transparent 100%);
  border-bottom: 1px solid rgba(196,128,16,0.2);
}
.sheet[data-status="nogo"] .sheet-head {
  background: linear-gradient(180deg, rgba(200,50,58,0.08) 0%, transparent 100%);
  border-bottom: 1px solid rgba(200,50,58,0.2);
}

/* Conditions cells — subtle status tints */
.sheet[data-status="go"]   .conditions { border-color: rgba(29,158,117,0.3); }
.sheet[data-status="warn"] .conditions { border-color: rgba(196,128,16,0.3); }
.sheet[data-status="nogo"] .conditions { border-color: rgba(200,50,58,0.3); }

/* Search clear X button */
.search-clear {
  background: transparent;
  border: none;
  color: #666;
  font-size: 13px;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
  flex-shrink: 0;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 20px;
  height: 20px;
}
.search-clear:hover {
  background: rgba(0,0,0,0.08);
  color: #111;
}

/* ABZ SVG map container */
.abz-svg-map {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.abz-svg-map svg rect[onclick],
.abz-svg-map svg [onclick] {
  cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/*  v0.6.0 — weather band, time slider, layer selector, detail panel       */
/* ═══════════════════════════════════════════════════════════════════════ */

/* Status badge in search bar */
.status-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  white-space: nowrap;
}
.status-badge.go   { background: #e0f3e8; color: #0f6e56; border: 1px solid #a8d8b8; }
.status-badge.warn { background: #fef4e0; color: #c48010; border: 1px solid #f0c970; }
.status-badge.nogo { background: #fde8ea; color: #c8323a; border: 1px solid #f0a0a5; }

body.dark .status-badge.go   { background: rgba(0,201,106,0.12); color: #1dff88; border-color: rgba(0,201,106,0.35); }
body.dark .status-badge.warn { background: rgba(240,184,64,0.12); color: #f0b840; border-color: rgba(240,184,64,0.35); }
body.dark .status-badge.nogo { background: rgba(240,64,80,0.12);  color: #f04050; border-color: rgba(240,64,80,0.35); }

/* Weather band — bottom of screen */
/* v0.6.5: old solid band removed — replaced by floating transparent controls */

.time-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.time-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--green-dark);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
body.dark .time-slider::-webkit-slider-thumb { background: var(--green); }

.time-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
}
.time-lbl {
  font-size: 9px;
  color: #888;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: color 0.15s;
}
.time-lbl.active {
  color: var(--green-dark);
  font-weight: 700;
}
body.dark .time-lbl.active { color: var(--green); }

.band-flights-hidden {
  padding: 0 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 100px;
  overflow-y: auto;
}

.band-flight {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg3);
  border-radius: 6px;
  cursor: pointer;
  border-left: 3px solid var(--border);
  font-size: 11px;
}
.band-flight.airborne  { border-left-color: #1d9e75; }
.band-flight.delayed   { border-left-color: #c48010; }
.band-flight.scheduled { border-left-color: #888; }

.band-flight-id {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #111;
  flex-shrink: 0;
}
body.dark .band-flight-id { color: var(--text); }

.band-flight-route {
  flex: 1;
  color: #555;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.dark .band-flight-route { color: var(--text-dim); }

.band-flight-status {
  flex-shrink: 0;
  font-size: 9px !important;
  padding: 2px 6px !important;
}

/* Detail panel — slides up from bottom */
#detail-panel {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.90);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.2);
  z-index: 450;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  max-height: 80vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#detail-panel.open {
  transform: translateY(0);
}

#detail-panel.explore-side {
  top: calc(var(--safe-area-top) + 120px);
  bottom: auto;
  left: 0;
  right: auto;
  width: min(360px, 84vw);
  max-height: calc(100vh - 150px);
  border-top-left-radius: 0;
  border-top-right-radius: 18px;
  border-bottom-right-radius: 18px;
  border-bottom-left-radius: 0;
  box-shadow: 10px 0 28px rgba(0,0,0,0.18);
  transform: translateX(-108%);
  overflow-y: auto;
}

#detail-panel.explore-side.open {
  transform: translateX(0);
}

.detail-handle {
  padding: 10px 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}

.detail-handle-bar {
  width: 36px; height: 4px;
  background: var(--border2);
  border-radius: 2px;
  flex-shrink: 0;
}

.detail-title {
  font-size: 15px;
  font-weight: 600;
  color: #111;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}
body.dark .detail-title { color: var(--text); }

.detail-body {
  padding-bottom: calc(20px + var(--safe-area-bottom));
}

/* Marker hit area */
.marker-hit-area {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; background: transparent;
}

/* Platform dots — unified 8px */
.marker-platform {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #1d9e75;
  box-shadow: 0 0 0 1.5px rgba(0,0,0,0.5);
}
.marker-platform.highlighted {
  width: 12px !important; height: 12px !important;
  background: #1dff88 !important;
  animation: pulse-marker 1.2s ease-in-out infinite;
}

.marker-rig {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #c47a20;
  box-shadow: 0 0 0 1.5px rgba(0,0,0,0.5);
}

/* Pulse ring */
.pulse-ring {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 3px solid #1dff88;
  animation: pulse-ring-anim 1.2s ease-out infinite;
  pointer-events: none;
}
@keyframes pulse-ring-anim {
  0%   { transform: scale(0.3); opacity: 1; }
  100% { transform: scale(1);   opacity: 0; }
}
@keyframes pulse-marker {
  0%   { box-shadow: 0 0 0 0   rgba(29,255,136,0.9), 0 0 0 0   rgba(29,255,136,0.5); }
  50%  { box-shadow: 0 0 0 10px rgba(29,255,136,0.0),0 0 0 18px rgba(29,255,136,0.0); }
  100% { box-shadow: 0 0 0 0   rgba(29,255,136,0.9), 0 0 0 0   rgba(29,255,136,0.5); }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/*  v0.6.1 — info row above conditions, yellow choppers                    */
/* ═══════════════════════════════════════════════════════════════════════ */

.wave-fab { display: none !important; }

/* ═══════════════════════════════════════════════════════════════════════ */
/*  v0.6.3 — fullscreen btn, black fonts, zoom position                    */
/* ═══════════════════════════════════════════════════════════════════════ */

/* Stack fullscreen + theme buttons vertically top-right */
.topbar-right-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
  margin-top: 56px;
}

/* Fullscreen button — same style + size as the other stack icon buttons (.theme-btn = 38) */
#fullscreen-btn {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  color: var(--text);
  transition: background 0.15s;
}
#fullscreen-btn:active { background: var(--bg3); }

/* Global black text for light mode */
body:not(.dark) {
  color: #0a0a0a;
}
body:not(.dark) .sheet-title,
body:not(.dark) .detail-title,
body:not(.dark) .band-platform-name,
body:not(.dark) .cond-val,
body:not(.dark) .flight-id,
body:not(.dark) .dd-item,
body:not(.dark) .dd-region,
body:not(.dark) .op-tile-name,
body:not(.dark) .summary-num,
body:not(.dark) .summary-lbl,
body:not(.dark) input,
body:not(.dark) input::placeholder {
  color: #0a0a0a !important;
}

/* Zoom controls — pushed below dual search bars */
.leaflet-top.leaflet-right {
  margin-top: 130px !important;
}

/* Desktop only: line the Leaflet right-controls (zoom etc.) up with the topbar icon
   column — Leaflet's default corner offset leaves them ~21px too far right on PC.
   Mobile alignment is fine, so leave it untouched there. */
@media (min-width: 900px) {
  .leaflet-top.leaflet-right { margin-right: 21px !important; }
}

/* Fullscreen mode — hide browser UI padding when in fullscreen */
:fullscreen .app,
:-webkit-full-screen .app {
  height: 100vh !important;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/*  v0.6.4 — floating transparent weather controls over the map            */
/* ═══════════════════════════════════════════════════════════════════════ */

/* Override old solid band — now transparent container */
#weather-band {
  position: absolute !important;
  bottom: calc(var(--safe-area-bottom)) !important;
  left: 0 !important;
  right: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  z-index: 400 !important;
  /* pointer-events on individual rows only — band container itself auto */
  padding: 0 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* All rows allow their own pointer events */
.float-row { pointer-events: auto; }

/* ── Row 1: Layer buttons + info button ── */
.float-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.float-layers {
  display: flex;
  gap: 5px;
  background: rgba(14,15,18,0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,0.12);
}

.float-layer-btn {
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 12px;
  transition: background 0.15s;
  line-height: 1;
}
.float-layer-btn:active,
.float-layer-btn.active {
  background: rgba(29,255,136,0.25);
  font-weight: 800;
}

.float-info-btn {
  background: rgba(14,15,18,0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 6px 12px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  cursor: pointer;
  white-space: nowrap;
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.3px;
}
.float-info-btn:active { background: rgba(29,158,117,0.5); }

/* ── Row 2: Condition pills ── */
.float-row-cond {
  display: flex;
  gap: 5px;
  justify-content: space-between;
}

.float-cond {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(14,15,18,0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 10px;
  padding: 5px 3px 4px;
  border: 1px solid rgba(255,255,255,0.10);
  min-width: 0;
}

/* Status colour accents on the pill border */
.float-cond.go        { border-color: rgba(29,220,120,0.5); }
.float-cond.warn      { border-color: rgba(240,180,40,0.5); }
.float-cond.nogo      { border-color: rgba(210,50,50,0.5); }
.float-cond.no-status { border-color: transparent; }

.float-cond-val {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
}

.float-cond.go   .float-cond-val { color: #1dff88; }
.float-cond.warn .float-cond-val { color: #f5c842; }
.float-cond.nogo .float-cond-val { color: #ff5555; }

.float-cond-lbl {
  font-size: 7px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  font-family: var(--font-mono);
  margin-top: 2px;
}

/* ── Row 3: Time slider strip ── */
.float-row-slider {
  background: rgba(14,15,18,0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 14px;
  padding: 7px 12px 6px;
  border: 1px solid rgba(255,255,255,0.10);
}

/* Override time slider for dark float */
.float-row-slider .time-slider {
  background: rgba(255,255,255,0.15);
}
.float-row-slider .time-slider::-webkit-slider-thumb {
  background: #1dff88;
  box-shadow: 0 0 6px rgba(29,255,136,0.5);
}

.float-row-slider .time-labels { margin-top: 5px; }
.float-row-slider .time-lbl { color: rgba(255,255,255,0.45); font-size: 9px; }
.float-row-slider .time-lbl.active { color: #1dff88; }

/* Detail panel sits above the floating band */
#detail-panel {
  bottom: 0 !important;
  z-index: 500 !important;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/*  v0.6.6 — clean map, text layer buttons, more transparent controls      */
/* ═══════════════════════════════════════════════════════════════════════ */

/* Hide old sheet entirely */
.sheet { display: none !important; }
.legend { display: none !important; }

/* Layer buttons — text labels, black font, very light transparent */
.float-layer-btn {
  background: rgba(255,255,255,0.22) !important;
  border: 1px solid rgba(255,255,255,0.25) !important;
  color: #111111 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  font-family: var(--font-mono) !important;
  letter-spacing: 0.5px !important;
  padding: 4px 8px !important;
  border-radius: 10px !important;
}
.float-layer-btn.active {
  background: rgba(29,255,136,0.35) !important;
  color: #003a1a !important;
  border-color: rgba(29,255,136,0.7) !important;
  border-width: 1.5px !important;
  font-weight: 800 !important;
  letter-spacing: 0.8px !important;
}

/* Float layers container — lighter */
.float-layers {
  background: rgba(255,255,255,0.18) !important;
  border: 1px solid rgba(255,255,255,0.20) !important;
}

/* Float info button — lighter */
.float-info-btn {
  background: rgba(255,255,255,0.22) !important;
  border: 1px solid rgba(255,255,255,0.25) !important;
  color: #111111 !important;
  font-weight: 700 !important;
}

/* Condition pills — lighter */
.float-cond {
  background: rgba(255,255,255,0.20) !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
}
.float-cond-val {
  color: #111111 !important;
}
.float-cond.go   .float-cond-val { color: #006633 !important; }
.float-cond.warn .float-cond-val { color: #884400 !important; }
.float-cond.nogo .float-cond-val { color: #880000 !important; }
.float-cond-lbl {
  color: rgba(0,0,0,0.55) !important;
}

/* Condition pill borders stay coloured for status */
.float-cond.go   { border-color: rgba(29,180,90,0.55) !important; }
.float-cond.warn { border-color: rgba(200,140,0,0.55) !important; }
.float-cond.nogo { border-color: rgba(180,30,30,0.55) !important; }

/* Time slider strip — lighter */
.float-row-slider {
  background: rgba(255,255,255,0.22) !important;
  border: 1px solid rgba(255,255,255,0.20) !important;
}
.float-row-slider .time-lbl { color: rgba(0,0,0,0.45) !important; }
.float-row-slider .time-lbl.active { color: #005522 !important; }
.float-row-slider .time-slider {
  background: rgba(0,0,0,0.15) !important;
}
.float-row-slider .time-slider::-webkit-slider-thumb {
  background: #1d9e75 !important;
  box-shadow: 0 0 4px rgba(29,158,117,0.4) !important;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/*  v0.6.7 — glass brand pill, forecast label, photo slot, explore tab     */
/* ═══════════════════════════════════════════════════════════════════════ */

/* Brand pill — frosted glass, same as other controls */
.brand-pill-glass {
  background: rgba(255,255,255,0.22) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255,255,255,0.30) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12) !important;
}

/* Settings FAB — glass style */
.fab-glass {
  background: rgba(255,255,255,0.22) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255,255,255,0.28) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12) !important;
}

/* FORECAST label above time slider */
.forecast-label {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  color: #111111;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
  opacity: 0.6;
}

/* Time slider labels — black */
.float-row-slider .time-lbl {
  color: rgba(0,0,0,0.72) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 0 rgba(255,255,255,0.28);
}
.float-row-slider .time-lbl.active {
  color: #00361b !important;
  font-weight: 700 !important;
}

/* Detail panel — light frosted glass */
#detail-panel {
  background: rgba(255,255,255,0.92) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

/* Operator link with arrow */
.operator-link {
  font-size: 11px;
  color: #1d9e75;
  text-decoration: none;
  margin-left: 8px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border-bottom: 1px solid rgba(29,158,117,0.3);
  padding-bottom: 1px;
}
.operator-link:hover { border-bottom-color: #1d9e75; }
.op-arrow {
  font-size: 13px;
  font-weight: 700;
  color: #1d9e75;
}
.operator-plain {
  font-size: 12px;
  color: #555;
  margin-left: 6px;
}

/* ── Platform photo slot — three states: live / pending / none ── */
.platform-photo-slot {
  margin: 0;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  overflow: hidden;
  position: relative;
}

/* NONE — not contacted yet */
.platform-photo-slot.photo-none {
  background: linear-gradient(135deg, #eaf0ec 0%, #dce8e0 100%);
}

/* PENDING — approval letter sent */
.platform-photo-slot.photo-pending {
  background: linear-gradient(135deg, #faf8f3 0%, #f3ede0 100%);
}

/* LIVE — approved photo */
.platform-photo-slot.photo-live {
  height: 195px;
  background: #111a14;
}
.platform-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}
.platform-photo-slot.photo-live:hover .platform-photo-img {
  transform: scale(1.03);
}
.platform-photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 14px 13px;
  background: linear-gradient(to top, rgba(0,0,0,0.70) 0%, transparent 100%);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
}
.platform-photo-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.platform-photo-name {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  line-height: 1;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.platform-photo-op {
  color: rgba(255,255,255,0.65);
  font-size: 10px;
  font-family: var(--font);
}
.platform-photo-credit {
  color: rgba(255,255,255,0.42);
  font-size: 8.5px;
  font-style: italic;
  text-align: right;
  max-width: 120px;
  line-height: 1.3;
}

/* Shared inner wrapper (none + pending) */
.platform-photo-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 0 16px;
  color: #888;
}
.platform-photo-label {
  font-size: 11px;
  font-weight: 600;
  color: #555;
  text-align: center;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}
.platform-photo-sub {
  font-size: 9.5px;
  color: #999;
  font-style: italic;
  text-align: center;
}

/* Pending pulsing rings */
.photo-pend-rings {
  color: var(--amber);
  animation: photo-pulse 2.4s ease-in-out infinite;
  margin-bottom: 2px;
}
@keyframes photo-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.08); }
}

/* Status badge */
.platform-photo-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  margin-top: 1px;
}
.badge-pending {
  background: rgba(196,128,16,0.10);
  color: var(--amber);
  border: 1px solid rgba(196,128,16,0.28);
}

/* Explore teaser row at bottom of platform panel */
.explore-teaser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 16px 16px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #f0f7f3 0%, #e8f2ee 100%);
  border: 1px solid rgba(29,158,117,0.2);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.explore-teaser { display: none !important; }
.explore-teaser:active { background: #e0efea; }
.explore-teaser-title {
  font-size: 13px;
  font-weight: 600;
  color: #111;
  margin-bottom: 2px;
}
.explore-teaser-sub {
  font-size: 11px;
  color: #555;
}
.explore-teaser-arrow {
  font-size: 22px;
  color: #1d9e75;
  font-weight: 300;
}

/* Explore category accordion */
.explore-cat-block {
  border-bottom: 1px solid rgba(0,0,0,0.07);
}

.explore-cat-hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
}
.explore-cat-hdr:active { background: rgba(29,158,117,0.06); }

.explore-cat-icon { font-size: 20px; flex-shrink: 0; }

.explore-cat-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.explore-cat-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.2px;
}

.explore-cat-sub {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.explore-cat-chevron {
  font-size: 14px;
  color: var(--text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.explore-cat-items {
  display: none;
  flex-direction: column;
  padding: 0 0 8px;
}

.explore-cat-block.explore-cat-open .explore-cat-items {
  display: flex;
}

.explore-cat-block.explore-cat-open .explore-cat-chevron {
  transform: rotate(180deg);
}

body.dark .explore-cat-block { border-bottom-color: rgba(255,255,255,0.07); }
body.dark .explore-cat-title { color: #e8f0ec; }

/* Explore tab content */
.explore-section-hdr {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #444;
  text-transform: uppercase;
  padding: 14px 16px 4px;
}
.explore-note {
  font-size: 10px;
  color: #888;
  padding: 0 16px 8px;
  font-style: italic;
  line-height: 1.4;
}

/* Supplier cards */
.explore-supplier-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 16px 8px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.15s;
}
.explore-supplier-card:active { background: #f5f5f5; }
.explore-supplier-tag {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #1d9e75;
  font-family: var(--font-mono);
  margin-bottom: 3px;
}
.explore-supplier-name {
  font-size: 14px;
  font-weight: 600;
  color: #111;
  margin-bottom: 2px;
}
.explore-supplier-desc {
  font-size: 11px;
  color: #666;
}
.explore-supplier-arrow {
  font-size: 18px;
  color: #1d9e75;
  font-weight: 700;
  flex-shrink: 0;
  margin-left: 10px;
}

.explore-supplier-card.is-placeholder {
  border-style: dashed;
}

/* Safety bulletin rows */
.explore-bulletin-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  text-decoration: none;
}
.explore-bulletin-row:last-of-type { border-bottom: none; }
.explore-bulletin-icon { font-size: 18px; flex-shrink: 0; }
.explore-bulletin-name {
  flex: 1;
  font-size: 12px;
  font-weight: 500;
  color: #111;
}
.explore-bulletin-arrow {
  font-size: 14px;
  color: #1d9e75;
  font-weight: 700;
  flex-shrink: 0;
}

.explore-bulletin-desc {
  display: inline-block;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 400;
  color: #5f6b67;
  line-height: 1.4;
}

.panel-hub-stack {
  padding: 0 16px 16px;
}

.hub-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hub-entry-card {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  background: rgba(255,255,255,0.3);
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 12px;
  color: #111;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hub-entry-kicker {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: #1d9e75;
  font-family: var(--font-mono);
  margin-bottom: 5px;
}

.hub-entry-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.hub-entry-copy {
  font-size: 11px;
  line-height: 1.45;
  color: #4f5b57;
}

.abz-overview-intro {
  padding: 2px 16px 8px;
  font-size: 11px;
  line-height: 1.45;
  color: #34423d;
}

.abz-admin-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 16px 6px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.44);
  background: rgba(255, 204, 38, 0.28);
  box-shadow: 0 10px 26px rgba(0,0,0,0.08);
}

.abz-admin-card span,
.abz-admin-card a {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.abz-admin-card span {
  color: #6f5200;
}

.abz-admin-card strong {
  display: block;
  margin-top: 2px;
  color: #111;
  font-size: 14px;
  font-weight: 900;
}

.abz-admin-card small {
  display: block;
  margin-top: 2px;
  color: #4f4a36;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.32;
}

.abz-admin-card a {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 2px solid #111;
  border-radius: 8px;
  background: rgba(255,255,255,0.58);
  color: #111;
  text-decoration: none;
}

.transport-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 14px;
}

.transport-card {
  padding: 12px 13px;
  border-radius: 12px;
  background: rgba(255,255,255,0.28);
  border: 1px solid rgba(255,255,255,0.42);
  box-shadow: 0 10px 26px rgba(0,0,0,0.08);
}

.transport-card-label {
  font-size: 9px;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: #1d9e75;
  margin-bottom: 5px;
}

.transport-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #111;
  margin-bottom: 4px;
}

.transport-card-copy {
  font-size: 11px;
  line-height: 1.45;
  color: #4f5b57;
}

.transport-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.transport-link-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 10px;
  font-weight: 700;
  color: #0f2c25;
  background: rgba(255,255,255,0.52);
  border: 1px solid rgba(0,0,0,0.08);
}

.transport-link-chip.muted {
  color: #65716d;
}

.abz-terminal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.open-map-btn.ghost {
  background: rgba(255,255,255,0.28);
  color: #16342d;
}

.news-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px 0;
}

.news-filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.3);
  border: 1px solid rgba(255,255,255,0.48);
  font-size: 10px;
  font-weight: 700;
  color: #40504b;
}

.news-filter-chip.active {
  color: #0e2d26;
  background: rgba(29,158,117,0.18);
  border-color: rgba(29,158,117,0.34);
}

.news-card-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 16px 16px;
}

.news-card {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.3);
  border: 1px solid rgba(255,255,255,0.48);
  box-shadow: 0 10px 26px rgba(0,0,0,0.08);
}

.news-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.news-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(29,158,117,0.14);
  color: #1d9e75;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.news-date {
  font-size: 10px;
  color: #60716c;
}

.news-title {
  font-size: 14px;
  font-weight: 700;
  color: #111;
  margin-bottom: 6px;
}

.news-copy {
  font-size: 11px;
  line-height: 1.5;
  color: #495752;
}

.news-meta {
  margin-top: 8px;
  font-size: 10px;
  color: #6c7b76;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-family: var(--font-mono);
}

.news-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #16342d;
  text-decoration: none;
}

/* Global Energy Network live feed extras */
.news-source-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 16px 6px;
  padding: 10px 12px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(14, 24, 44, 0.62), rgba(37, 118, 126, 0.34)),
    rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: 0 10px 26px rgba(0,0,0,0.10);
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
}

.news-source-logo {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(29,158,117,0.14);
  color: #1d9e75;
}

.news-source-logo-img {
  display: block;
  width: min(190px, 58%);
  height: auto;
  flex-shrink: 0;
  opacity: 0.92;
  filter: drop-shadow(0 1px 5px rgba(0,0,0,0.18));
}

.news-source-label {
  font-size: 11px;
  color: rgba(255,255,255,0.82);
  font-weight: 600;
  line-height: 1.35;
}

.sources-thanks-card {
  margin: 0 16px 12px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(29,158,117,0.24);
  background: rgba(29,158,117,0.10);
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.45;
}

.news-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
}
.news-card-link:active { opacity: 0.92; }

.news-link-inline {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #16342d;
}

.news-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 4px;
  color: var(--text-muted);
  font-size: 12px;
}

.news-loading-spin {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(29,158,117,0.3);
  border-top-color: #1d9e75;
  border-radius: 50%;
  animation: rspin 0.7s linear infinite;
  flex-shrink: 0;
}

body.dark .news-title { color: #e8f0ec; }
body.dark .news-copy  { color: #a0b0a8; }
body.dark .news-link-inline { color: #4ee8a8; }

@media (max-width: 720px) {
  .hub-entry-grid,
  .transport-card-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/*  v0.6.8 — vertical brand, transparent panels, parking pins              */
/* ═══════════════════════════════════════════════════════════════════════ */

/* ── Vertical floating brand logo ──────────────────────────────────── */
.brand-vertical {
  position: absolute;
  top: calc(var(--safe-area-top) + 10px);
  left: 12px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  user-select: none;
}

.side-vertical-tab {
  position: absolute;
  top: calc(var(--safe-area-top) + 108px);
  left: -18px;
  z-index: 520;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 10px 8px 10px 20px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.34);
  border-left: none;
  border-radius: 0 16px 16px 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.14);
  color: #111;
  cursor: pointer;
}

.side-vertical-tab span {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0.6px;
  display: block;
  width: 100%;
  text-align: center;
}

.brand-vertical-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px;
}

.brand-vertical-text span {
  font-family: 'Orbitron', var(--font-mono), monospace;
  font-size: 11px;
  font-weight: 700;
  color: #111111;
  line-height: 1.3;
  letter-spacing: 0px;
  /* Readable over any map background */
  text-shadow:
    0 0 3px rgba(255,255,255,0.9),
    0 0 6px rgba(255,255,255,0.7),
    1px 1px 0 rgba(255,255,255,0.8),
    -1px -1px 0 rgba(255,255,255,0.8);
}

.brand-vertical-gap {
  display: block;
  height: 5px !important;
  line-height: 0 !important;
  font-size: 0 !important;
}

/* Load Orbitron from Google Fonts for brand */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@700&display=swap');

/* ── Topbar adjustment — brand pill is gone, search shifts left ─────── */
.topbar {
  padding-left: 52px !important; /* clear the vertical brand */
}

/* Hide old brand pill */
.brand-pill { display: none !important; }

/* ── Force ALL panels to frosted glass ─────────────────────────────── */
#detail-panel,
.modal-panel,
#settings-modal .modal-panel {
  background: rgba(255,255,255,0.88) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}

/* Detail panel handle bar */
.detail-handle {
  background: transparent !important;
}

/* Settings modal overlay — semi dark */
#settings-modal {
  background: rgba(0,0,0,0.35) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}

/* Terminals modal */
.modal {
  background: rgba(0,0,0,0.35) !important;
}
.modal-panel {
  background: rgba(255,255,255,0.90) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}

/* All text inside panels — black */
#detail-panel *,
.modal-panel * {
  color: #111111;
}
#detail-panel a,
.modal-panel a {
  color: #1d9e75;
}

/* ── Parking pins on map ─────────────────────────────────────────────── */
.parking-pin {
  width: 28px;
  height: 28px;
  background: #1d9e75;
  border-radius: 8px 8px 8px 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.45);
  cursor: pointer;
  transform: rotate(-45deg);
  transition: transform 0.15s;
}
.parking-pin:hover { transform: rotate(-45deg) scale(1.1); }
.parking-pin-warn { background: #e8820a; }

.parking-pin-p {
  font-size: 13px;
  font-weight: 900;
  color: white;
  font-family: Arial, sans-serif;
  transform: rotate(45deg); /* counter-rotate so P stays upright */
  line-height: 1;
}

/* ── FAB glass (settings button) ─────────────────────────────────────── */
#settings-btn.fab-glass,
.fab-glass {
  background: rgba(255,255,255,0.28) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255,255,255,0.35) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12) !important;
}

/* ─── v0.6.8 patch — fix touch passthrough closing panel ─────────── */
#detail-panel {
  background: rgba(255,255,255,0.90) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  /* Capture ALL touch/pointer events — prevent map underneath from receiving them */
  touch-action: pan-y !important;
  overscroll-behavior: contain !important;
}
#detail-panel.open {
  pointer-events: auto !important;
}

/* Modal panel same treatment */
.modal-panel {
  background: rgba(255,255,255,0.90) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  touch-action: pan-y !important;
  overscroll-behavior: contain !important;
}

/* Settings modal background */
#settings-modal.open {
  background: rgba(0,0,0,0.40) !important;
}

/* Ensure dark mode panels stay readable */
body.dark #detail-panel,
body.dark .modal-panel {
  background: rgba(13,26,15,0.92) !important;
}
body.dark #detail-panel *,
body.dark .modal-panel * {
  color: var(--text) !important;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/*  v0.6.9 — permanent layer column, transparent buttons, black brand      */
/* ═══════════════════════════════════════════════════════════════════════ */

/* ── Permanent layer column — right side, below zoom ────────────────── */
.layer-column {
  position: absolute;
  right: 12px;
  top: 260px; /* below zoom controls */
  z-index: 450;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.layer-col-btn {
  display: block;
  background: rgba(255,255,255,0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 8px;
  padding: 7px 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: #111111;
  letter-spacing: 0.5px;
  cursor: pointer;
  width: 48px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  transition: all 0.15s;
}
.layer-col-btn:active { transform: scale(0.95); }
.layer-col-btn.active {
  background: rgba(15,110,86,0.28) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border: 2px solid rgba(15,110,86,0.85) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 12px rgba(15,110,86,0.35) !important;
}

.layer-col-btn-hub {
  width: 62px;
  margin-top: 6px;
  background: rgba(255,255,255,0.34);
}

/* ── Brand vertical — pure black, NO white glow ──────────────────────── */
.brand-vertical-text span {
  color: #000000 !important;
  text-shadow:
    1px 1px 0 rgba(255,255,255,0.6),
    -1px -1px 0 rgba(255,255,255,0.6),
    1px -1px 0 rgba(255,255,255,0.6),
    -1px 1px 0 rgba(255,255,255,0.6) !important;
  /* Thin white outline — not a glow, just legibility */
}

/* ── Settings FAB — fully transparent glass ──────────────────────────── */
#settings-btn,
.fab {
  background: rgba(255,255,255,0.28) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255,255,255,0.35) !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12) !important;
  color: #111111 !important;
}
#settings-btn svg,
.fab svg {
  stroke: #111111 !important;
}

/* ── Zoom controls — transparent glass ───────────────────────────────── */
.leaflet-control-zoom {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
.leaflet-control-zoom a {
  background: rgba(255,255,255,0.28) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255,255,255,0.35) !important;
  color: #111111 !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12) !important;
  margin-bottom: 3px !important;
  border-radius: 8px !important;
}
.leaflet-control-zoom a:hover {
  background: rgba(255,255,255,0.45) !important;
}

/* ── Fullscreen button — transparent glass ───────────────────────────── */
#fullscreen-btn {
  background: rgba(255,255,255,0.28) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255,255,255,0.35) !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12) !important;
  color: #111111 !important;
}
#fullscreen-btn svg { stroke: #111111 !important; }

/* ── Info button wider now layer buttons are gone from band ──────────── */
.float-info-btn-wide {
  max-width: 100% !important;
  width: 100% !important;
}

/* ── Weather band top row — single info button ───────────────────────── */
.float-row-top {
  justify-content: flex-start !important;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/*  v0.6.10 — time slider visibility, panel transparency, autofill         */
/* ═══════════════════════════════════════════════════════════════════════ */

/* Time slider labels — same bold green style as conditions */
.time-lbl {
  font-family: var(--font-mono) !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  color: rgba(0,0,0,0.65) !important;
}
.time-lbl.active {
  color: #004422 !important;
  font-weight: 800 !important;
  font-size: 11px !important;
}

/* Force transparent on detail panel — nuclear override */
#detail-panel {
  background: rgba(240,248,242,0.88) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
}

/* City item in search dropdown */
.dd-city {
  background: rgba(29,158,117,0.08) !important;
  border-left: 3px solid #1d9e75 !important;
  font-weight: 600 !important;
}

/* Conditions band — more visible numbers */
.float-cond-val {
  font-size: 14px !important;
  font-weight: 800 !important;
}

/* Info button — full width, clearly visible */
.float-info-btn {
  text-align: center !important;
  font-size: 12px !important;
  letter-spacing: 0.5px !important;
  padding: 8px 16px !important;
}

/* Hide Android autofill suggestions via CSS hint */
input[autocomplete="off"] {
  -webkit-text-fill-color: inherit;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/*  v0.6.11 — real transparency, time slider fix                           */
/* ═══════════════════════════════════════════════════════════════════════ */

/* NUCLEAR: Force ALL panel backgrounds truly transparent */
#detail-panel,
#detail-panel.open {
  background: rgba(220,240,228,0.62) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
}

.modal-panel {
  background: rgba(220,240,228,0.62) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
}

/* All white child elements inside panel — make transparent */
#detail-panel .flight-card.airborne { background: rgba(29,158,117,0.15) !important; }
#detail-panel .flight-card.delayed  { background: rgba(196,128,16,0.12) !important; }
#detail-panel .flight-card.scheduled{ background: rgba(255,255,255,0.25) !important; }
#detail-panel .explore-supplier-card{ background: rgba(255,255,255,0.35) !important; }
#detail-panel .platform-photo-slot:not(.photo-live)  { background: rgba(29,158,117,0.12) !important; }
#detail-panel .airport-summary      { background: rgba(255,255,255,0.25) !important; }
#detail-panel .sec-hdr              { background: transparent !important; }
#detail-panel .explore-teaser       { background: rgba(29,158,117,0.15) !important; }

/* Time slider — same size and colour as condition digits */
.time-lbl {
  font-family: var(--font-mono) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #111111 !important;
  letter-spacing: 0 !important;
}
.time-lbl.active {
  font-size: 13px !important;
  font-weight: 900 !important;
  color: #004d26 !important;
}

/* Conditions digits — match exactly */
.float-cond-val {
  font-size: 14px !important;
  font-weight: 800 !important;
  color: #111111 !important;
}
.float-cond.go   .float-cond-val { color: #005522 !important; }
.float-cond.warn .float-cond-val { color: #7a4400 !important; }
.float-cond.nogo .float-cond-val { color: #7a0000 !important; }

/* FORECAST label */
.forecast-label {
  font-size: 9px !important;
  color: #111111 !important;
  font-weight: 800 !important;
  letter-spacing: 2px !important;
  margin-bottom: 3px !important;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/*  v0.6.12 — transparent panels, version fix                              */
/* ═══════════════════════════════════════════════════════════════════════ */

/* FINAL nuclear panel transparency */
#detail-panel,
#detail-panel.open,
.modal-panel {
  background: rgba(210,235,218,0.42) !important;
  backdrop-filter: blur(30px) !important;
  -webkit-backdrop-filter: blur(30px) !important;
}

/* Every white child inside panel — make transparent */
#detail-panel .sec-hdr,
#detail-panel .detail-body,
#detail-panel .detail-handle {
  background: transparent !important;
}

/* Explore drawer uses a true side-sheet layout instead of bottom-sheet cues */
#detail-panel.explore-side {
  top: calc(var(--safe-area-top) + 142px) !important;
  bottom: auto !important;
  left: 0 !important;
  right: auto !important;
  width: min(220px, 56vw) !important;
  max-height: calc(100vh - 172px) !important;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 18px !important;
  border-bottom-right-radius: 18px !important;
  border-bottom-left-radius: 0 !important;
  border: 1px solid rgba(255,255,255,0.26) !important;
  border-left: none !important;
  background: rgba(220, 240, 232, 0.48) !important;
  box-shadow: 10px 0 28px rgba(0,0,0,0.14) !important;
  transform: translateX(calc(-100% - 24px)) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-backdrop-filter: blur(22px) saturate(1.3) !important;
  backdrop-filter: blur(22px) saturate(1.3) !important;
}

#detail-panel.explore-side.open {
  transform: translateX(0) !important;
}

#detail-panel.explore-side .detail-handle {
  align-items: flex-start !important;
  gap: 0 !important;
  padding: 10px 14px 8px 16px !important;
  border-bottom: 1px solid rgba(0,0,0,0.08) !important;
}

#detail-panel.explore-side .detail-handle-bar {
  display: none !important;
}

#detail-panel.explore-side .detail-title {
  justify-content: flex-start !important;
  text-align: left !important;
  font-size: 14px !important;
}

#detail-panel.explore-side .detail-body {
  padding-bottom: calc(18px + var(--safe-area-bottom)) !important;
}

body.dark #detail-panel.explore-side {
  background: rgba(14, 24, 20, 0.55) !important;
  border-color: rgba(255,255,255,0.12) !important;
  box-shadow: 12px 0 32px rgba(0,0,0,0.38) !important;
}

body.dark #detail-panel.explore-side .detail-handle {
  border-bottom-color: rgba(255,255,255,0.08) !important;
}

#detail-panel .flight-card {
  background: rgba(255,255,255,0.30) !important;
  border-color: rgba(0,0,0,0.10) !important;
}
#detail-panel .flight-card.airborne {
  background: rgba(29,158,117,0.18) !important;
  border-color: rgba(29,158,117,0.30) !important;
}
#detail-panel .flight-card.delayed {
  background: rgba(196,128,16,0.15) !important;
}
#detail-panel .airport-summary {
  background: rgba(255,255,255,0.18) !important;
}
#detail-panel .explore-teaser {
  background: rgba(29,158,117,0.10) !important;
}
#detail-panel .explore-supplier-card {
  background: rgba(255,255,255,0.20) !important;
}
#detail-panel .platform-photo-slot:not(.photo-live) {
  background: rgba(29,158,117,0.08) !important;
}
#detail-panel .op-tile {
  background: rgba(255,255,255,0.18) !important;
}
#detail-panel .tips-list {
  background: transparent !important;
}
#detail-panel .progress-bar {
  background: rgba(0,0,0,0.10) !important;
}
#detail-panel .notify-btn {
  background: rgba(255,255,255,0.35) !important;
  border: 1px solid rgba(0,0,0,0.12) !important;
}

/* Version badge — more visible */
.version-badge {
  position: absolute;
  bottom: calc(8px + var(--safe-area-bottom));
  left: 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(255,255,255,0.7);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  z-index: 300;
  pointer-events: none;
  letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/*  v0.6.13 — feed badge, disclaimer, panel fixes                          */
/* ═══════════════════════════════════════════════════════════════════════ */

/* feed badge instead of LIVE */
\.feed-badge {
  background: rgba(196,128,16,0.15) !important;
  border: 1px solid rgba(196,128,16,0.4) !important;
  color: #7a4400 !important;
}
.pulse-amber {
  background: #c48010 !important;
  animation: pulse-dot 1.5s ease-in-out infinite !important;
}

/* Weather disclaimer */
.weather-disclaimer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 6px;
  align-items: center;
  min-height: 24px;
  padding: 2px 0;
  font-size: 9px;
  color: rgba(0,0,0,0.50);
  font-family: var(--font-mono);
  letter-spacing: 0.15px;
  text-align: left;
  margin-left: 0;
  line-height: 1.08;
  min-width: 0;
}

.weather-disclaimer-line {
  display: block;
  grid-column: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.weather-disclaimer-line:first-child {
  color: rgba(0,0,0,0.54);
}

.weather-disclaimer-line:nth-child(2) {
  font-size: 9px;
  color: rgba(0,0,0,0.62);
}

.weather-disclaimer .wx-source {
  grid-column: 2;
  grid-row: 1 / span 2;
  margin-left: 0;
  padding: 1px 5px;
  font-size: 9px;
  border-radius: 5px;
}

/* Detail panel — CSS pointer-events ensures no touch passthrough */
#detail-panel {
  pointer-events: auto !important;
  isolation: isolate;
}
#detail-panel * {
  pointer-events: auto;
}

/* Make panel scrollable without triggering map */
#detail-panel {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  touch-action: pan-y !important;
}


/* ═══════════════════════════════════════════════════════════════════════ */
/*  v0.6.13.1 — panel close bug finally fixed properly                     */
/* ═══════════════════════════════════════════════════════════════════════ */

/* Weather band: let empty gaps pass through to map, but controls work */
#weather-band {
  pointer-events: auto !important;
  cursor: pointer !important;
  user-select: none;
}
#weather-band > * {
  pointer-events: auto !important;
}

/* Detail panel: completely isolated from map */
#detail-panel {
  pointer-events: auto !important;
  z-index: 550 !important;
  isolation: isolate;
}

/* Version badge — always visible, readable */
.version-badge {
  position: absolute !important;
  bottom: calc(3px + var(--safe-area-bottom)) !important;   /* on the attribution line, clear of the right NEWS tab */
  right: 150px !important;                                   /* tucked just LEFT of the Leaflet/Esri flag */
  left: auto !important;
  font-family: var(--font-mono) !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  color: rgba(255,255,255,0.78) !important;
  text-shadow: 0 0 4px rgba(0,0,0,0.8), 0 1px 2px rgba(0,0,0,0.9) !important;
  z-index: 600 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  letter-spacing: 0.5px !important;
  background: rgba(0,0,0,0.28);
  padding: 2px 7px;
  border-radius: 9px;
  backdrop-filter: blur(6px);
  user-select: none;
  opacity: 0.85;
}

/* LOG IN chip — bottom-left, always reachable (esp. for installed users who never see the
   landing page). Reflects auth state: "LOG IN" → name + FREE → HAVE IT ALL. */
.login-chip {
  position: absolute;
  bottom: calc(16px + var(--safe-area-bottom));
  left: 16px;
  z-index: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #111111;
  background: #ffcf23;
  border: 2px solid #111111;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  user-select: none;
}
.login-chip.signed-in {
  color: #eaf3f0;
  background: rgba(0,0,0,0.42);
  border-color: rgba(255,255,255,0.25);
  backdrop-filter: blur(6px);
  text-transform: none;
}
.login-chip.is-member {
  color: #ffcf23;
  border-color: rgba(255,207,35,0.55);
}
.login-chip-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #46d07d; flex-shrink: 0;
}
.login-chip-dot.member { background: #ffcf23; }
body.detail-panel-open .login-chip { opacity: 0; pointer-events: none; }

/* Dedicated login panel (separate from the Have it all offer) — free/sync framing. */
.login-panel { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 18px 14px 8px; }
.login-panel-title { font-family: var(--font-mono); font-weight: 900; font-size: 22px; color: var(--text, #111); }
.login-panel-desc { font-size: 14px; line-height: 1.55; color: var(--text-muted, #555); max-width: 22rem; }
.login-panel-fine { font-size: 12px; color: var(--text-muted, #777); max-width: 22rem; }
.login-panel-secondary { margin-top: 4px; background: none; border: none; color: var(--text-muted, #666); font-size: 12px; font-weight: 700; cursor: pointer; text-decoration: underline; }

.version-badge:focus-visible {
  outline: 2px solid rgba(29,158,117,0.68);
  outline-offset: 3px;
}

@media (min-width: 769px) {
  .leaflet-top.leaflet-right {
    right: 16px !important;
    margin-top: 238px !important;
  }

  .leaflet-top.leaflet-right .leaflet-control-zoom {
    width: 32px !important;
    margin: 0 !important;
  }

  .leaflet-top.leaflet-right .leaflet-control-zoom a {
    width: 32px !important;
    height: 32px !important;
    line-height: 30px !important;
    margin: 0 0 8px 0 !important;
    box-sizing: border-box !important;
    border-radius: 8px !important;
    font-size: 18px !important;
  }
}

@media (max-width: 768px) {
  body.weather-band-visible .version-badge {
    bottom: calc(3px + var(--safe-area-bottom)) !important;
    right: 150px !important;
    left: auto !important;
    opacity: 0.82;
  }
  body.weather-band-visible .login-chip {
    bottom: calc(12px + var(--safe-area-bottom));
    opacity: 0.95;
  }

  body.detail-panel-open .version-badge {
    opacity: 0;
    pointer-events: none !important;
  }
}

/* v0.6.15 visual polish */
.brand-vertical {
  top: calc(var(--safe-area-top) + 12px);
  left: 12px;
  align-items: center;
}

.brand-vertical svg {
  display: block !important;
  width: 26px;
  height: 26px;
  margin-bottom: 3px !important;
  filter: none !important;
}

.brand-vertical svg * {
  opacity: 1 !important;
}

.brand-chopper-svg {
  overflow: visible;
  display: block;
}

.brand-chopper-rotor {
  transform-origin: 16px 16px;
  animation: spin-rotor 0.95s linear infinite;
}

.brand-chopper-tail-rotor {
  transform-origin: 16px 3.8px;
  animation: spin-rotor 0.45s linear infinite;
}

.brand-vertical-text {
  align-items: center;
}

.brand-vertical-text span {
  font-family: var(--font), sans-serif !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #111111 !important;
  text-shadow: none !important;
  letter-spacing: 0.3px !important;
}

.topbar {
  padding-left: 42px !important;
}

.topbar-right-stack {
  flex-direction: column !important;
  gap: 4px !important;
  align-items: center;
}

.theme-btn,
#fullscreen-btn,
#theme-btn,
#settings-btn {
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  background: rgba(255,255,255,0.18) !important;
  border: 1px solid rgba(255,255,255,0.26) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.10) !important;
  color: #111111 !important;
}

#settings-btn {
  position: static !important;
  inset: auto !important;
  margin: 0 !important;
}

#settings-btn svg,
#fullscreen-btn svg,
#theme-btn svg {
  stroke: #111111 !important;
}

#detail-panel,
#detail-panel.open,
.modal-panel {
  background: rgba(234,240,236,0.28) !important;
  backdrop-filter: blur(26px) !important;
  -webkit-backdrop-filter: blur(26px) !important;
}

#detail-panel .flight-card {
  background: rgba(255,255,255,0.16) !important;
  border-color: rgba(0,0,0,0.10) !important;
}

#detail-panel .flight-card.airborne {
  background: rgba(255,255,255,0.12) !important;
  border-color: rgba(29,158,117,0.20) !important;
}

#detail-panel .flight-card.delayed {
  background: rgba(255,244,224,0.16) !important;
}

#detail-panel .flight-card.scheduled {
  background: rgba(255,255,255,0.12) !important;
}

#detail-panel .platform-photo-slot:not(.photo-live),
#detail-panel .explore-teaser,
#detail-panel .op-tile,
#detail-panel .airport-summary,
#detail-panel .explore-supplier-card,
.airport-note-strip,
.parking-card.compact,
.abz-terminal-card {
  background: rgba(255,255,255,0.14) !important;
  border-color: rgba(0,0,0,0.08) !important;
}

.explore-teaser:active,
.op-tile:hover,
.parking-card.compact:hover {
  background: rgba(255,255,255,0.20) !important;
}

/* Map fallback tone so tile loading does not flash white while panning */
#map,
#map .leaflet-container,
#map .leaflet-pane,
#map .leaflet-tile-pane {
  background: #2b7186 !important;
}

body.dark #map,
body.dark #map .leaflet-container,
body.dark #map .leaflet-pane,
body.dark #map .leaflet-tile-pane {
  background: #0d0e11 !important;
}

/* ── Dark cockpit: charcoal frames, green letters only ── */
body.dark .side-vertical-tab {
  background: rgba(14,15,18,0.85) !important;
  border-color: rgba(255,255,255,0.11) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.50) !important;
}
body.dark .side-vertical-tab span {
  color: var(--green) !important;
}
body.dark .side-vertical-tab:hover {
  background: rgba(20,22,26,0.92) !important;
  border-color: rgba(255,255,255,0.18) !important;
}
body.dark .layer-col-btn,
body.dark .layer-drawer-btn {
  background: rgba(20,22,26,0.88) !important;
  border-color: rgba(255,255,255,0.11) !important;
  color: var(--green) !important;
  font-weight: 600 !important;
}
body.dark .layer-col-btn.active,
body.dark .layer-drawer-btn.active {
  background: rgba(29,255,136,0.18) !important;
  border-color: rgba(29,255,136,0.70) !important;
  color: rgba(29,255,136,0.95) !important;
  font-weight: 800 !important;
  box-shadow: inset 0 0 0 1px rgba(29,255,136,0.35) !important;
}
body.dark .detail-title,
body.dark .side-drawer-note {
  color: var(--text-dim) !important;
}
/* Brand letters — soft green in dark mode */
body.dark .brand-vertical-text span {
  color: rgba(29,255,136,0.52) !important;
  text-shadow: none !important;
}
/* Rotor blades — visible green in dark mode */
body.dark .brand-chopper-rotor rect,
body.dark .brand-chopper-rotor circle {
  fill: rgba(29,255,136,0.55) !important;
}
body.dark .brand-chopper-tail-rotor rect {
  fill: rgba(29,255,136,0.45) !important;
}
/* Topbar icon buttons — grey stroke in dark mode */
body.dark .theme-btn {
  background: rgba(20,22,26,0.80) !important;
  border-color: rgba(255,255,255,0.11) !important;
  color: rgba(255,255,255,0.55) !important;
}
body.dark .theme-btn svg { stroke: rgba(255,255,255,0.55) !important; }

.topbar .topbar-right-stack .landing-btn {
  width: auto !important;
  min-width: 82px !important;
  height: 34px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  background: #ffcf23 !important;
  border-color: #111111 !important;
  color: #111111 !important;
}

.topbar .topbar-right-stack .landing-btn svg {
  stroke: #111111 !important;
  flex: 0 0 auto;
}

.topbar .topbar-right-stack .landing-btn span {
  display: inline-block;
}

.cloud-account-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 0 0 12px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(17,17,17,0.10);
  color: #111111;
}

[data-zone-section="setup"] .cloud-account-card {
  margin: 0 16px 12px;
}

.cloud-account-card.cloud-signed-in {
  border-color: rgba(29,158,117,0.38);
  background: rgba(29,158,117,0.15);
}

.cloud-account-copy span,
.cloud-account-copy small {
  display: block;
  color: #111111;
  font-size: 10px;
  font-weight: 800;
}

.cloud-account-copy strong {
  display: block;
  margin: 2px 0;
  color: #111111;
  font-size: 14px;
  font-weight: 900;
}

.cloud-account-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.cloud-account-actions-account {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cloud-account-actions input {
  flex: 1 1 180px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid rgba(17,17,17,0.18);
  background: rgba(255,255,255,0.30);
  color: #111111;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 800;
}

.cloud-account-actions button {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 7px;
  border: 2px solid #111111;
  background: transparent;
  color: #111111;
  -webkit-appearance: none;
  appearance: none;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.cloud-account-actions button:first-of-type,
.cloud-account-actions button#cloud-sign-in {
  background: #ffcf23;
  color: #111111;
}

.cloud-account-actions button#cloud-refresh-app {
  border-color: rgba(17,17,17,0.62);
}

/* Float condition labels — soft green in dark */
body.dark .float-cond-lbl { color: rgba(29,255,136,0.55) !important; }
body.dark .float-cond-val { color: var(--text) !important; }
/* All dark-mode tab/button letters — toned-down green, not blinding */
body.dark .side-vertical-tab span,
body.dark .side-vertical-tab-right span,
body.dark .side-vertical-explore span,
body.dark .side-vertical-tab > span {
  color: rgba(29,255,136,0.52) !important;
}
body.dark .layer-col-btn,
body.dark .layer-drawer-btn {
  color: rgba(29,255,136,0.55) !important;
}
body.dark .layer-col-btn.active,
body.dark .layer-drawer-btn.active {
  color: rgba(29,255,136,0.95) !important;
  box-shadow: 0 0 10px rgba(29,255,136,0.25) !important;
}
body.dark .search-pill input {
  color: rgba(29,255,136,0.65) !important;
}
body.dark .search-pill input::placeholder {
  color: rgba(29,255,136,0.28) !important;
}
/* Search bar — grey border in dark mode, not vivid green */
body.dark .search-pill {
  border-color: rgba(255,255,255,0.14) !important;
  background: rgba(14,15,18,0.88) !important;
}
body.dark .search-pill input {
  color: var(--green) !important;
}
body.dark .search-pill input::placeholder {
  color: rgba(29,255,136,0.38) !important;
}

/* Weather readability pass + slightly larger, lower Explore tab */
.side-vertical-tab {
  top: calc(var(--safe-area-top) + 148px) !important;
  left: -16px !important;
  gap: 2px !important;
  padding: 14px 8px 14px 18px !important;
  border-radius: 0 18px 18px 0 !important;
}

.side-vertical-tab span {
  font-size: 10px !important;
  letter-spacing: 0.8px !important;
}

.float-cond {
  position: relative;
  min-height: 72px;
  padding: 12px 8px 10px !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
  background: rgba(255,255,255,0.16) !important;
  overflow: hidden;
}

.float-cond::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(0,0,0,0.16);
}

.float-cond.go::before {
  background: rgba(29,158,117,0.88);
}

.float-cond.warn::before {
  background: rgba(196,128,16,0.9);
}

.float-cond.nogo::before {
  background: rgba(200,50,58,0.9);
}

.float-cond-val {
  color: #111111 !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  text-shadow: none !important;
}

.float-cond.go .float-cond-val,
.float-cond.warn .float-cond-val,
.float-cond.nogo .float-cond-val {
  color: #111111 !important;
}

.float-cond-lbl {
  margin-top: 5px !important;
  color: rgba(0,0,0,0.82) !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  letter-spacing: 0.95px !important;
  text-shadow: none !important;
}

.forecast-label {
  font-size: 10px !important;
  font-weight: 800 !important;
  color: rgba(17,17,17,0.92) !important;
  letter-spacing: 1.7px !important;
  opacity: 1 !important;
}

.float-row-slider {
  background: rgba(255,255,255,0.16) !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
}

.float-row-slider .time-lbl {
  color: rgba(17,17,17,0.76) !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

.float-row-slider .time-lbl.active {
  color: #111111 !important;
}

body.dark .float-cond {
  background: rgba(17,25,21,0.54) !important;
  border-color: rgba(255,255,255,0.14) !important;
}

body.dark .float-cond-val,
body.dark .float-cond.go .float-cond-val,
body.dark .float-cond.warn .float-cond-val,
body.dark .float-cond.nogo .float-cond-val {
  color: #f3f7f4 !important;
}

body.dark .float-cond-lbl {
  color: rgba(243,247,244,0.84) !important;
}

body.dark .forecast-label,
body.dark .float-row-slider .time-lbl,
body.dark .float-row-slider .time-lbl.active {
  color: #f3f7f4 !important;
}

body.dark .float-row-slider {
  background: rgba(17,25,21,0.54) !important;
  border-color: rgba(255,255,255,0.14) !important;
}

.float-info-btn,
.float-cond,
.float-row-slider {
  background: rgba(255,255,255,0.08) !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}

.float-info-btn {
  color: #111111 !important;
}

.float-info-btn:active {
  background: rgba(255,255,255,0.18) !important;
}

.float-cond {
  border-color: rgba(255,255,255,0.20) !important;
}

.float-cond-lbl {
  color: rgba(0,0,0,0.58) !important;
}

.operator-link,
#detail-panel a.operator-link,
.modal-panel a.operator-link {
  color: #111111 !important;
  border-bottom-color: rgba(17,17,17,0.28) !important;
}

.operator-link:hover {
  border-bottom-color: #111111 !important;
}

.version-badge { display: block !important; }

.abz-airfield-card {
  min-height: 304px;
  background: rgba(255,255,255,0.10) !important;
  border: 1px solid rgba(255,255,255,0.22) !important;
}

.abz-airfield {
  position: relative;
  height: min(44vw, 420px) !important;
  min-height: 304px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(236,238,233,0.22) !important;
}

.abz-airfield-stage {
  position: relative;
  height: calc(100% - 14px);
  aspect-ratio: 663 / 805;
  max-width: min(100%, 346px);
  max-height: 100%;
  margin: 7px auto;
}

.abz-airfield-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill;
  object-position: center center;
  border-radius: 10px;
}

.abz-runway {
  display: none !important;
}

.abz-map-base {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 10px;
  background:
    radial-gradient(circle at 18% 16%, rgba(119, 161, 111, 0.30), transparent 22%),
    radial-gradient(circle at 78% 82%, rgba(118, 155, 102, 0.24), transparent 25%),
    linear-gradient(180deg, #e5ebe2 0%, #dfe7db 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.55);
}

.abz-map-green,
.abz-map-district,
.abz-map-road,
.abz-map-runway,
.abz-map-terminal-label,
.abz-map-reference {
  position: absolute;
}

.abz-map-green {
  background: rgba(123, 159, 109, 0.28);
  border-radius: 999px;
  filter: blur(1px);
}

.abz-map-green-1 {
  width: 36%;
  height: 18%;
  left: -6%;
  top: 4%;
  transform: rotate(-12deg);
}

.abz-map-green-2 {
  width: 28%;
  height: 16%;
  right: -4%;
  top: 8%;
  transform: rotate(16deg);
}

.abz-map-green-3 {
  width: 42%;
  height: 18%;
  left: 22%;
  bottom: -1%;
  transform: rotate(-8deg);
}

.abz-map-district {
  background: rgba(202, 208, 200, 0.92);
  border: 1px solid rgba(169, 177, 167, 0.45);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35);
}

.abz-map-district-west {
  left: 6%;
  top: 23%;
  width: 27%;
  height: 34%;
  clip-path: polygon(8% 5%, 80% 0, 100% 18%, 93% 84%, 18% 100%, 0 72%);
}

.abz-map-district-east {
  right: 5%;
  top: 12%;
  width: 31%;
  height: 40%;
  clip-path: polygon(12% 0, 100% 10%, 94% 100%, 0 86%, 6% 30%);
}

.abz-map-district-south {
  left: 34%;
  bottom: 7%;
  width: 33%;
  height: 20%;
  clip-path: polygon(8% 0, 100% 8%, 88% 100%, 0 86%);
}

.abz-map-road {
  height: 8px;
  background: rgba(188, 191, 186, 0.98);
  box-shadow: 0 0 0 2px rgba(245,247,242,0.75);
  border-radius: 999px;
}

.abz-map-road-main {
  width: 88%;
  left: 2%;
  top: 69%;
  transform: rotate(-38deg);
}

.abz-map-road-upper {
  width: 48%;
  left: 41%;
  top: 27%;
  transform: rotate(41deg);
}

.abz-map-road-lower {
  width: 52%;
  left: -6%;
  top: 57%;
  transform: rotate(33deg);
}

.abz-map-runway {
  background: linear-gradient(180deg, #8e948d 0%, #7b817b 100%);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.16);
}

.abz-map-runway-main {
  width: 9%;
  height: 71%;
  left: 46%;
  top: 10%;
  transform: rotate(28deg);
}

.abz-map-runway-cross {
  width: 7%;
  height: 44%;
  left: 39%;
  top: 28%;
  transform: rotate(-31deg);
}

.abz-map-terminal-label {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(0,0,0,0.08);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: #24312c;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  white-space: nowrap;
}

.abz-map-terminal-label-bristow {
  left: 4%;
  top: 35%;
}

.abz-map-terminal-label-chc {
  left: 4%;
  top: 66%;
}

.abz-map-terminal-label-nhv {
  right: 2%;
  top: 18%;
}

.abz-map-terminal-label-ohs {
  left: 7%;
  top: 52%;
}

.abz-map-reference {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: rgba(36,49,44,0.72);
}

.abz-map-reference-airport {
  left: 48%;
  top: 43%;
  transform: translateX(-50%);
}

.abz-map-reference-dyce {
  right: 8%;
  bottom: 12%;
}

.abz-spot {
  position: absolute;
  gap: 6px;
  width: 14px;
  height: 14px;
  padding: 0;
  border: none;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.abz-spot-name {
  display: none !important;
}

.abz-spot-bristow {
  left: 18%;
  top: 39%;
}

.abz-spot-chc {
  left: 16%;
  top: 70%;
}
.abz-spot-chc .abz-spot-dot { background: #9b3ad4; }

.abz-spot-nhv {
  left: 83%;
  top: 23%;
}

.abz-spot-ohs {
  left: 21%;
  top: 56%;
}

.abz-spot-dot {
  width: 12px;
  height: 12px;
  border-width: 1.5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.abz-spot.active .abz-spot-dot,
.abz-spot:hover .abz-spot-dot {
  transform: scale(1.18);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.55), 0 3px 12px rgba(0,0,0,0.38);
}

.abz-guide-tip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 0 4px;
}

.abz-guide-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  color: #111111;
  font-size: 11px;
  font-weight: 700;
  padding: 7px 10px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.abz-guide-link-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.75);
}

.abz-guide-link-bristow { color: #1d9e75; }
.abz-guide-link-nhv { color: #d4773a; }
.abz-guide-link-ohs { color: #3a7ad4; }

.abz-guide-link.active,
.abz-guide-link:hover {
  background: rgba(255,255,255,0.28);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  transform: translateY(-1px);
}

/* Final UI readability lock-in */
.side-vertical-tab {
  top: calc(var(--safe-area-top) + 134px) !important;
  left: -16px !important;
  gap: 2px !important;
  padding: 14px 8px 14px 18px !important;
  border-radius: 0 18px 18px 0 !important;
}

.side-vertical-tab span {
  font-size: 10px !important;
  letter-spacing: 0.8px !important;
}

.float-cond {
  position: relative !important;
  min-height: 72px !important;
  padding: 12px 8px 10px !important;
  background: rgba(255,255,255,0.16) !important;
  border: 1px solid rgba(255,255,255,0.22) !important;
  overflow: hidden !important;
}

.float-cond::before { display: none !important; }

.float-cond.go   { background: rgba(29,158,117,0.28) !important; border-color: rgba(29,158,117,0.45) !important; }
.float-cond.warn { background: rgba(196,128,16,0.28) !important; border-color: rgba(196,128,16,0.45) !important; }
.float-cond.nogo { background: rgba(200,50,58,0.28) !important;  border-color: rgba(200,50,58,0.45) !important; }

.float-cond-val,
.float-cond.go .float-cond-val,
.float-cond.warn .float-cond-val,
.float-cond.nogo .float-cond-val {
  color: #111111 !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  text-shadow: none !important;
}

.float-cond-lbl {
  margin-top: 5px !important;
  color: rgba(0,0,0,0.82) !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  letter-spacing: 0.95px !important;
  text-shadow: none !important;
}

.forecast-label {
  font-size: 10px !important;
  font-weight: 800 !important;
  color: rgba(17,17,17,0.92) !important;
  letter-spacing: 1.7px !important;
  opacity: 1 !important;
}

.float-row-slider .time-lbl {
  color: rgba(17,17,17,0.76) !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

.float-row-slider .time-lbl.active {
  color: #111111 !important;
}

body.dark .float-cond {
  background: rgba(17,25,21,0.54) !important;
  border-color: rgba(255,255,255,0.14) !important;
}

body.dark .float-cond          { background: rgba(17,25,21,0.54) !important;   border-color: rgba(255,255,255,0.14) !important; }
body.dark .float-cond.go        { background: rgba(29,158,117,0.30) !important; border-color: rgba(29,158,117,0.50) !important; }
body.dark .float-cond.warn      { background: rgba(196,128,16,0.30) !important; border-color: rgba(196,128,16,0.50) !important; }
body.dark .float-cond.nogo      { background: rgba(200,50,58,0.30) !important;  border-color: rgba(200,50,58,0.50) !important; }

body.dark .float-cond-val,
body.dark .float-cond.go .float-cond-val,
body.dark .float-cond.warn .float-cond-val,
body.dark .float-cond.nogo .float-cond-val,
body.dark .float-cond-lbl,
body.dark .forecast-label,
body.dark .float-row-slider .time-lbl,
body.dark .float-row-slider .time-lbl.active {
  color: #f3f7f4 !important;
}

.side-tab-stack-right {
  position: absolute;
  top: calc(var(--safe-area-top) + 190px);
  right: -16px;
  z-index: 520;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.side-vertical-tab-right {
  position: relative !important;
  left: auto !important;
  right: 0 !important;
  padding: 10px 20px 10px 8px !important;
  border-left: 1px solid rgba(255,255,255,0.34) !important;
  border-right: none !important;
  border-radius: 18px 0 0 18px !important;
  box-shadow: -10px 10px 24px rgba(0,0,0,0.14) !important;
}

#detail-panel.right-side {
  top: calc(var(--safe-area-top) + 142px) !important;
  bottom: auto !important;
  left: auto !important;
  right: 0 !important;
  width: min(320px, 80vw) !important;
  max-height: calc(100vh - 172px) !important;
  border-top-left-radius: 20px !important;
  border-top-right-radius: 0 !important;
  border-bottom-left-radius: 20px !important;
  border-bottom-right-radius: 0 !important;
  border: 1px solid rgba(255,255,255,0.32) !important;
  border-right: none !important;
  background: rgba(239, 247, 250, 0.9) !important;
  box-shadow: -12px 0 32px rgba(0,0,0,0.18) !important;
  transform: translateX(calc(100% + 24px)) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.05) !important;
  backdrop-filter: blur(14px) saturate(1.05) !important;
}

#detail-panel.right-side.open {
  transform: translateX(0) !important;
}

#detail-panel.right-side .detail-handle {
  align-items: flex-start !important;
  gap: 0 !important;
  padding: 14px 20px 10px 18px !important;
  border-bottom: 1px solid rgba(0,0,0,0.08) !important;
}

#detail-panel.right-side .detail-handle-bar {
  display: none !important;
}

#detail-panel.right-side .detail-title {
  justify-content: flex-start !important;
  text-align: left !important;
  font-size: 16px !important;
}

body.dark #detail-panel.right-side {
  background: rgba(24, 31, 35, 0.9) !important;
  border-color: rgba(255,255,255,0.12) !important;
  box-shadow: -12px 0 32px rgba(0,0,0,0.38) !important;
}

body.dark #detail-panel.right-side .detail-handle {
  border-bottom-color: rgba(255,255,255,0.08) !important;
}

.side-drawer-note {
  font-size: 12px;
  line-height: 1.5;
  color: rgba(17,17,17,0.72);
  margin-bottom: 12px;
}

.layer-drawer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Grouped layers tab (weather + flyability) */
.layer-group-label {
  font: 800 9px system-ui, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.5;
  margin: 16px 2px 7px;
}
.layer-group-label:first-of-type { margin-top: 4px; }
.layer-disclaimer {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 10px;
  line-height: 1.45;
  opacity: 0.62;
}

/* Per-platform weather-window timeline (green/amber/red over next 48h) */
.weather-window { margin: 10px 0 4px; }
.weather-window-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font: 700 9px system-ui, sans-serif; letter-spacing: 0.1em;
  text-transform: uppercase; opacity: 0.7; margin-bottom: 5px;
}
.weather-window-sum { opacity: 0.85; font-weight: 800; }
.weather-window-bar {
  display: flex; gap: 1px; height: 12px; border-radius: 3px; overflow: hidden;
}
.weather-window-bar .ww-seg { flex: 1; min-width: 1px; cursor: pointer; transition: opacity .12s; }
.weather-window-bar .ww-seg:hover { opacity: 0.7; }
.weather-window-ticks {
  display: flex; justify-content: space-between;
  font: 600 8px system-ui, sans-serif; opacity: 0.55; margin-top: 3px;
}

/* Premium (member) weather gating */
.layer-group-premium { color: #ffd76a; opacity: 0.75; }
.paid-lock { font-size: 9px; opacity: 0.85; margin-left: 2px; }
.layer-paid-locked {
  opacity: 0.78;
  border-style: dashed !important;
  border-color: rgba(255,215,106,0.45) !important;
}
.layer-paid-locked:active { transform: none; }
.weather-window-bar-locked {
  background: repeating-linear-gradient(45deg,
    rgba(255,255,255,0.10) 0 8px, rgba(255,255,255,0.04) 8px 16px);
}
.weather-window-locked .weather-window-sum { color: #ffd76a; }

/* Premium map time-slider (Ventusky-style forecast scrubber) */
/* Forecast timeline — bare floating slider at the BOTTOM of the map (no panel/box), so the
   layer stays fully visible while scrubbing NOW -> +48H. Neutral white accent (no brand colour);
   the start/end labels carry the time position so there's no readout text on top. */
.map-time-slider {
  position: absolute;
  left: 12px; right: 12px;
  bottom: calc(var(--safe-area-bottom, 0px) + 60px);
  z-index: 545;
}
.map-time-slider .mts-track { display: flex; align-items: center; gap: 11px; }
.map-time-slider .mts-end {
  font: 700 9px system-ui, sans-serif; letter-spacing: 0.08em;
  color: #fff; opacity: 0.92; flex-shrink: 0; white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0,0,0,0.65);
}
.map-time-slider input[type=range] {
  flex: 1; width: auto; margin: 0;
  accent-color: #f4f7fa;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.45));
}
.map-time-slider.mts-locked input { cursor: not-allowed; }

/* ── Clean / Focus view: hide all chrome, leave map + weather + a wee control ── */
.focus-bar { display: none; }
body.focus-mode .topbar,
body.focus-mode .side-vertical-tab,
body.focus-mode .welcome-banner { display: none !important; }
body.focus-mode .focus-bar {
  display: flex; gap: 5px; align-items: center;
  position: absolute; top: calc(var(--safe-area-top, 0px) + 10px); left: 50%; transform: translateX(-50%);
  z-index: 1200;
  background: rgba(12,22,32,0.34);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 22px;
  padding: 5px 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.focus-bar .focus-grid {
  display: grid;
  grid-template-columns: repeat(5, auto);
  gap: 3px 5px;
  align-items: center;
  justify-items: stretch;
}
.focus-bar .focus-chip {
  font: 700 11px system-ui, sans-serif; color: #dfeaf2; background: transparent; border: none;
  padding: 6px 11px; border-radius: 16px; cursor: pointer; text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.focus-bar .focus-chip.active { background: #1dff88; color: #0c1a12; text-shadow: none; }
/* Row 2 variant chips: Gust under Wind, Swell under Waves — smaller + dimmer to read as secondary. */
.focus-bar .focus-chip-sub { grid-row: 2; font-size: 10px; padding: 4px 11px; opacity: 0.72; }
.focus-bar .focus-chip-sub[data-layer="gust"]  { grid-column: 1; }
.focus-bar .focus-chip-sub[data-layer="swell"] { grid-column: 2; }
.focus-bar .focus-chip-sub.active { opacity: 1; }
.focus-bar .focus-exit {
  font: 700 13px system-ui, sans-serif; color: #0c1a12; background: rgba(255,255,255,0.14); border: none;
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer; margin-left: 2px; flex-shrink: 0;
}
.focus-bar .focus-exit:active { transform: scale(0.92); }

.layer-drawer-btn {
  width: 100%;
  min-height: 48px;
  text-align: center;
}

.float-row-slider .time-lbl {
  font-size: 13px !important;
}

.float-row-slider .time-lbl.active {
  font-size: 15px !important;
}

.side-vertical-tab {
  top: calc(var(--safe-area-top) + 148px) !important;
}

.weather-status-legend {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 6px 2px;
}

.weather-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.weather-legend-bar {
  width: 12px;
  height: 3px;
  border-radius: 999px;
  flex-shrink: 0;
}

.weather-legend-go { background: rgba(29,158,117,0.9); }
.weather-legend-warn { background: rgba(196,128,16,0.9); }
.weather-legend-nogo { background: rgba(200,50,58,0.92); }

.weather-legend-text {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: rgba(17,17,17,0.72);
  text-transform: uppercase;
}

.readiness-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  width: 100%;
  min-width: 0;
  flex-wrap: nowrap;
}

.readiness-pill {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(120, 130, 125, 0.25);
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.readiness-pill.go {
  border-color: rgba(29,158,117,0.42);
  color: #0f6e56;
}

.readiness-pill.warn {
  border-color: rgba(196,128,16,0.45);
  color: #8a5b08;
}

.readiness-pill.nogo {
  border-color: rgba(200,50,58,0.45);
  color: #9a2228;
}

.readiness-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(120, 130, 125, 0.12);
}

.readiness-copy {
  min-width: 0;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.25;
}

.flight-source-note {
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 10.5px;
  line-height: 1.35;
}

.flight-planning-note {
  margin-top: 8px;
  color: var(--text);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 700;
}

body.dark .flight-planning-note {
  color: rgba(255,255,255,0.82);
}

.pill-pos-source {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 2px 5px;
  border-radius: 4px;
  line-height: 1.4;
}
.pill-pos-live {
  background: rgba(29,200,100,0.15);
  color: #0d9e52;
  border: 1px solid rgba(29,200,100,0.4);
}
.pill-pos-est {
  background: rgba(240,160,48,0.12);
  color: #b87010;
  border: 1px solid rgba(240,160,48,0.35);
}
body.dark .pill-pos-live {
  background: rgba(29,255,136,0.12);
  color: rgba(29,255,136,0.85);
  border-color: rgba(29,255,136,0.3);
}
body.dark .pill-pos-est {
  background: rgba(240,160,48,0.12);
  color: #f0a030;
  border-color: rgba(240,160,48,0.3);
}
.pill-pos-sched {
  background: rgba(100,160,255,0.13);
  color: #2a6fcc;
  border: 1px solid rgba(100,160,255,0.38);
}
body.dark .pill-pos-sched {
  background: rgba(100,160,255,0.12);
  color: #7ab0ff;
  border-color: rgba(100,160,255,0.3);
}

.apron-card-inner {
  margin: 8px 16px 4px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}
.apron-card-label {
  font-size: 10px;
  font-family: var(--font-mono);
  letter-spacing: 1px;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.apron-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.apron-card-road {
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  margin-bottom: 6px;
}
.apron-card-desc {
  font-size: 12px;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 10px;
}
.apron-card-btn {
  display: inline-block;
  background: var(--green-dark);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-family: var(--font);
  font-weight: 500;
}

.readiness-panel {
  margin: 0 16px 14px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(255, 255, 255, 0.5);
}

.readiness-panel.go { border-color: rgba(29,158,117,0.28); }
.readiness-panel.warn { border-color: rgba(196,128,16,0.30); }
.readiness-panel.nogo { border-color: rgba(200,50,58,0.30); }

.readiness-panel-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.readiness-panel-kicker {
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.readiness-panel-title {
  margin-top: 2px;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
}

.readiness-panel-source {
  flex-shrink: 0;
}

.readiness-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.readiness-metric {
  min-width: 0;
  padding: 8px 6px;
  border-radius: 7px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(17,17,17,0.07);
  text-align: center;
}

/* ─── Tap crosshair marker ─────────────────────────────────────────── */
.tap-crosshair {
  width: 26px;
  height: 26px;
  position: relative;
  animation: tap-appear 0.18s ease-out both;
  pointer-events: none;
}

/* Outer ring */
.tap-crosshair::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid #000;
}

/* Centre dot */
.tap-crosshair::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 3px; height: 3px;
  margin: -1.5px 0 0 -1.5px;
  border-radius: 50%;
  background: #000;
}

@keyframes tap-appear {
  from { transform: scale(0.4); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* ─── Samsung Galaxy S25 Ultra + Edge viewport tweaks ──────────────── */
/* S25 Ultra: 1440×3088 physical → ~392×841 CSS px at 3.67 dpr, Edge on Android */
@media (min-width: 390px) and (max-width: 430px) and (max-height: 932px) and (min-height: 820px) {
  /* Bottom toolbar in Edge eats ~60px — push safe controls up */
  #bottom-bar {
    padding-bottom: max(env(safe-area-inset-bottom, 0px), 12px);
  }

  /* Slightly more room for detail panel on tall narrow screen */
  #detail-panel {
    max-height: 62vh;
  }

  /* Layer toggle buttons — slightly larger tap targets */
  .layer-btn {
    min-height: 42px;
    font-size: 13px;
  }

  /* Search bar — prevent overflow on narrow viewport */
  #search-bar {
    max-width: min(340px, 88vw);
  }

  /* Wind tooltip — ensure it doesn't clip on S25's narrow 393px width */
  .wind-tap-popup .leaflet-popup-content-wrapper {
    max-width: min(300px, 90vw);
  }
}

.readiness-metric span {
  display: block;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
}

.readiness-metric small {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.readiness-metric.go span { color: #0f6e56; }
.readiness-metric.warn span { color: #8a5b08; }
.readiness-metric.nogo span { color: #9a2228; }

.readiness-panel-note {
  margin-top: 9px;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.35;
}

body.dark .weather-legend-text {
  color: rgba(243,247,244,0.76);
}

body.dark .readiness-pill {
  background: rgba(255,255,255,0.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: rgba(255,255,255,0.18);
  color: rgba(243,247,244,0.88);
}

body.dark .readiness-panel,
body.dark .readiness-metric {
  background: rgba(15, 22, 20, 0.5);
  border-color: rgba(255,255,255,0.12);
}

/* v0.9.34 offshore weather watch */
.scrubber-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.scrub-step-btn {
  width: 34px;
  height: 32px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.52);
  color: #111111;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.scrub-step-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.scrubber-now {
  color: rgba(0,0,0,0.64);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.weather-scrubber {
  display: block;
  width: 100%;
}

.weather-watch-panel {
  background: linear-gradient(180deg, rgba(248,252,249,0.78), rgba(232,240,236,0.70));
  border-left: 5px solid rgba(29,158,117,0.74);
}

.weather-watch-panel.warn { border-left-color: rgba(196,128,16,0.86); }
.weather-watch-panel.nogo { border-left-color: rgba(200,50,58,0.88); }

.weather-watch-top .readiness-panel-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.weather-watch-top .readiness-panel-title span {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
}

.weather-watch-sub {
  margin-top: 2px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

.weather-watch-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.weather-watch-forecast {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.watch-chip {
  min-width: 0;
  border: 1px solid rgba(17,17,17,0.08);
  border-radius: 7px;
  padding: 7px 5px;
  background: rgba(255,255,255,0.46);
  color: var(--text);
  text-align: center;
  cursor: pointer;
}

.watch-chip span,
.watch-chip strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watch-chip span {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.watch-chip strong {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
}

.watch-chip.active {
  border-color: rgba(29,158,117,0.62);
  background: rgba(29,158,117,0.18);
  box-shadow: inset 0 0 0 1px rgba(29,158,117,0.20);
}

.watch-chip.warn.active {
  border-color: rgba(196,128,16,0.70);
  background: rgba(196,128,16,0.18);
}

.watch-chip.nogo.active {
  border-color: rgba(200,50,58,0.72);
  background: rgba(200,50,58,0.16);
}

.watch-compare {
  margin-top: 10px;
  padding: 8px;
  border-radius: 7px;
  background: rgba(255,255,255,0.38);
  border: 1px solid rgba(17,17,17,0.08);
}

.watch-compare-head,
.watch-compare-row {
  display: grid;
  grid-template-columns: minmax(44px, 0.8fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  font-family: var(--font-mono);
}

.watch-compare-head {
  color: var(--text-muted);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.watch-compare-head span:first-child {
  grid-column: 2;
}

.watch-compare-row {
  margin-top: 5px;
  color: var(--text);
  font-size: 10px;
  font-weight: 800;
}

.watch-compare-row span {
  color: var(--text-muted);
}

.watch-compare-row em {
  font-style: normal;
}

.watch-compare-row.warn strong,
.watch-compare-row.warn em {
  color: #8a5b08;
}

.watch-compare-line {
  margin-top: 10px;
  padding: 8px;
  border-radius: 7px;
  background: rgba(255,255,255,0.34);
  border: 1px dashed rgba(17,17,17,0.16);
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.35;
}

body.dark .scrub-step-btn {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.18);
  color: rgba(243,247,244,0.92);
}

body.dark .scrubber-now {
  color: rgba(243,247,244,0.70);
}

body.dark .weather-watch-panel {
  background: linear-gradient(180deg, rgba(15,22,20,0.70), rgba(12,18,17,0.62));
}

body.dark .watch-chip,
body.dark .watch-compare,
body.dark .watch-compare-line {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
}

@media (max-width: 420px) {
  .weather-watch-metrics,
  .weather-watch-forecast {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* v0.8.2 weather polish */
.float-cond {
  background: rgba(248, 252, 249, 0.70) !important;
  border-color: rgba(20, 34, 30, 0.12) !important;
  box-shadow: 0 6px 18px rgba(0,0,0,0.10) !important;
}

.float-cond-val,
.float-cond.go .float-cond-val,
.float-cond.warn .float-cond-val,
.float-cond.nogo .float-cond-val {
  color: #14221e !important;
}

.float-cond-lbl {
  color: rgba(20, 34, 30, 0.58) !important;
}

.float-cond.go::before { background: rgba(29,158,117,0.82) !important; }
.float-cond.warn::before { background: rgba(196,128,16,0.84) !important; }
.float-cond.nogo::before { background: rgba(200,50,58,0.86) !important; }

body.dark .float-cond {
  background: rgba(12, 18, 16, 0.68) !important;
  border-color: rgba(255,255,255,0.14) !important;
}

body.dark .float-cond-val,
body.dark .float-cond.go .float-cond-val,
body.dark .float-cond.warn .float-cond-val,
body.dark .float-cond.nogo .float-cond-val {
  color: rgba(245, 250, 247, 0.94) !important;
}

body.dark .float-cond-lbl {
  color: rgba(245, 250, 247, 0.62) !important;
}

.wind-speed-canvas,
.weather-grid-canvas,
.wind-flow-canvas {
  position: absolute;
  pointer-events: none;
}

.weather-grid-canvas {
  z-index: 416;
  opacity: 0.96;
}

.wind-speed-canvas {
  z-index: 418;
  opacity: 0.95;
  mix-blend-mode: normal;
}

.wind-flow-canvas {
  z-index: 420;
  mix-blend-mode: normal;
  opacity: 0.98;
}

/* ── EUMETSAT WMS cloud tile overlay ──────────────────────────────────────── */
/* mix-blend-mode: screen → dark sea surface disappears, bright cloud tops glow */
.eumet-clouds-tile {
  mix-blend-mode: normal;
  pointer-events: none;
}
/* On dark theme, lighten slightly so clouds still read against dark basemap */
body.dark .eumet-clouds-tile {
  mix-blend-mode: normal;
  opacity: 0.92;
}

/* ── Layer legend — compact left-side floating strip, below EXPLORE tab ── */
.lightning-strike-icon {
  background: transparent !important;
  border: none !important;
}

.lightning-strike-icon span {
  display: grid;
  place-items: center;
  width: var(--ltg-size);
  height: var(--ltg-size);
  color: var(--ltg-color);
  font-size: var(--ltg-size);
  line-height: 1;
  text-shadow:
    0 0 4px rgba(255,255,255,0.95),
    0 0 12px var(--ltg-color),
    0 0 22px rgba(255,193,42,0.75);
  filter: drop-shadow(0 0 5px rgba(0,0,0,0.55));
  animation: lightningPulse 1.1s ease-in-out infinite;
}

@keyframes lightningPulse {
  0%, 100% { transform: scale(0.92); opacity: 0.78; }
  45% { transform: scale(1.15); opacity: 1; }
}

.layer-map-legend {
  position: absolute;
  left: 3px;
  top: calc(var(--safe-area-top) + 400px);
  z-index: 540;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 4px 2px;
  pointer-events: none;
}

.layer-map-title {
  color: #0a0a0a;
  font-size: 7px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: left;
  margin-bottom: 2px;
  text-shadow: 0 0 3px rgba(255,255,255,0.95), 0 0 6px rgba(255,255,255,0.7);
}

/* .layer-map-sub is shown when it contains the time nav HTML */
.layer-map-sub { display: block; }

/* ── Cloud time navigation bar ── */
.cloud-time-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 5px;
  pointer-events: all;
}
.ctn-btn {
  background: rgba(0,0,0,0.30);
  border: 1px solid rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.70);
  font-size: 8px;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
.ctn-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.18);
  color: #fff;
}
.ctn-btn:disabled {
  opacity: 0.28;
  cursor: default;
}
.ctn-label {
  flex: 1;
  font-size: 7px;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.3px;
  text-align: center;
  white-space: nowrap;
}

/* Cloud layer LOW/MID/ALL toggle */
.cloud-mode-toggle {
  display: flex;
  gap: 3px;
  margin-bottom: 5px;
}
.cloud-mode-toggle button {
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.55);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 5px;
  border-radius: 4px;
  cursor: pointer;
  pointer-events: all;
}
.cloud-mode-toggle button.active {
  background: rgba(255,255,255,0.22);
  color: #fff;
  border-color: rgba(255,255,255,0.55);
}

.layer-map-rows {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
}

.layer-map-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-direction: row;
}

.layer-map-row span:last-child {
  color: #0a0a0a;
  font-size: 7px;
  font-weight: 700;
  text-shadow: 0 0 3px rgba(255,255,255,0.95), 0 0 6px rgba(255,255,255,0.7);
  white-space: nowrap;
}

.layer-map-swatch {
  width: 18px;
  height: 5px;
  border-radius: 999px;
  box-shadow: 0 0 3px rgba(0,0,0,0.5);
  flex-shrink: 0;
}

.layer-map-legend.layer-legend-compact {
  gap: 3px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.layer-legend-compact .layer-map-title {
  color: #0a0a0a;
  font-size: 8px;
  letter-spacing: 0.8px;
  text-shadow: 0 0 3px rgba(255,255,255,0.95), 0 0 6px rgba(255,255,255,0.75);
}

.layer-legend-compact .layer-map-rows {
  gap: 3px;
}

.layer-legend-compact .layer-map-row {
  gap: 5px;
}

.layer-legend-compact .layer-map-row span:last-child {
  color: #0a0a0a;
  font-size: 8px;
  text-shadow: 0 0 3px rgba(255,255,255,0.95), 0 0 6px rgba(255,255,255,0.75);
}

.layer-legend-compact .layer-map-swatch {
  width: 22px;
  height: 6px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.52);
}

/* dark mode — keep the black-on-white-halo look (legible on the same satellite tiles) */
body.dark .layer-map-title { color: #0a0a0a; text-shadow: 0 0 3px rgba(255,255,255,0.95), 0 0 6px rgba(255,255,255,0.75); }
body.dark .layer-map-row span:last-child { color: #0a0a0a; text-shadow: 0 0 3px rgba(255,255,255,0.95), 0 0 6px rgba(255,255,255,0.75); }

body.dark .layer-map-sub,
body.dark .layer-map-row {
  color: rgba(245, 250, 247, 0.68);
}

body.dark .side-drawer-note {
  color: rgba(243,247,244,0.76);
}

/* v0.8.3 map-first glass polish */
#detail-panel,
#detail-panel.open,
#detail-panel.right-side,
#detail-panel.explore-side,
.modal-panel,
#settings-modal .modal-panel {
  background: rgba(234, 240, 236, 0.22) !important;
  border-color: rgba(255,255,255,0.18) !important;
  box-shadow: 0 10px 26px rgba(0,0,0,0.12) !important;
  backdrop-filter: blur(18px) saturate(1.05) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.05) !important;
}

#detail-panel.right-side,
#detail-panel.explore-side {
  box-shadow: -10px 0 24px rgba(0,0,0,0.12) !important;
}

body.dark #detail-panel,
body.dark #detail-panel.open,
body.dark #detail-panel.right-side,
body.dark #detail-panel.explore-side,
body.dark .modal-panel,
body.dark #settings-modal .modal-panel {
  background: rgba(18, 28, 25, 0.30) !important;
  border-color: rgba(255,255,255,0.12) !important;
  box-shadow: 0 10px 26px rgba(0,0,0,0.22) !important;
}

#detail-panel .detail-handle,
#detail-panel .detail-body,
#detail-panel .sec-hdr {
  background: transparent !important;
}

#detail-panel .flight-card,
#detail-panel .platform-photo-slot:not(.photo-live),
#detail-panel .explore-teaser,
#detail-panel .op-tile,
#detail-panel .airport-summary,
#detail-panel .explore-supplier-card,
.airport-note-strip,
.parking-card.compact,
.abz-terminal-card,
.layer-drawer-btn {
  background: rgba(255,255,255,0.18) !important;
  border-color: rgba(0,0,0,0.08) !important;
}

body.dark #detail-panel .platform-photo-slot.photo-none,
body.dark #detail-panel .platform-photo-slot.photo-pending {
  background: rgba(20,24,20,0.55) !important;
  border-color: rgba(255,255,255,0.08) !important;
}
body.dark #detail-panel .platform-photo-slot.photo-none .platform-photo-label,
body.dark #detail-panel .platform-photo-slot.photo-pending .platform-photo-label {
  color: rgba(255,255,255,0.55);
}
body.dark #detail-panel .platform-photo-slot.photo-none .platform-photo-sub,
body.dark #detail-panel .platform-photo-slot.photo-pending .platform-photo-sub {
  color: rgba(255,255,255,0.28);
}

body.dark #detail-panel .flight-card,
body.dark #detail-panel .explore-teaser,
body.dark #detail-panel .op-tile,
body.dark #detail-panel .airport-summary,
body.dark #detail-panel .explore-supplier-card,
body.dark .airport-note-strip,
body.dark .parking-card.compact,
body.dark .abz-terminal-card,
body.dark .layer-drawer-btn {
  background: rgba(12,18,16,0.26) !important;
  border-color: rgba(255,255,255,0.10) !important;
}

#detail-panel .op-tile.abz-linked {
  background: rgba(255,255,255,0.26) !important;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  transform: translateY(-1px);
}

#detail-panel .op-tile.abz-linked[data-terminal="bristow"] {
  background: rgba(29,158,117,0.16) !important;
  border-color: rgba(29,158,117,0.34) !important;
}

#detail-panel .op-tile.abz-linked[data-terminal="nhv"] {
  background: rgba(212,119,58,0.16) !important;
  border-color: rgba(212,119,58,0.34) !important;
}

#detail-panel .op-tile.abz-linked[data-terminal="ohs"] {
  background: rgba(58,122,212,0.16) !important;
  border-color: rgba(58,122,212,0.34) !important;
}

#detail-panel .op-tile.abz-dimmed {
  opacity: 0.46;
}

#detail-panel .tips-list {
  font-size: 11px !important;
  line-height: 1.45 !important;
}

#detail-panel .tips-list li {
  margin-bottom: 6px;
}

.airport-note-strip {
  font-size: 11px !important;
  line-height: 1.45 !important;
}

.airport-note-strip.compact {
  font-size: 10px !important;
}

.abz-flight-link-section {
  padding: 0 16px 10px;
}

.abz-flight-link-grid {
  display: grid;
  gap: 7px;
  margin-top: 7px;
}

.abz-flight-link-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid rgba(17,17,17,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.28);
}

.abz-flight-link-card-wide {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.abz-flight-link-card span,
.abz-flight-link-card small {
  display: block;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 800;
}

.abz-flight-link-card strong {
  display: block;
  margin: 2px 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.abz-flight-actions,
.parking-action-row,
.parking-chip-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.abz-flight-actions {
  justify-content: flex-start;
}

.abz-flight-actions a,
.parking-action-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 7px;
  background: rgba(29,158,117,0.16);
  border: 1px solid rgba(29,158,117,0.22);
  color: var(--green-dark) !important;
  font-size: 10px;
  font-weight: 900;
  text-decoration: none;
}

.parking-card.compact {
  padding: 10px 12px !important;
}

.parking-name {
  font-size: 12px !important;
}

.parking-price {
  font-size: 10px !important;
  padding: 2px 7px !important;
}

.parking-meta {
  font-size: 10px !important;
  line-height: 1.4 !important;
}

.parking-chip-row {
  margin-bottom: 6px;
}

.parking-chip-row span {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.30);
  border: 1px solid rgba(17,17,17,0.06);
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 800;
}

.parking-action-row {
  margin-top: 8px;
}

.parking-external-link {
  padding-top: 8px;
  text-align: right;
  font-size: 11px;
}

.abz-main-note {
  margin-top: 0 !important;
}

.sumburgh-guide-wrap {
  padding-bottom: 10px;
}

.sumburgh-panel-map {
  height: 230px;
  width: 100%;
  background: #1a2a1a;
}

.sumburgh-map-actions {
  padding: 10px 16px 0;
}

.sumburgh-admin-card {
  margin-top: 10px;
}

.taxi-number-list {
  display: grid;
  gap: 7px;
  padding: 0 16px 14px;
}

.taxi-number-card,
.parking-homework-card {
  border: 1px solid rgba(17,17,17,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.28);
  color: var(--text);
  text-decoration: none;
}

.taxi-number-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 8px 11px;
}

.taxi-number-card span {
  font-size: 11px;
  font-weight: 800;
}

.taxi-number-card strong {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.parking-homework-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.parking-homework-card strong,
.parking-homework-card span {
  display: block;
}

.parking-homework-card strong {
  font-size: 12px;
  font-weight: 900;
}

.parking-homework-card span {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.4;
}

.parking-homework-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border-radius: 7px;
  background: rgba(29,158,117,0.16);
  border: 1px solid rgba(29,158,117,0.22);
  color: var(--green-dark) !important;
  font-size: 10px;
  font-weight: 900;
  text-decoration: none;
}

@media (max-width: 480px) {
  .abz-airfield {
    height: 332px !important;
  }

  .abz-airfield-stage {
    max-width: min(100%, 274px);
  }

  .abz-guide-tip-row {
    gap: 6px;
  }

  .abz-guide-link {
    font-size: 10px;
    padding: 6px 8px;
  }

  .topbar {
    gap: 6px;
    padding-right: 10px;
  }
}

@media (min-width: 900px) {
  .abz-airfield-card {
    min-height: 380px;
  }

  .abz-airfield {
    height: 420px !important;
  }

  .abz-airfield-stage {
    max-width: min(100%, 360px);
  }
}

@media (max-width: 600px) {
  .user-zone-ribbon {
    left: 42px;
    right: 8px;
    min-height: 34px;
    gap: 7px;
    padding: 6px 9px;
  }

  .user-zone-ribbon span {
    font-size: 12px;
  }

  .user-zone-ribbon strong {
    font-size: 8px;
  }

  .topbar {
    align-items: flex-start !important;
    padding-right: 8px !important;
  }

  .topbar-right-stack {
    position: absolute !important;
    top: calc(var(--safe-area-top) + 92px) !important;
    right: 10px !important;
    margin-top: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important;
    z-index: 540 !important;
  }

  .topbar-right-stack .theme-btn {
    position: relative !important;
    flex: 0 0 40px !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    margin: 0 !important;
  }

  .side-vertical-tab {
    top: calc(var(--safe-area-top) + 208px) !important;
    left: -12px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 8px 14px 8px 9px !important;
    border-radius: 16px 0 0 16px !important;
  }

  .side-vertical-tab span {
    font-size: 8px !important;
    letter-spacing: 0.45px !important;
    line-height: 0.98 !important;
  }

  .side-tab-stack-right {
    top: calc(var(--safe-area-top) + 176px) !important;
    right: -12px !important;
    gap: 6px !important;
  }

  .side-vertical-tab-right {
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 8px 14px 8px 9px !important;
    border-radius: 16px 0 0 16px !important;
  }

  .side-vertical-tab-right span {
    font-size: 8px !important;
    line-height: 0.98 !important;
  }

  #detail-panel.explore-side {
    top: calc(var(--safe-area-top) + 156px) !important;
    width: min(238px, 62vw) !important;
    max-height: calc(100vh - 186px) !important;
  }

  #detail-panel.right-side {
    top: calc(var(--safe-area-top) + 156px) !important;
    width: min(286px, 80vw) !important;
    max-height: calc(100vh - 186px) !important;
  }

  .weather-status-legend {
    justify-content: flex-start !important;
    gap: 8px !important;
    padding: 0 2px 2px !important;
    flex-wrap: wrap;
  }

  .weather-legend-text {
    font-size: 8px !important;
  }
}

.side-vertical-explore {
  min-width: 0 !important;
  min-height: 0 !important;
  width: 42px !important;
  left: -6px !important;
  right: auto !important;
  top: calc(var(--safe-area-top) + 282px) !important;
  padding: 8px 14px 8px 10px !important;
  border-radius: 0 16px 16px 0 !important;
  justify-content: center !important;
}

@media (max-width: 600px) {
  .side-vertical-explore {
    width: 42px !important;
    left: -4px !important;
    padding: 8px 14px 8px 10px !important;
  }
  .layer-map-legend {
    top: calc(var(--safe-area-top) + 450px) !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/*  v0.7.6 — dual weather source badge                                     */
/* ═══════════════════════════════════════════════════════════════════════ */

/* Small data-source pill in the disclaimer line */
.wx-source {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  background: rgba(29,158,117,0.18);
  color: #064f3a;
  border: 1px solid rgba(29,158,117,0.30);
  vertical-align: middle;
  cursor: help;
}

body.dark .wx-source {
  background: rgba(29,255,136,0.10);
  color: #5dde7a;
  border-color: rgba(29,255,136,0.25);
}

/* Disagreement warning pip — sits next to the source label */
.wx-warn {
  margin-left: 4px;
  font-size: 11px;
  color: #c48010;
  cursor: help;
}

body.dark .wx-warn { color: #f5c842; }

.user-zone-ribbon#settings-btn {
  position: absolute !important;
  top: 6px !important;
  left: 44px !important;
  right: 12px !important;
  inset: 6px 12px auto 44px !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 36px !important;
  margin: 0 !important;
  padding: 7px 12px !important;
  border: 2px solid #111111 !important;
  border-radius: 10px !important;
  background: #ffcf23 !important;
  color: #111111 !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  box-shadow: var(--shadow) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow: hidden !important;
}

@media (max-width: 600px) {
  .user-zone-ribbon#settings-btn {
    top: 6px !important;
    left: 42px !important;
    right: 8px !important;
    inset: 6px 8px auto 42px !important;
    min-height: 34px !important;
    padding: 6px 9px !important;
    gap: 7px !important;
  }
}

/* Keep source pill aligned with the two-line weather note */
.weather-disclaimer {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 6px;
  margin-left: 0;
  text-align: left;
}

@media (max-width: 600px) {
  .topbar .topbar-right-stack {
    position: absolute !important;
    top: calc(var(--safe-area-top) + 92px) !important;
    right: 10px !important;
    margin-top: 0 !important;
    width: 40px !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    z-index: 540 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  .topbar .topbar-right-stack .landing-btn,
  .topbar .topbar-right-stack #fullscreen-btn,
  .topbar .topbar-right-stack #theme-btn,
  .topbar .topbar-right-stack #settings-btn {
    position: static !important;
    inset: auto !important;
    right: auto !important;
    left: auto !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    margin: 0 !important;
    flex: none !important;
    border-radius: 10px !important;
    background: rgba(255,255,255,0.28) !important;
    border: 1px solid rgba(255,255,255,0.35) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12) !important;
    transform: none !important;
    overflow: hidden !important;
  }

  .topbar .topbar-right-stack .landing-btn {
    width: 74px !important;
    min-width: 74px !important;
    padding: 0 8px !important;
    gap: 5px !important;
    background: #ffcf23 !important;
    border-color: #111111 !important;
    color: #111111 !important;
  }

  .topbar .topbar-right-stack .landing-btn::before,
  .topbar .topbar-right-stack .landing-btn::after,
  .topbar .topbar-right-stack #fullscreen-btn::before,
  .topbar .topbar-right-stack #fullscreen-btn::after,
  .topbar .topbar-right-stack #theme-btn::before,
  .topbar .topbar-right-stack #theme-btn::after,
  .topbar .topbar-right-stack #settings-btn::before,
  .topbar .topbar-right-stack #settings-btn::after {
    content: none !important;
    display: none !important;
  }

  .leaflet-top.leaflet-right .leaflet-control-zoom {
    display: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/*  MOBILE ACCESSIBILITY — tooltip contrast · collapsible legend · layer dimming  */
/* ═══════════════════════════════════════════════════════════════════════ */

/* 1 ── Tooltip: black values on mobile (desktop keeps green) */
@media (max-width: 768px) {
  .wind-tap-popup .leaflet-popup-content b {
    color: #111111 !important;
    font-size: 14px !important;
  }
  .wind-tap-popup .leaflet-popup-content {
    font-size: 13px !important;
    line-height: 1.9;
  }
}

/* 2 ── Legend: collapsible pill on mobile, desktop unchanged */
@media (max-width: 768px) {
  .layer-map-legend {
    pointer-events: all !important;
    cursor: pointer;
    background: rgba(255,255,255,0.18) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border-radius: 10px !important;
    padding: 9px 13px !important;
    border: 1px solid rgba(255,255,255,0.34) !important;
    box-shadow: 0 10px 24px rgba(0,0,0,0.14) !important;
    user-select: none;
  }
  .layer-map-legend .layer-map-title {
    font-size: 10px !important;
    color: rgba(10,20,15,0.92) !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 0 !important;
  }
  .legend-expand-hint {
    font-size: 11px;
    color: rgba(10,20,15,0.55);
    font-family: var(--font-mono);
    transition: transform 0.2s;
    display: inline-block;
    flex-shrink: 0;
  }
  .layer-map-legend.legend-collapsed .layer-map-rows,
  .layer-map-legend.legend-collapsed .lml-bar-wrap,
  .layer-map-legend.legend-collapsed .cloud-mode-toggle,
  .layer-map-legend.legend-collapsed .lml-unit {
    display: none !important;
  }
  .layer-map-legend.legend-collapsed .legend-expand-hint { transform: rotate(0deg); }
  .layer-map-legend:not(.legend-collapsed) .layer-map-title { margin-bottom: 8px !important; }
  .layer-map-legend:not(.legend-collapsed) .legend-expand-hint { transform: rotate(90deg); }
  .layer-map-legend:not(.legend-collapsed) .layer-map-row span:last-child {
    font-size: 12px !important;
    color: rgba(10,20,15,0.90) !important;
  }
  .layer-map-legend:not(.legend-collapsed) .layer-map-swatch {
    width: 24px !important;
    height: 8px !important;
  }
  .layer-map-legend:not(.legend-collapsed) .layer-map-row {
    gap: 8px !important;
    margin-bottom: 2px;
  }

  .layer-map-legend.layer-legend-compact {
    pointer-events: none !important;
    cursor: default;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    gap: 3px;
  }

  .layer-map-legend.layer-legend-compact .layer-map-title {
    font-size: 9px !important;
    color: rgba(245,250,247,0.9) !important;
    gap: 0;
    margin-bottom: 2px !important;
    text-shadow: 0 1px 6px rgba(0,0,0,0.72);
  }

  .layer-map-legend.layer-legend-compact .layer-map-rows {
    display: flex !important;
    gap: 3px;
  }

  .layer-map-legend.layer-legend-compact .layer-map-row {
    gap: 5px !important;
    margin-bottom: 0;
  }

  .layer-map-legend.layer-legend-compact .layer-map-row span:last-child {
    font-size: 9px !important;
    color: rgba(245,250,247,0.9) !important;
    text-shadow: 0 1px 6px rgba(0,0,0,0.76);
  }

  .layer-map-legend.layer-legend-compact .layer-map-swatch {
    width: 24px !important;
    height: 6px !important;
  }
}

/* 3 ── Platform dimming when a weather layer is active (mobile only) */
@media (max-width: 768px) {
  body.weather-on .marker-platform,
  body.weather-on .marker-rig {
    opacity: 0.32;
    transition: opacity 0.35s ease;
  }
  body.weather-on .leaflet-tooltip.platform-label {
    opacity: 0.18;
    transition: opacity 0.35s ease;
  }
  body.weather-on .marker-platform.highlighted,
  body.weather-on .marker-rig.highlighted {
    opacity: 1 !important;
  }
}

/* 4 ── Smart weather view (mobile): a live weather layer reclaims the top of the map.
   Hide the USER ZONE banner + brand, collapse the search to a tap-to-open icon, and show a
   clear ✕ exit. Desktop keeps full chrome. Exit/closing the layer restores everything. */
.weather-exit-btn {
  display: none;
  background: var(--bg2);
  border: 2px solid #111;
  border-radius: 50%;
  width: 38px; height: 38px;
  align-items: center; justify-content: center;
  font-size: 22px; line-height: 1; color: #111;
  box-shadow: var(--shadow);
  cursor: pointer;
  flex-shrink: 0;
}
@media (max-width: 768px) {
  body.weather-on .user-zone-ribbon,
  body.weather-on .brand-vertical { display: none !important; }
  body.weather-on .weather-exit-btn { display: flex; }

  /* search collapses to a round icon; tapping it (handled in initSearch) expands it back */
  body.weather-on .search-stack { margin-top: 0 !important; }
  body.weather-on .search-pill-top {
    width: 44px; padding: 7px 0; justify-content: center; cursor: pointer;
    transition: width 0.22s ease, padding 0.22s ease;
  }
  body.weather-on .search-pill-top input,
  body.weather-on .search-pill-top .search-clear {
    width: 0 !important; padding: 0 !important; opacity: 0; pointer-events: none;
  }
  body.weather-on.search-open .search-pill-top {
    width: 100%; padding: 7px 12px; justify-content: flex-start;
  }
  body.weather-on.search-open .search-pill-top input {
    width: 100% !important; padding: 0 !important; opacity: 1; pointer-events: auto;
  }
}

/* ── ABZ terminal photos ───────────────────────────────────────── */
.abz-terminal-photos {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  margin-bottom: 12px;
  border-radius: 10px;
}
.abz-terminal-photo {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  border-radius: 10px;
  scroll-snap-align: start;
  display: block;
}
.abz-terminal-photos:has(.abz-terminal-photo:nth-child(2)) .abz-terminal-photo {
  width: 90%;
}

@media (max-width: 768px) {
  .abz-terminal-photo {
    height: 220px;
    object-fit: cover;
  }
}

/* ── Explore category tiles ────────────────────────────────────── */
.explore-tile-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px 0;
}
.explore-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.explore-tile:active {
  background: rgba(29,158,117,0.16);
  border-color: rgba(29,158,117,0.30);
}
.explore-tile-icon { display: none; }
.explore-tile-title { font-size: 13px; font-weight: 700; color: var(--text); }
.explore-tile-sub   { font-size: 10px; color: var(--text-muted); }
.explore-tile-count { font-size: 9px; font-weight: 600; color: var(--green-dark); margin-top: 2px; }

.explore-back-btn {
  background: none;
  border: none;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 600;
  padding: 0 10px 0 0;
  cursor: pointer;
}
.explore-cat-desc {
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px 16px 12px;
}

body.dark .explore-tile {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 2px 10px rgba(0,0,0,0.22);
}
body.dark .explore-tile-title { color: #e8f0ec; }

/* Daily Brief side panel */
#detail-panel[data-side-panel="daily-brief"] {
  display: flex !important;
  flex-direction: column;
  width: min(1040px, 96vw) !important;
  top: calc(var(--safe-area-top) + 110px) !important;
  max-height: calc(100vh - var(--safe-area-top) - var(--safe-area-bottom)) !important;
}

#detail-panel[data-side-panel="daily-brief"] .detail-handle {
  flex: 0 0 auto;
  min-height: 52px !important;
  padding: 8px 14px !important;
}

.daily-brief-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 16px 8px !important;
}

.brief-hero,
.brief-platform-box,
.brief-group {
  border: 1px solid rgba(17,17,17,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.26);
}

.brief-hero {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 7px 9px;
  margin-bottom: 6px;
}

.brief-kicker,
.brief-group-title,
.brief-platform-box label {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.brief-title {
  margin-top: 2px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.brief-pill {
  padding: 4px 7px;
  border-radius: 7px;
  background: rgba(29,158,117,0.16);
  color: var(--green-dark);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
}

.brief-platform-box {
  padding: 7px 9px;
  margin-bottom: 6px;
}

.brief-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 7px;
  margin-top: 5px;
}

.brief-search-row input {
  min-width: 0;
  border: 1px solid rgba(17,17,17,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.54);
  color: var(--text);
  font: 700 13px var(--font);
  padding: 6px 8px;
  outline: none;
}

.brief-search-row button {
  border: 1px solid rgba(17,17,17,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.40);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
}

.brief-current-platform {
  margin-top: 5px;
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 800;
}

.brief-results {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  max-height: 124px;
  overflow-y: auto;
}

.brief-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 1px solid rgba(17,17,17,0.08);
  border-radius: 7px;
  background: rgba(255,255,255,0.36);
  color: var(--text);
  padding: 8px 9px;
  text-align: left;
  cursor: pointer;
}

.brief-result span {
  font-size: 12px;
  font-weight: 800;
}

.brief-result small,
.brief-empty {
  color: var(--text-muted);
  font-size: 10px;
}

.brief-empty {
  padding: 8px 2px 2px;
}

.brief-group {
  display: grid;
  gap: 7px;
  padding: 10px;
  margin-bottom: 10px;
}

.brief-preview-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 9px;
  margin-bottom: 6px;
  border: 1px solid rgba(17,17,17,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.26);
}

.brief-preview-toggle strong,
.brief-preview-toggle small {
  display: block;
}

.brief-preview-toggle strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.brief-preview-toggle small {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 9px;
}

.brief-card-stack {
  display: grid;
  gap: 7px;
}

.brief-notification-top {
  display: grid;
  gap: 6px;
  padding: 7px 9px;
  margin-bottom: 6px;
  border: 1px solid rgba(17,17,17,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.26);
}

.brief-mini-toggle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.brief-push-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  margin-top: 2px;
}

.brief-push-row label {
  color: #000;
  font-weight: 600;
}

/* Premium clock digits — this is a sellable part of the UI. */
.brief-push-row input[type="time"] {
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid rgba(17,17,17,0.22);
  background: linear-gradient(180deg, #ffffff 0%, #eef3f0 100%);
  color: #000;
  font-family: var(--font);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.08), 0 1px 0 rgba(255,255,255,0.5);
}

.brief-push-row input[type="time"]::-webkit-calendar-picker-indicator {
  opacity: 0.55;
  cursor: pointer;
}

.brief-save-btn {
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
  border: none;
  border-radius: 9px;
  background: var(--green-dark);
  color: #fff;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.16);
}

.brief-save-btn:active { transform: translateY(1px); }

/* ── Install (Add to Home Screen) nudge — Phase 0 ── */
.install-banner {
  position: fixed;
  left: 50%;
  bottom: calc(12px + var(--safe-area-bottom, 0px));
  transform: translate(-50%, 140%);
  width: min(440px, calc(100vw - 20px));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(20, 26, 24, 0.96);
  color: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 4000;
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
}
.install-banner.show { transform: translate(-50%, 0); opacity: 1; }
.install-banner .ib-icon img { display: block; width: 40px; height: 40px; border-radius: 9px; }
.install-banner .ib-copy { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.install-banner .ib-copy strong { font-size: 14px; font-weight: 800; }
.install-banner .ib-copy small { font-size: 12px; opacity: 0.85; line-height: 1.3; }
.install-banner .ib-copy b { font-weight: 700; }
.install-banner .ib-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.install-banner .ib-install {
  border: none;
  border-radius: 9px;
  background: var(--green-dark, #0f6e56);
  color: #fff;
  font: 800 13px/1 var(--font);
  letter-spacing: 0.5px;
  padding: 10px 14px;
  cursor: pointer;
}
.install-banner .ib-install:active { transform: translateY(1px); }
.install-banner .ib-close {
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
}

/* The panel-wide "#detail-panel *" black-text rule (ID specificity) would otherwise
   force black onto the green save button — keep its label white. */
#detail-panel .brief-save-btn,
.modal-panel .brief-save-btn { color: #fff !important; }

.brief-push-status {
  flex: 1 1 100%;
  color: #000;
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
}

.morning-preview-card {
  display: grid;
  gap: 9px;
  padding: 10px;
  margin: 0 0 7px;
  border: 1px solid rgba(29,158,117,0.30);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(29,158,117,0.22), rgba(255,207,35,0.10)),
    rgba(255,255,255,0.24);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.morning-preview-copy h3 {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
}

.morning-preview-copy p {
  margin: 3px 0 0;
  color: #111;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 700;
}

.morning-preview-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  align-items: center;
  gap: 10px;
}

.morning-hero-icon {
  justify-self: end;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255,255,255,0.32);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65), 0 8px 16px rgba(0,0,0,0.14);
  position: relative;
}

.morning-hero-icon::before,
.morning-hero-icon::after,
.morning-mini-step i::before,
.morning-mini-step i::after {
  content: "";
  position: absolute;
}

.morning-hero-icon[data-icon="SUN"]::before,
.morning-mini-step i[data-icon="SUN"]::before {
  inset: 11px;
  border-radius: 50%;
  background: #ffcf23;
  box-shadow: 0 0 0 5px rgba(255,207,35,0.24);
}

.morning-hero-icon[data-icon="CLOUD"]::before,
.morning-hero-icon[data-icon="RAIN"]::before,
.morning-mini-step i[data-icon="CLOUD"]::before,
.morning-mini-step i[data-icon="RAIN"]::before {
  left: 11px;
  right: 9px;
  bottom: 16px;
  height: 17px;
  border-radius: 18px;
  background: #eef5f2;
  box-shadow: -5px 1px 0 #d8e5e1, 7px -6px 0 2px #f8fbfa;
}

.morning-hero-icon[data-icon="RAIN"]::after,
.morning-mini-step i[data-icon="RAIN"]::after {
  left: 19px;
  bottom: 8px;
  width: 4px;
  height: 10px;
  border-radius: 4px;
  background: #3a8fd4;
  box-shadow: 10px 0 0 #3a8fd4, 20px 0 0 #3a8fd4;
}

.morning-hero-icon[data-icon="WIND"]::before,
.morning-mini-step i[data-icon="WIND"]::before {
  left: 11px;
  right: 10px;
  top: 19px;
  height: 4px;
  border-radius: 999px;
  background: #1d9e75;
  box-shadow: 0 9px 0 #1d9e75, 9px -9px 0 rgba(29,158,117,0.55);
}

.morning-hero-icon[data-icon="SEA"]::before,
.morning-mini-step i[data-icon="SEA"]::before {
  left: 9px;
  right: 8px;
  top: 20px;
  height: 6px;
  border-radius: 999px;
  background: #2f8fcf;
  box-shadow: 8px 9px 0 rgba(47,143,207,0.72);
}

.morning-hero-icon[data-icon="?"]::before {
  content: "?";
  inset: 0;
  display: grid;
  place-items: center;
  color: #111;
  font: 900 24px var(--font);
}

.morning-weather-hero {
  display: grid;
  grid-template-columns: 76px minmax(96px, auto) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 8px 8px;
}

.morning-weather-symbol {
  width: 70px;
  height: 70px;
  position: relative;
}

.morning-weather-symbol::before,
.morning-weather-symbol::after {
  content: "";
  position: absolute;
}

.morning-weather-symbol[data-icon="SUN"]::before {
  inset: 12px;
  border-radius: 50%;
  background: #ffb51f;
  box-shadow: 0 0 0 8px rgba(255,207,35,0.22);
}

.morning-weather-symbol[data-icon="CLOUD"]::before,
.morning-weather-symbol[data-icon="RAIN"]::before {
  left: 9px;
  right: 6px;
  bottom: 22px;
  height: 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, #f6fbff, #b8d5ff);
  box-shadow: -6px 2px 0 #cfe0ff, 12px -10px 0 4px #e8f2ff, 24px -2px 0 #9bc0ef;
}

.morning-weather-symbol[data-icon="RAIN"]::after {
  left: 25px;
  bottom: 9px;
  width: 7px;
  height: 17px;
  border-radius: 8px 8px 10px 10px;
  background: #2f6dff;
  transform: rotate(-18deg);
  box-shadow: 15px 4px 0 #2f6dff;
}

.morning-weather-symbol[data-icon="WIND"]::before {
  left: 9px;
  right: 5px;
  top: 24px;
  height: 6px;
  border-radius: 999px;
  background: #1d9e75;
  box-shadow: 0 14px 0 #1d9e75, 16px -14px 0 rgba(29,158,117,0.52);
}

.morning-weather-symbol[data-icon="SEA"]::before {
  left: 7px;
  right: 7px;
  top: 30px;
  height: 8px;
  border-radius: 999px;
  background: #2f8fcf;
  box-shadow: 11px 15px 0 rgba(47,143,207,0.72);
}

.morning-weather-temp {
  color: #050505;
  font-size: clamp(42px, 9vw, 68px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0;
  white-space: nowrap;
}

.morning-weather-condition {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.morning-weather-condition strong {
  color: #050505;
  font-size: clamp(20px, 4.6vw, 33px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0;
}

.morning-weather-condition span {
  color: rgba(17,17,17,0.72);
  font-size: 17px;
  font-weight: 700;
}

.morning-hourly-card {
  padding: 9px 8px 7px;
  border-radius: 8px;
  background: rgba(255,255,255,0.26);
  border: 1px solid rgba(17,17,17,0.07);
  overflow: hidden;
}

.morning-hourly-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 2px;
}

.morning-hourly-head strong {
  color: #111;
  font-size: 12px;
  font-weight: 900;
}

.morning-hourly-head span {
  color: rgba(17,17,17,0.60);
  font-size: 9px;
  font-weight: 800;
}

.morning-hourly-chart {
  display: block;
  width: 100%;
  height: auto;
}

.morning-hourly-area {
  fill: url("#morningChartFill");
  fill: rgba(29,158,117,0.12);
}

.morning-hourly-line {
  fill: none;
  stroke: rgba(29,158,117,0.76);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.morning-hourly-point circle {
  fill: #111;
  stroke: #fff;
  stroke-width: 2;
}

.morning-hourly-temp {
  fill: rgba(17,17,17,0.62);
  font: 800 13px var(--font);
}

.morning-hourly-risk {
  fill: #0876c9;
  font: 900 11px var(--font);
}

.morning-hourly-time {
  fill: rgba(17,17,17,0.70);
  font: 700 11px var(--font);
}

.phone-notification-mock {
  display: grid;
  gap: 4px;
  padding: 10px 11px;
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 8px;
  background: rgba(244,249,247,0.78);
  color: #111;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 8px 18px rgba(0,0,0,0.14);
}

.phone-notification-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(17,17,17,0.56);
  font: 900 9px var(--font-mono);
  letter-spacing: 0.8px;
}

.phone-notification-top em {
  font-style: normal;
}

.phone-notification-mock strong {
  color: #111;
  font-size: 13px;
  font-weight: 900;
}

.phone-notification-mock p,
.phone-notification-mock small {
  margin: 0;
  color: #111;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 700;
}

.phone-notification-mock small {
  color: rgba(17,17,17,0.72);
}

.morning-mini-forecast {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.morning-mini-step {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 0;
  padding: 7px 5px;
  border: 1px solid rgba(17,17,17,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.30);
}

.morning-mini-step i {
  display: block;
  width: 32px;
  height: 28px;
  position: relative;
}

.morning-mini-step i[data-icon="SUN"]::before {
  inset: 7px;
  box-shadow: 0 0 0 4px rgba(255,207,35,0.22);
}

.morning-mini-step i[data-icon="CLOUD"]::before,
.morning-mini-step i[data-icon="RAIN"]::before {
  left: 5px;
  right: 4px;
  bottom: 9px;
  height: 10px;
  box-shadow: -3px 1px 0 #d8e5e1, 5px -4px 0 1px #f8fbfa;
}

.morning-mini-step i[data-icon="RAIN"]::after {
  left: 9px;
  bottom: 2px;
  width: 3px;
  height: 7px;
  box-shadow: 7px 0 0 #3a8fd4, 14px 0 0 #3a8fd4;
}

.morning-mini-step i[data-icon="WIND"]::before {
  left: 4px;
  right: 4px;
  top: 10px;
  height: 3px;
  box-shadow: 0 7px 0 #1d9e75, 7px -7px 0 rgba(29,158,117,0.55);
}

.morning-mini-step i[data-icon="SEA"]::before {
  left: 4px;
  right: 4px;
  top: 11px;
  height: 4px;
  box-shadow: 6px 7px 0 rgba(47,143,207,0.72);
}

.morning-mini-step b {
  color: #111;
  font: 900 9px var(--font-mono);
  letter-spacing: 0.4px;
}

.morning-mini-step.go { border-color: rgba(29,158,117,0.28); }
.morning-mini-step.warn { border-color: rgba(255,207,35,0.44); }
.morning-mini-step.nogo { border-color: rgba(200,50,58,0.34); }

.morning-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.morning-state-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
  min-height: 90px;
  padding: 9px;
  border: 1px solid rgba(17,17,17,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.34);
}

.morning-state-card span,
.morning-state-card strong,
.morning-state-card em {
  display: block;
}

.morning-state-card span {
  color: rgba(17,17,17,0.58);
  font: 900 8px var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.morning-state-card strong {
  margin-top: 3px;
  color: #111;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.15;
}

.morning-state-card em {
  margin-top: 5px;
  color: #111;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.18;
}

.morning-state-card.go { border-color: rgba(29,158,117,0.42); background: rgba(29,158,117,0.16); }
.morning-state-card.warn { border-color: rgba(255,207,35,0.54); background: rgba(255,207,35,0.18); }
.morning-state-card.nogo { border-color: rgba(200,50,58,0.42); background: rgba(200,50,58,0.13); }

.morning-state-card > i {
  position: relative;
  display: block;
  width: 42px;
  height: 42px;
}

.state-bars b {
  position: absolute;
  right: 0;
  height: 6px;
  border-radius: 999px;
  background: #1d9e75;
}

.state-bars b:nth-child(1) { top: 5px; width: 26px; opacity: 0.45; }
.state-bars b:nth-child(2) { top: 15px; width: 32px; opacity: 0.62; }
.state-bars b:nth-child(3) { top: 25px; width: 38px; opacity: 0.78; }
.state-bars b:nth-child(4) { top: 35px; width: 42px; opacity: 1; }
.morning-state-card.warn .state-bars b { background: #d89a00; }
.morning-state-card.nogo .state-bars b { background: #c8323a; }

.state-wind::before,
.state-wind::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 5px;
  border-radius: 999px;
  background: #1d9e75;
}

.state-wind::before {
  top: 12px;
  box-shadow: 10px 11px 0 rgba(29,158,117,0.72);
}

.state-wind::after {
  top: 31px;
  left: 12px;
  opacity: 0.55;
}

.morning-state-card.warn .state-wind::before,
.morning-state-card.warn .state-wind::after { background: #d89a00; box-shadow: 10px 11px 0 rgba(216,154,0,0.60); }
.morning-state-card.nogo .state-wind::before,
.morning-state-card.nogo .state-wind::after { background: #c8323a; box-shadow: 10px 11px 0 rgba(200,50,58,0.55); }

.state-wave::before,
.state-wave::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  height: 8px;
  border: 3px solid #2f8fcf;
  border-top: 0;
  border-radius: 0 0 999px 999px;
}

.state-wave::before { top: 11px; }
.state-wave::after { top: 24px; opacity: 0.68; transform: translateX(8px); }
.morning-state-card.warn .state-wave::before,
.morning-state-card.warn .state-wave::after { border-color: #d89a00; }
.morning-state-card.nogo .state-wave::before,
.morning-state-card.nogo .state-wave::after { border-color: #c8323a; }

.state-ring {
  border-radius: 50%;
  border: 7px solid rgba(17,17,17,0.10);
  border-top-color: #1d9e75;
  border-right-color: #1d9e75;
  transform: rotate(36deg);
}

.morning-state-card.warn .state-ring { border-top-color: #ffcf23; border-right-color: #d89a00; }
.morning-state-card.nogo .state-ring { border-top-color: #c8323a; border-right-color: #c8323a; }

/* Member-only (locked) notification toggle — teaser look, not interactive. */
.brief-mini-toggle.locked {
  border: 1px dashed rgba(17,17,17,0.28);
  background: rgba(17,17,17,0.04);
  cursor: pointer;
  opacity: 0.92;
}
.brief-mini-toggle.locked strong { color: #000; }
.brief-mini-toggle.locked .paid-lock { opacity: 1; }

body.dark .brief-push-row label,
body.dark .brief-push-status { color: #f3f3f3; }
body.dark .brief-push-row input[type="time"] {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  color: #fff;
}
body.dark .brief-mini-toggle.locked { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.25); }
body.dark .brief-mini-toggle.locked strong { color: #f3f3f3; }

.brief-mini-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-height: 34px;
  padding: 5px 6px;
  border: 1px solid rgba(17,17,17,0.10);
  border-radius: 7px;
  background: rgba(255,255,255,0.28);
  cursor: pointer;
}

.brief-mini-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.brief-mini-toggle strong {
  min-width: 0;
  color: var(--text);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.05;
}

.brief-mini-toggle.on {
  border-color: rgba(29,158,117,0.36);
  background: rgba(29,158,117,0.14);
}

.brief-mini-toggle.on .brief-card-toggle {
  background: var(--green-dark);
}

.brief-mini-toggle.on .brief-card-toggle::after {
  transform: translateX(10px);
}

.marine-preview {
  padding: 5px 0 7px;
  margin: 0 -16px 7px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.marine-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px;
  margin-bottom: 5px;
}

.marine-planner-strip {
  display: grid;
  gap: 2px;
  margin: 0 16px 6px;
  padding: 6px 8px;
  border-left: 4px solid rgba(29,158,117,0.75);
  background: rgba(29,158,117,0.12);
}

.marine-planner-strip strong,
.marine-planner-strip span {
  display: block;
}

.marine-planner-strip strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
}

.marine-planner-strip span {
  color: rgba(17,17,17,0.72);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.25;
}

.marine-planner-strip.warn {
  border-left-color: rgba(196,128,16,0.86);
  background: rgba(255,207,35,0.20);
}

.marine-planner-strip.nogo {
  border-left-color: rgba(200,50,58,0.90);
  background: rgba(200,50,58,0.14);
}

.marine-preview-head strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.marine-preview-head > span {
  flex-shrink: 0;
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(29,158,117,0.14);
  color: var(--green-dark);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
}

.marine-preview-toggle,
.marine-range-toggle {
  display: grid;
  gap: 5px;
  margin-bottom: 6px;
  padding: 4px;
  border-radius: 8px;
  background: rgba(10,18,16,0.06);
}

.marine-preview-toggle,
.marine-range-toggle {
  margin-left: 16px;
  margin-right: 16px;
}

.marine-preview-toggle {
  grid-template-columns: 1fr 1fr;
}

.marine-range-toggle {
  grid-template-columns: repeat(3, 1fr);
}

.marine-preview-toggle button,
.marine-range-toggle button {
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  font: 800 11px var(--font-mono);
  cursor: pointer;
}

.marine-preview-toggle button.active,
.marine-range-toggle button.active {
  background: rgba(29,158,117,0.18);
  border-color: rgba(29,158,117,0.32);
  color: var(--green-dark);
}

.marine-strip-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.marine-strip-scroll::-webkit-scrollbar {
  display: none;
}

.marine-strip-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.marine-strip-scroll::-webkit-scrollbar-thumb {
  background: rgba(17,17,17,0.24);
  border-radius: 999px;
}

.marine-grid {
  display: grid;
  gap: 0;
  min-width: max-content;
  padding: 0;
}

.marine-grid-label,
.marine-grid-time,
.marine-grid-cell {
  min-height: 34px;
  border-radius: 0;
  border-right: 1px solid rgba(255,255,255,0.24);
  border-bottom: 1px solid rgba(255,255,255,0.20);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.marine-grid-label {
  justify-content: flex-start;
  padding-left: 8px;
  color: rgba(8,14,13,0.92);
  background:
    linear-gradient(90deg,
      rgba(178,211,208,0.98) 0%,
      rgba(178,211,208,0.98) 82%,
      rgba(178,211,208,0.84) 94%,
      rgba(178,211,208,0.00) 100%);
  position: sticky;
  left: 0;
  z-index: 5;
  box-shadow: 12px 0 18px rgba(178,211,208,0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.marine-grid-time {
  color: var(--text);
  background: rgba(255,255,255,0.40);
}

.marine-grid-cell {
  color: var(--text);
  background: rgba(255,255,255,0.46);
}

.marine-grid-cell.go {
  background: rgba(67, 224, 96, 0.30);
  color: #075c30;
}

.marine-grid-cell.warn {
  background:
    linear-gradient(180deg, rgba(255, 183, 54, 0.52), rgba(224, 126, 26, 0.36));
  color: #3d2400;
  box-shadow: inset 0 0 0 1px rgba(255, 214, 128, 0.42);
}

.marine-grid-cell.nogo {
  background:
    linear-gradient(180deg, rgba(255, 77, 88, 0.60), rgba(172, 24, 42, 0.44));
  color: #fff3f3;
  text-shadow: 0 1px 1px rgba(80,0,12,0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 140, 150, 0.42);
}

.marine-grid-time.marine-day-odd,
.marine-grid-cell.marine-day-odd {
  background-color: rgba(255,255,255,0.18);
}

.marine-grid-time.marine-day-even,
.marine-grid-cell.marine-day-even {
  background-color: rgba(120,205,195,0.10);
}

.marine-grid-time.marine-day-start,
.marine-grid-cell.marine-day-start {
  border-left: 3px solid rgba(255,255,255,0.64);
  box-shadow: inset 2px 0 0 rgba(15,92,88,0.16);
}

.marine-grid-cell.marine-day-start.warn {
  box-shadow:
    inset 2px 0 0 rgba(15,92,88,0.16),
    inset 0 0 0 1px rgba(255, 214, 128, 0.42);
}

.marine-grid-cell.marine-day-start.nogo {
  box-shadow:
    inset 2px 0 0 rgba(15,92,88,0.16),
    inset 0 0 0 1px rgba(255, 140, 150, 0.42);
}

.marine-ops-label,
.marine-status-label {
  color: #493300;
  white-space: normal;
  line-height: 1.05;
  align-items: center;
  padding-right: 6px;
}

.marine-ops-label {
  background: rgba(255,207,35,0.22);
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
}

.marine-ops-label span {
  display: block;
  white-space: nowrap;
}

.marine-graph,
.marine-graph-stack {
  display: grid;
  gap: 10px;
}

.marine-line-wrap {
  min-width: 760px;
  padding-bottom: 2px;
}

.marine-metric-panel {
  min-width: 760px;
  background: rgba(255,255,255,0.22);
  border-top: 1px solid rgba(17,17,17,0.08);
  border-bottom: 1px solid rgba(17,17,17,0.08);
  padding: 7px 0 4px;
}

.marine-metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px 4px;
}

.marine-metric-name {
  display: grid;
  gap: 1px;
  min-width: 0;
  position: sticky;
  left: 0;
  z-index: 3;
  padding: 3px 10px 3px 0;
  background:
    linear-gradient(90deg,
      rgba(178,211,208,0.98) 0%,
      rgba(178,211,208,0.92) 82%,
      rgba(178,211,208,0.00) 100%);
  box-shadow: 12px 0 16px rgba(178,211,208,0.54);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.marine-metric-name strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.marine-metric-name small {
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 800;
}

.marine-metric-max {
  position: sticky;
  right: 0;
  z-index: 2;
  display: grid;
  justify-items: end;
  gap: 1px;
  flex: 0 0 auto;
  padding: 3px 8px;
  border-left: 1px solid rgba(255,255,255,0.34);
  border-radius: 7px 0 0 7px;
  background:
    linear-gradient(90deg, rgba(178,211,208,0), rgba(178,211,208,0.88) 24%, rgba(178,211,208,0.98));
  box-shadow: -10px 0 16px rgba(178,211,208,0.56);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.marine-metric-max em {
  color: var(--text-muted);
  font-style: normal;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.marine-metric-max b {
  color: var(--text);
  font: 900 12px var(--font-mono);
}

.marine-graph-body {
  display: grid;
  grid-template-columns: 64px minmax(560px, 1fr);
  align-items: stretch;
  min-width: 760px;
}

.marine-graph-scale {
  position: sticky;
  left: 0;
  z-index: 4;
  display: grid;
  grid-template-rows: 1fr 1fr 1fr;
  align-items: center;
  height: 146px;
  padding: 7px 7px 29px 8px;
  color: rgba(17,17,17,0.70);
  font: 900 9px var(--font-mono);
  text-align: left;
  background:
    linear-gradient(90deg,
      rgba(178,211,208,0.98) 0%,
      rgba(178,211,208,0.98) 82%,
      rgba(178,211,208,0.84) 94%,
      rgba(178,211,208,0.00) 100%);
  box-shadow: 12px 0 18px rgba(178,211,208,0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.marine-graph-scale span {
  white-space: nowrap;
}

.marine-graph-scale span:first-child {
  align-self: start;
  padding-top: 7px;
}

.marine-graph-scale span:nth-child(2) {
  align-self: center;
}

.marine-graph-scale span:last-child {
  align-self: end;
  padding-bottom: 4px;
}

.marine-line-chart {
  display: block;
  width: 100%;
  min-width: 560px;
  height: auto;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.42), rgba(255,255,255,0.20));
  border: 0;
}

.marine-grid-lines line {
  stroke: rgba(17,17,17,0.12);
  stroke-width: 1;
}

.marine-chart-day-band.even {
  fill: rgba(120,205,195,0.10);
}

.marine-chart-day-band.odd {
  fill: rgba(255,255,255,0.18);
}

.marine-chart-day-start {
  stroke: rgba(255,255,255,0.68);
  stroke-width: 3;
}

.marine-scale-labels text {
  fill: rgba(17,17,17,0.54);
  font: 800 9px var(--font-mono);
}

.marine-line {
  fill: none;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.marine-line.wave { stroke: #177a9c; }
.marine-line.maxhs { stroke: #0d5f84; }
.marine-line.wind { stroke: #0f8f61; }
.marine-line.gust { stroke: #c48010; }
.marine-line.swell { stroke: #5c7bd9; }
.marine-line.temp { stroke: #c8323a; }
.marine-line.visibility { stroke: #6f8a94; }
.marine-line.warn { stroke: #e07e1a; }
.marine-line.nogo { stroke: #c8323a; }

.marine-dot {
  stroke: rgba(255,255,255,0.92);
  stroke-width: 1.3;
}

.marine-dot.wave { fill: #177a9c; }
.marine-dot.maxhs { fill: #0d5f84; }
.marine-dot.wind { fill: #0f8f61; }
.marine-dot.gust { fill: #c48010; }
.marine-dot.swell { fill: #5c7bd9; }
.marine-dot.temp { fill: #c8323a; }
.marine-dot.visibility { fill: #6f8a94; }
.marine-dot.warn { fill: #e07e1a; }
.marine-dot.nogo { fill: #c8323a; }

.marine-axis-label {
  fill: var(--text-muted);
  font: 800 10px var(--font-mono);
}

.brief-metric-picker {
  padding: 6px 8px;
  margin-bottom: 6px;
  border: 1px solid rgba(17,17,17,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.26);
}

.brief-unit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
}

.brief-unit-row > span {
  color: var(--text-muted);
  font: 900 9px var(--font-mono);
}

.brief-unit-group {
  display: grid;
  grid-auto-flow: column;
  gap: 2px;
  padding: 2px;
  border-radius: 6px;
  background: rgba(10,18,16,0.06);
}

.brief-unit-group button {
  min-width: 34px;
  min-height: 24px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--text-muted);
  font: 900 9px var(--font-mono);
  cursor: pointer;
}

.brief-unit-group button.active {
  border-color: rgba(29,158,117,0.34);
  background: rgba(29,158,117,0.18);
  color: var(--green-dark);
}

.brief-metric-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  margin-top: 5px;
}

.brief-metric-row {
  position: relative;
  min-width: 0;
  min-height: 28px;
  border: 1px solid rgba(17,17,17,0.10);
  border-radius: 6px;
  background: rgba(255,255,255,0.32);
  padding: 4px 6px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.brief-metric-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.brief-metric-row span,
.brief-metric-row strong,
.brief-metric-row small {
  display: block;
}

.brief-metric-row span {
  min-width: 0;
}

.brief-metric-row strong {
  color: var(--text-muted);
  font: 900 9px var(--font-mono);
  white-space: nowrap;
}

.brief-metric-row small {
  margin-top: 1px;
  color: rgba(17,17,17,0.55);
  font-size: 9px;
  font-weight: 750;
  line-height: 1.05;
  white-space: nowrap;
}

.brief-metric-row i {
  width: 30px;
  height: 18px;
  border-radius: 999px;
  background: rgba(17,17,17,0.16);
  border: 1px solid rgba(17,17,17,0.12);
}

.brief-metric-row i::after {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  margin: 1px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease;
}

.brief-metric-row.on {
  border-color: rgba(29,158,117,0.36);
  background: rgba(29,158,117,0.16);
}

.brief-metric-row.on strong {
  color: var(--green-dark);
}

.brief-metric-row.on i {
  background: var(--green-dark);
}

.brief-metric-row.on i::after {
  transform: translateX(12px);
}

.marine-graph-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}

.marine-graph-label {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  font: 800 10px var(--font-mono);
  text-transform: uppercase;
}

.marine-graph-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(38px, 1fr));
  gap: 5px;
  min-height: 86px;
  overflow-x: auto;
}

.marine-graph-point {
  min-width: 38px;
  display: grid;
  grid-template-rows: 1fr auto auto;
  justify-items: center;
  gap: 3px;
  padding: 5px 3px;
  border-radius: 7px;
  background: rgba(255,255,255,0.30);
}

.marine-graph-bar {
  align-self: end;
  width: 14px;
  min-height: 12px;
  border-radius: 8px 8px 2px 2px;
  background: rgba(120,130,126,0.42);
}

.marine-graph-bar.go { background: rgba(29,158,117,0.78); }
.marine-graph-bar.warn { background: rgba(196,128,16,0.84); }
.marine-graph-bar.nogo { background: rgba(200,50,58,0.86); }

.marine-graph-point strong {
  color: var(--text);
  font: 800 9px var(--font-mono);
  white-space: nowrap;
}

.marine-graph-point small {
  color: var(--text-muted);
  font: 800 8px var(--font-mono);
  white-space: nowrap;
}

.brief-card {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 10px;
  border: 1px solid rgba(17,17,17,0.09);
  border-radius: 8px;
  background: rgba(255,255,255,0.32);
  cursor: pointer;
}

.brief-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.brief-card-toggle {
  width: 30px;
  height: 20px;
  border-radius: 20px;
  background: rgba(17,17,17,0.16);
  border: 1px solid rgba(17,17,17,0.12);
  margin-top: 1px;
}

.brief-card-toggle::after {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  margin: 1px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease;
}

.brief-card.on {
  border-color: rgba(29,158,117,0.32);
  background: rgba(29,158,117,0.12);
}

.brief-card.on .brief-card-toggle {
  background: var(--green-dark);
}

.brief-card.on .brief-card-toggle::after {
  transform: translateX(10px);
}

.brief-card-copy {
  min-width: 0;
}

.brief-card-copy strong,
.brief-card-copy small,
.brief-card-copy em {
  display: block;
}

.brief-card-copy strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.brief-card-copy small {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.25;
}

.brief-card-copy em {
  margin-top: 7px;
  padding: 7px 8px;
  border-radius: 7px;
  background: rgba(10,18,16,0.06);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 10px;
  font-style: normal;
  line-height: 1.28;
  transition: opacity 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.brief-card:hover .brief-card-copy em {
  transform: translateY(-2px);
  box-shadow: 0 9px 22px rgba(0,0,0,0.14);
}

.brief-card-stack.preview-off .brief-card-copy em {
  display: none;
}

.daily-brief-save {
  flex: 0 0 auto;
  padding: 10px 16px calc(10px + var(--safe-area-bottom));
  background: rgba(234, 240, 236, 0.42);
  border-top: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.daily-brief-save button {
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 8px;
  background: var(--green-dark);
  color: white;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
}

body.dark .brief-hero,
body.dark .brief-platform-box,
body.dark .brief-group,
body.dark .marine-preview,
body.dark .brief-preview-toggle,
body.dark .brief-notification-top,
body.dark .brief-mini-toggle,
body.dark .brief-card,
body.dark .brief-result,
body.dark .brief-search-row input,
body.dark .brief-search-row button {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.13);
}

body.dark .brief-card-copy em {
  background: rgba(255,255,255,0.07);
}

body.dark .marine-planner-strip {
  background: rgba(29,158,117,0.16);
}

body.dark .marine-planner-strip span {
  color: rgba(243,247,244,0.70);
}

body.dark .marine-planner-strip.warn {
  background: rgba(255,207,35,0.13);
}

body.dark .marine-planner-strip.nogo {
  background: rgba(200,50,58,0.14);
}

body.dark .marine-preview-toggle,
body.dark .marine-range-toggle,
body.dark .brief-unit-group,
body.dark .marine-graph-point,
body.dark .brief-metric-picker,
body.dark .brief-metric-row {
  background: rgba(255,255,255,0.07);
}

body.dark .brief-metric-row small {
  color: rgba(243,247,244,0.56);
}

body.dark .marine-line-chart {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
}

body.dark .marine-grid-lines line {
  stroke: rgba(255,255,255,0.14);
}

body.dark .marine-metric-panel {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
}

body.dark .marine-grid-label,
body.dark .marine-graph-scale,
body.dark .marine-metric-name {
  color: rgba(243,247,244,0.90);
  background:
    linear-gradient(90deg,
      rgba(54,82,82,0.98) 0%,
      rgba(54,82,82,0.98) 82%,
      rgba(54,82,82,0.84) 94%,
      rgba(54,82,82,0.00) 100%);
  box-shadow: 12px 0 18px rgba(54,82,82,0.78);
}

@media (max-width: 430px) {
  #detail-panel[data-side-panel="daily-brief"] {
    top: calc(var(--safe-area-top) + 76px) !important;
    right: 0 !important;
    width: 100vw !important;
    max-height: calc(100vh - 86px - var(--safe-area-bottom)) !important;
    border-radius: 0 !important;
  }
}

/* Final weather watch overrides: keep the new scrubber above old weather styles */
.float-row-slider .scrubber-head {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) 34px !important;
  align-items: center !important;
  gap: 8px !important;
  margin-bottom: 6px !important;
}

.float-row-slider .scrub-step-btn {
  width: 34px !important;
  height: 32px !important;
  border-radius: 8px !important;
  padding: 0 !important;
}

.float-row-slider .scrubber-now {
  text-align: center !important;
  white-space: nowrap !important;
}

.weather-watch-panel .readiness-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.weather-watch-panel .readiness-metric small {
  min-height: 18px;
}

/* Light mode readability: keep tool/tab lettering black instead of washed grey. */
body:not(.dark) .modal .modal-close,
body:not(.dark) .modal .member-desc,
body:not(.dark) .modal .zone-feature-desc,
body:not(.dark) .modal .zone-pill-planned,
body:not(.dark) .modal .zone-platform-result span,
body:not(.dark) .modal .zone-platform-hint,
body:not(.dark) .modal .rota-controls label span,
body:not(.dark) .modal .rota-extra-trip label span,
body:not(.dark) .modal .rota-input,
body:not(.dark) .modal .rota-input::placeholder,
body:not(.dark) .modal .rota-trip-actions span,
body:not(.dark) .modal .rota-legend,
body:not(.dark) .modal .rota-weekdays span,
body:not(.dark) .modal .rota-day span,
body:not(.dark) .modal .invoice-form-grid span,
body:not(.dark) .modal .invoice-timesheet-head span,
body:not(.dark) .modal .money-input b,
body:not(.dark) .modal .invoice-add-item-btn,
body:not(.dark) .modal .invoice-extra-row button,
body:not(.dark) .modal .invoice-extra-empty,
body:not(.dark) .modal .invoice-extra-row,
body:not(.dark) .modal .invoice-extra-row strong,
body:not(.dark) .modal .invoice-timesheet-head em,
body:not(.dark) .modal .invoice-file-upload span,
body:not(.dark) .modal .invoice-total-head span,
body:not(.dark) .modal .invoice-total-head strong,
body:not(.dark) .modal .invoice-total-grid span,
body:not(.dark) .modal .invoice-total-grid strong,
body:not(.dark) .modal .invoice-total-grid em,
body:not(.dark) .modal .invoice-attachment-note,
body:not(.dark) .modal .ropes-empty,
body:not(.dark) .modal .ropes-tech-card small,
body:not(.dark) .modal .ropes-hour-head span,
body:not(.dark) .modal .ropes-hour-cell em,
body:not(.dark) #detail-panel[data-side-panel="daily-brief"] .brief-kicker,
body:not(.dark) #detail-panel[data-side-panel="daily-brief"] .brief-group-title,
body:not(.dark) #detail-panel[data-side-panel="daily-brief"] .brief-platform-box label,
body:not(.dark) #detail-panel[data-side-panel="daily-brief"] .brief-result small,
body:not(.dark) #detail-panel[data-side-panel="daily-brief"] .brief-empty,
body:not(.dark) #detail-panel[data-side-panel="daily-brief"] .brief-preview-toggle small,
body:not(.dark) #detail-panel[data-side-panel="daily-brief"] .marine-planner-strip span,
body:not(.dark) #detail-panel[data-side-panel="daily-brief"] .marine-preview-toggle button,
body:not(.dark) #detail-panel[data-side-panel="daily-brief"] .marine-range-toggle button,
body:not(.dark) #detail-panel[data-side-panel="daily-brief"] .marine-metric-name small,
body:not(.dark) #detail-panel[data-side-panel="daily-brief"] .marine-metric-max em,
body:not(.dark) #detail-panel[data-side-panel="daily-brief"] .marine-graph-scale,
body:not(.dark) #detail-panel[data-side-panel="daily-brief"] .brief-unit-row > span,
body:not(.dark) #detail-panel[data-side-panel="daily-brief"] .brief-unit-group button,
body:not(.dark) #detail-panel[data-side-panel="daily-brief"] .brief-metric-row strong,
body:not(.dark) #detail-panel[data-side-panel="daily-brief"] .brief-metric-row small,
body:not(.dark) #detail-panel[data-side-panel="daily-brief"] .marine-graph-label,
body:not(.dark) #detail-panel[data-side-panel="daily-brief"] .marine-graph-point small,
body:not(.dark) #detail-panel[data-side-panel="daily-brief"] .brief-card-copy small {
  color: #111111 !important;
}

body:not(.dark) #detail-panel[data-side-panel="daily-brief"] .marine-axis-label,
body:not(.dark) #detail-panel[data-side-panel="daily-brief"] .marine-scale-labels text {
  fill: #111111 !important;
}

@media (max-width: 420px) {
  .weather-watch-panel .readiness-metrics,
  .weather-watch-panel .weather-watch-forecast {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Paid branch top controls: keep USER ZONE dominant and stop D Brief/search overlap */
.search-pill-top {
  min-height: 40px !important;
  box-sizing: border-box !important;
}

.topbar .topbar-right-stack .landing-btn {
  height: 40px !important;
  min-height: 40px !important;
  box-sizing: border-box !important;
}

@media (max-width: 900px) {
  .search-stack {
    margin-top: 64px !important;
    margin-right: 92px !important;
  }

  .topbar .topbar-right-stack {
    position: absolute !important;
    top: 64px !important;
    right: 12px !important;
    width: 82px !important;
    margin-top: 0 !important;
    align-items: stretch !important;
    gap: 7px !important;
  }

  .topbar .topbar-right-stack .landing-btn {
    width: 82px !important;
    min-width: 82px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 8px !important;
    border: 2px solid #111111 !important;
    border-radius: 10px !important;
    background: #ffcf23 !important;
    color: #111111 !important;
  }

  .topbar .topbar-right-stack #fullscreen-btn,
  .topbar .topbar-right-stack #focus-btn,
  .topbar .topbar-right-stack #routes-btn,
  .topbar .topbar-right-stack #theme-btn {
    align-self: flex-end !important;
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
  }
}

@media (max-width: 600px) {
  .search-stack {
    margin-top: 54px !important;
    margin-right: 0 !important;
    padding-right: 0 !important;
  }

  .topbar .topbar-right-stack {
    top: 116px !important;
    right: 10px !important;
    width: 92px !important;
    align-items: flex-end !important;
    gap: 10px !important;
  }

  .topbar .topbar-right-stack .landing-btn {
    width: 92px !important;
    min-width: 92px !important;
    height: 42px !important;
    min-height: 42px !important;
  }

  .topbar .topbar-right-stack #fullscreen-btn,
  .topbar .topbar-right-stack #focus-btn,
  .topbar .topbar-right-stack #routes-btn,
  .topbar .topbar-right-stack #theme-btn {
    width: 46px !important;
    min-width: 46px !important;
    height: 46px !important;
    min-height: 46px !important;
  }

  .side-tab-stack-right {
    top: calc(var(--safe-area-top) + 250px) !important;
  }
}

/* ════════════════════════════════════════════════════════════════════════ */
/*  Top weather panel rework — legend + forecast slider moved to the TOP as a */
/*  stacked group, off the mid-map; unified "slightly whitish" glass matching */
/*  the .float-cond tiles (rgba(255,255,255,0.16)).                            */
/* ════════════════════════════════════════════════════════════════════════ */
.layer-map-legend,
.layer-map-legend.layer-legend-compact {
  top: calc(var(--safe-area-top, 0px) + 118px) !important;   /* below the chrome */
  bottom: auto !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%);
  width: min(340px, 90vw);
  align-items: stretch !important;
  background: rgba(255,255,255,0.16) !important;
  border: 1px solid rgba(255,255,255,0.22) !important;
  backdrop-filter: blur(11px) saturate(1.05) !important;
  -webkit-backdrop-filter: blur(11px) saturate(1.05) !important;
  border-radius: 12px !important;
  padding: 7px 12px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.20) !important;
}
/* Black text everywhere (like the rest of the app), no white fonts */
.layer-map-legend .layer-map-title,
.layer-map-legend .layer-map-sub,
.layer-map-legend .layer-map-rows,
.layer-map-legend .layer-map-row,
.layer-map-legend .layer-map-row span {
  color: #16201b !important;
  text-shadow: none !important;
}
/* Forecast timeline is docked at the BOTTOM now (see base .map-time-slider rule). These
   !important anchors hold it there over any legacy top-positioning + the focus-mode shifts;
   the dark-glass-bar styling lives in the base rule above. */
.map-time-slider {
  top: auto !important;
  bottom: calc(var(--safe-area-bottom, 0px) + 60px) !important;
  left: 12px !important;
  right: 12px !important;
  transform: none !important;
  width: auto !important;
}

/* Focus / clean view — login chip + chrome hidden, so the bar drops closer to the edge. */
body.focus-mode .map-time-slider {
  top: auto !important;
  bottom: calc(var(--safe-area-bottom, 0px) + 16px) !important;
}
body.focus-mode .layer-map-legend { top: calc(var(--safe-area-top, 0px) + 54px) !important; }
body.focus-mode.map-slider-on .layer-map-legend { top: calc(var(--safe-area-top, 0px) + 108px) !important; }

/* ── Legend floats in the BOTTOM-RIGHT corner again (the top-centre panel ate too much ── */
/* room). Overrides the top-panel rework above + all its top/focus/slider variants.      */
/* Bottom-right clears the top-right button stack AND the right-edge vertical tab stack    */
/* (Layers/Safety/News). Compact, anchored to the corner.                                 */
/* Bare floating colour chips, bottom-LEFT (clears the left vertical tab + attribution). */
.layer-map-legend,
.layer-map-legend.layer-legend-compact,
body.map-slider-on .layer-map-legend {
  left: 4px !important;             /* flush to the left edge — sits UNDER the Explore tab, not beside it */
  right: auto !important;
  top: calc(var(--safe-area-top, 0px) + 372px) !important;  /* tucked directly under the left Explore tab (ends ~367px), off the central map */
  bottom: auto !important;
  transform: none !important;
  width: auto !important;
  max-width: 160px;
  align-items: flex-start !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
}
/* Black numbers, bare colour swatches (no white framing). A faint halo only for legibility. */
.layer-map-legend .layer-map-title,
.layer-map-legend .layer-map-row span:last-child {
  color: #000 !important;
  text-shadow: 0 1px 1px rgba(255,255,255,0.45) !important;
}
.layer-map-legend .layer-map-swatch {
  box-shadow: none !important;
  border: none !important;
}
/* Focus control bar — same whitish glass, black text, muted-green active */
body.focus-mode .focus-bar {
  background: rgba(255,255,255,0.16) !important;
  border: 1px solid rgba(255,255,255,0.22) !important;
}
body.focus-mode .focus-bar .focus-chip { color: #16201b !important; text-shadow: none !important; }
body.focus-mode .focus-bar .focus-chip.active { background: #0c7a44 !important; color: #fff !important; }
