/* Sky Watch layout, shared by both pages: an info bar across the top, a layer bar across the bottom.
   Loaded after each page's own styles, so these rules win. */
#top { top: 0; left: 0; right: 0; max-width: none; border-radius: 0; border-width: 0 0 1px; padding: 10px 16px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
#top > * { margin: 0 !important; }
#top h1 { white-space: nowrap; }
#status { min-width: 0; }      /* the live line wraps at narrow widths; it must never push the page sideways */
#chips { flex: 1 1 100%; }

#bottom { left: 0; right: 0; bottom: 0; border-radius: 0; border-width: 1px 0 0; display: flex; align-items: stretch; padding: 0; }
#listen { position: static; transform: none; flex: none; border: 0; border-right: 1px solid var(--bar-line, rgba(120, 160, 210, .25)); border-radius: 0; box-shadow: none; }
#listen button { padding: 10px 18px !important; }
#legend { position: static; flex: 1; min-width: 0; display: flex; align-items: center; gap: 2px; overflow-x: auto; padding: 6px 10px;
  white-space: nowrap; scrollbar-width: thin; }
#legend button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; flex: none;
  font-size: 14px; border-radius: var(--chip-radius, 8px); color: var(--text, #e8eef7); }
#legend button:hover { background: rgba(255, 255, 255, .1); }
#legend button:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
#legend button[aria-pressed="false"] { opacity: .4; text-decoration: line-through; }
#legend .sep { width: 1px; align-self: stretch; margin: 4px 5px; flex: none; background: var(--bar-line, rgba(120, 160, 210, .25)); }
/* two stacked rows: aircraft on top, everything else underneath. Each row scrolls sideways only if it has to. */
#legend { flex-direction: column; align-items: stretch; justify-content: center; gap: 0; padding: 4px 10px; overflow-x: auto; }
#legend .row { display: flex; align-items: center; gap: 2px; flex: none; }
#legend button { padding: 5px 10px; }
#legend .hint { flex: none; padding: 0 10px 0 4px; font-size: 13px; opacity: .65; }

#card { top: calc(var(--topbar, 64px) + 10px); max-height: calc(100vh - var(--topbar, 64px) - var(--botbar, 56px) - 20px); }
#menu { left: 10px; transform: none; bottom: calc(var(--botbar, 56px) + 8px); max-height: calc(100vh - var(--topbar, 64px) - var(--botbar, 56px) - 20px); }
.leaflet-bottom { bottom: var(--botbar, 56px); }

@media (max-width: 700px) {
  #top { padding: 8px 12px; gap: 4px 12px; }
  #top h1 { font-size: 18px !important; }
  #status { white-space: normal; font-size: 13px !important; }
  #legend { display: flex !important; flex-direction: row; align-items: center; padding: 6px 10px; }
  #legend .row + .row { border-left: 1px solid var(--bar-line, rgba(120, 160, 210, .25)); margin-left: 5px; padding-left: 5px; }
  .leaflet-control-zoom { display: none; }
  #card { top: auto; bottom: var(--botbar, 56px); max-height: 58vh; }
  #listen button { padding: 8px 12px !important; font-size: 16px !important; }
  #listen small { display: none !important; }
}

/* full-width bars: no corner brackets poking past the screen edge */
#top::before, #top::after, #bottom::before, #bottom::after { display: none; }
