/* Ísvaki additions on top of the shared base style */
:root { --accent: #f18a59; --accent-2: #f7a35c; --quake-new: #ff5a4f; --quake-old: #f2c14e; }
:root[data-theme="light"] { --accent: #c2501a; --accent-2: #e76624; }
.hdr-buttons button { min-width: 34px; }
#btn-tv { padding: 0 10px; }

.rtxt { flex: 1; min-width: 0; }
#win-title, #win-sub, #wx-title, #wx-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#wx-title { font-size: 15px; font-weight: 650; }
#wx-sub { font-size: 11.5px; }
.seg.mode button { padding: 4px 9px; font-size: 11.5px; }
#btn-play { background: var(--accent); }

#qtrack { position: relative; height: 74px; margin: 12px 26px 0; outline: none; touch-action: none; user-select: none; cursor: pointer; }
#hist { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 50px; }
#qtrack .qfill { position: absolute; top: 0; height: 50px; left: 0; background: rgba(255,255,255,.05); border-right: 0; pointer-events: none; }
:root[data-theme="light"] #qtrack .qfill { background: rgba(0,0,0,.05); }
#qtrack .handle { position: absolute; top: 0; height: 56px; width: 2px; margin-left: -1px; background: var(--text); }
#qtrack .handle::after { content: ""; position: absolute; left: -6px; top: 50px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.4); }
#qtrack .bubble { position: absolute; bottom: 60px; left: 50%; transform: translateX(-50%); background: var(--surface-solid); border: 1px solid var(--line); color: var(--text); font-size: 11px; font-weight: 650; padding: 2px 7px; border-radius: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; pointer-events: none; }
#qtrack .ticks { position: absolute; left: 0; right: 0; top: 58px; height: 14px; }
#qtrack .ticks span { position: absolute; transform: translateX(-50%); font-size: 10.5px; color: var(--text-2); font-weight: 600; white-space: nowrap; }
#qtrack .ticks span.now { color: var(--text); }

.mk.volc { width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 14px solid #8a94a6; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); cursor: pointer; }
.mk.volc.elevated { border-bottom-color: var(--warning); }
.mk.volc.high { border-bottom-color: var(--critical); animation: vpulse 1.6s infinite; }
@keyframes vpulse { 50% { filter: drop-shadow(0 0 6px rgba(220,60,61,.9)); } }
.mk.inc { font-size: 15px; cursor: pointer; filter: drop-shadow(0 1px 2px rgba(0,0,0,.7)); }
.mk.plane { font-size: 15px; color: #cfd8e6; text-shadow: 0 1px 2px rgba(0,0,0,.8); cursor: pointer; line-height: 1; }
:root[data-theme="light"] .mk.plane { color: #3a4150; text-shadow: none; }

.badge.yellow { background: var(--warning); }
.badge.orange { background: var(--serious); }
.badge.red { background: var(--critical); color: #fff; }
.badge.quiet { background: var(--surface-2); color: var(--text-2); }
.badge.elevated { background: var(--warning); }
.badge.high { background: var(--critical); color: #fff; }

.legend-row { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 11px; color: var(--text-2); margin: 4px 0 8px; }
.legend-row i { display: inline-block; width: 18px; height: 4px; border-radius: 2px; vertical-align: middle; margin-right: 4px; }
.cams img { width: 100%; border-radius: 8px; margin-top: 6px; display: block; background: var(--surface-2); min-height: 60px; }
.cams .cap { font-size: 11px; color: var(--text-2); margin-top: 2px; }
.aurora-bar { display: flex; gap: 2px; align-items: flex-end; height: 34px; margin-top: 6px; }
.aurora-bar div { flex: 1; background: #6ad7a8; border-radius: 2px 2px 0 0; min-height: 2px; }

@media (max-width: 760px) {
  #qtrack { height: 66px; }
  .seg.mode button { padding: 4px 6px; }
}

body.zoomed-out .mk.inc.minor { display: none !important; }

#particles { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.ltabs { display: flex; gap: 4px; margin: -2px 0 8px; }
.ltabs button { background: none; border: 0; padding: 4px 10px; border-radius: 7px; font-size: 12px; font-weight: 650; color: var(--text-2); }
.ltabs button.active { background: var(--surface-2); color: var(--text); }
#pane-weather[hidden], #pane-quakes[hidden] { display: none; }
#wx-play { width: 34px; height: 34px; border-radius: 50%; border: 0; background: #5ad1c4; color: #0d0f14; font-size: 13px; flex: none; }
#wtrack { position: relative; height: 44px; margin: 22px 26px 0; outline: none; touch-action: none; user-select: none; cursor: pointer; }
#wtrack .rail { position: absolute; left: 0; right: 0; top: 10px; height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
#wtrack .fill { position: absolute; top: 0; bottom: 0; left: 0; background: linear-gradient(90deg, #5ad1c4, #7fb0e6); }
#wtrack .handle { position: absolute; top: 4px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: #5ad1c4; border: 2.5px solid #fff; box-shadow: 0 1px 6px rgba(0,0,0,.4); }
#wtrack .bubble { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--surface-solid); border: 1px solid var(--line); color: var(--text); font-size: 11px; font-weight: 650; padding: 2px 7px; border-radius: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; pointer-events: none; }
#wtrack .ticks { position: absolute; left: 0; right: 0; top: 24px; height: 14px; }
#wtrack .ticks span { position: absolute; transform: translateX(-50%); font-size: 10.5px; color: var(--text-2); font-weight: 600; white-space: nowrap; }
#wtrack .ticks span.now { color: var(--text); }
#wtrack .ticks span.day { color: var(--text); }
.wlegend { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 10.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.wlegend .bar { flex: 1; height: 8px; border-radius: 4px; }
.wlegend .col { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.wlegend .ticks { position: relative; height: 12px; }
.wlegend .ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.wlegend .chips { display: flex; gap: 8px; }
.wlegend .chips i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; margin-right: 3px; }
.wxchart { width: 100%; height: 96px; display: block; margin-top: 6px; overflow: visible; }
.wxchart text { fill: var(--text-2); font-size: 9.5px; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { #wxl-seg button { padding: 4px 5px; font-size: 10.5px; } }

/* bottom panel: fixed height whichever tab is open; collapsible */
.pane { height: 132px; overflow: hidden; }
.ltabs .lclose { margin-left: auto; color: var(--text-2); font-size: 13px; padding: 4px 8px; }
.ltabs .lclose:hover { color: var(--text); background: var(--surface-2); }
#lever.collapsed { width: auto !important; padding: 6px 8px; }
#lever.collapsed .ltabs { margin: 0; }
#lever.collapsed .lclose { display: none; }
@media (max-width: 760px) { .pane { height: 124px; } }

#wxl-seg button { padding: 4px 7px; font-size: 11px; }
.haz-expired { color: var(--serious); }

/* IMO aviation colour codes */
.mk.volc.code-green, .mk.volc.code-none { border-bottom-color: #8a94a6; }
.mk.volc.code-yellow { border-bottom-color: #f2c14e; }
.mk.volc.code-orange { border-bottom-color: #f18a59; }
.mk.volc.code-red { border-bottom-color: #dc3c3d; }
.mk.volc.pulse { animation: vpulse 1.6s infinite; }
.badge.code-green { background: #3f9b5a; color: #fff; }
.badge.code-yellow { background: #f2c14e; color: #111; }
.badge.code-orange { background: #f18a59; color: #111; }
.badge.code-red { background: #dc3c3d; color: #fff; }
.badge.avalanche { background: #b9d7f2; color: #0d1b2a; }
.mk.plane.cg { color: #ff6b5a; font-size: 17px; text-shadow: 0 0 6px rgba(255,107,90,.7), 0 1px 2px rgba(0,0,0,.8); }
.avl-links { font-size: 11.5px; margin: 2px 0 8px 26px; }
#volc td.n, #volc th.n { white-space: nowrap; }
#btn-clean { padding: 0 10px; }
#btn-clean.on { background: var(--accent); color: #111; border-color: transparent; }
.seg.views { margin-bottom: 6px; }
.seg.views button { font-size: 11.5px; padding: 4px 8px; }
.badge.open { background: #3fbf7f; color: #062b18; }
.wlegend .col .bar, .wlegend .col .ticks { flex: none; }

/* Iceland clock: quiet, top-right next to the zoom buttons */
#clock { position: absolute; top: 12px; right: 56px; z-index: 5; display: flex; flex-direction: column; align-items: flex-end; gap: 1px;
  background: color-mix(in srgb, var(--surface-solid) 55%, transparent); backdrop-filter: blur(4px); border: 0; border-radius: 8px; padding: 4px 8px; color: var(--text-2); font-variant-numeric: tabular-nums; cursor: pointer; line-height: 1.15; }
#clock b { font-size: 15px; font-weight: 650; color: var(--text); letter-spacing: .3px; }
#clock span { font-size: 10.5px; opacity: .85; }
#clock .sun { opacity: .7; }
#clock:hover span { opacity: 1; }
@media (max-width: 760px) { #clock { top: auto; bottom: 168px; right: 10px; } #clock .sun { display: none; } }

/* language menu (replaces the old Tour button) */
#lang { height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 12px; padding: 0 6px; max-width: 118px; }
/* right-to-left languages: text flows RTL in panels and popups, the map stays as is */
body.rtl #panel, body.rtl .pop, body.rtl #lever .rtxt, body.rtl #brand .sub { direction: rtl; text-align: right; }
body.rtl .tog input { margin-left: 8px; margin-right: 0; }

/* aircraft: bigger icon + small data tag with a close button */
.mk.plane { font-size: inherit; color: #e8eef8; text-shadow: none; display: flex; align-items: center; gap: 4px; }
.mk.plane .pico { width: 26px; height: 26px; display: grid; place-items: center; filter: drop-shadow(0 1px 2px rgba(0,0,0,.7)); font-size: 22px; }
.mk.plane .pico svg { transition: transform .6s; }
.mk.plane.cg { color: #ff6b5a; }
.mk.plane.cg .pico { filter: drop-shadow(0 0 5px rgba(255,107,90,.8)); }
.mk.plane .ptag { position: absolute; left: 30px; top: 50%; transform: translateY(-50%); display: flex; align-items: flex-start; gap: 4px;
  background: color-mix(in srgb, var(--surface-solid) 82%, transparent); border: 1px solid var(--line); border-radius: 6px; padding: 2px 4px 2px 6px;
  font-size: 10.5px; line-height: 1.25; color: var(--text); white-space: nowrap; box-shadow: 0 1px 4px rgba(0,0,0,.35); font-variant-numeric: tabular-nums; }
.mk.plane .ptag[hidden] { display: none; }
.mk.plane .ptag .pt { display: flex; flex-direction: column; }
.mk.plane .ptag .pt span { color: var(--text-2); }
.mk.plane .ptag .px { background: none; border: 0; color: var(--text-2); font-size: 12px; line-height: 1; padding: 0 1px; cursor: pointer; }
.mk.plane .ptag .px:hover { color: var(--text); }
:root[data-theme="light"] .mk.plane { color: #2b3445; }

/* show full text instead of cutting it off with "…" */
.tile .s { white-space: normal; overflow: visible; text-overflow: clip; }
#wx-title, #wx-sub, #win-title, #win-sub { white-space: normal; overflow: visible; text-overflow: clip; }
#wx-sub, #win-sub { font-size: 11px; line-height: 1.3; }
.pane { height: 150px; }
@media (max-width: 760px) { .pane { height: 150px; } }

/* bottom panel: both panes share one grid cell, so the box is as tall as the taller pane (never cut off) and
   doesn't change size when switching between Weather and Earthquakes */
#lever:not(.collapsed) { display: grid; grid-template-columns: minmax(0, 1fr); }
#lever .ltabs { grid-row: 1; grid-column: 1; }
#lever .pane { grid-row: 2; grid-column: 1; height: auto !important; overflow: visible; }
#lever:not(.collapsed) #pane-weather[hidden], #lever:not(.collapsed) #pane-quakes[hidden] { display: block; visibility: hidden; pointer-events: none; }
#lever.collapsed .pane { display: none !important; }
/* earthquake timeline: room for the "Now" bubble above, tick labels below the handle */
#qtrack { height: 84px; margin-top: 26px; }
#qtrack .ticks { top: 68px; }
@media (max-width: 760px) { #qtrack { height: 80px; } }

/* temperature pills at towns (Temp layer) */
.towntemp { display: flex; align-items: baseline; gap: 4px; padding: 1px 6px 1px 5px; border-radius: 9px; border: 1.5px solid #888;
  background: rgba(10,13,20,.86); color: #f2f5fa; font-size: 10.5px; line-height: 1.35; white-space: nowrap; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.5); }
.towntemp b { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.towntemp span { color: #b8c2d2; }

/* Travel tab */
.tabs button { padding-left: 6px; padding-right: 6px; }
#apt-tbl td { padding: 4px 4px; font-size: 12px; }
#apt-tbl .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
#road-q { width: 100%; box-sizing: border-box; margin: 6px 0; padding: 6px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 12.5px; }
.roadlist { list-style: none; margin: 0; padding: 0; }
.roadlist li { display: flex; gap: 8px; align-items: flex-start; padding: 6px 2px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 12.5px; }
.roadlist li:hover { background: var(--surface-2); }
.roadlist li i { flex: none; width: 10px; height: 10px; border-radius: 3px; margin-top: 3px; }
.roadlist .rn small { display: block; color: var(--text-2); font-size: 11px; }
.roadlist li.empty { cursor: default; color: var(--text-2); }
.aptl { list-style: none; margin: 2px 0 6px; padding: 0; font-size: 11.5px; max-height: 120px; overflow: auto; }
.aptl li { padding: 2px 0; cursor: pointer; } .aptl li.muted { cursor: default; }
code.raw { font-size: 10.5px; white-space: pre-wrap; word-break: break-word; display: block; margin-top: 3px; color: var(--text-2); }
#roadf-seg button.good.active { background: #2fb36b; color: #062b18; }
.roadlist .rnum { display: inline-block; min-width: 18px; text-align: center; font-size: 10.5px; padding: 0 4px; margin-right: 5px; border-radius: 4px; background: #e8eef8; color: #0d1b2a; }

/* bottom panel: a bit wider, and always room for a two-line subtitle so the box never changes height */
#lever { width: min(860px, calc(100vw - 390px)); }
body.panel-hidden #lever { width: min(860px, calc(100vw - 32px)); }
#wx-sub, #win-sub { min-height: 2.6em; }

/* airport flight boards */
.board { list-style: none; margin: 2px 0 6px; padding: 0; font-size: 11.5px; }
.board .brow { display: grid; grid-template-columns: 62px 1fr auto; gap: 6px; align-items: baseline; padding: 3px 0; border-bottom: 1px solid var(--line); }
.board .bt { font-variant-numeric: tabular-nums; } .board .bt s { color: var(--text-2); font-size: 10.5px; }
.board .bf small { display: block; color: var(--text-2); font-size: 10.5px; }
.board .bs { font-size: 10.5px; font-weight: 650; white-space: nowrap; }
.board .cnl .bf b { text-decoration: line-through; }
/* long popups (airport boards) scroll inside instead of being cut off */
.maplibregl-popup-content { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; } /* the popup box itself is the one scroller */

/* aircraft colours by kind */
.mk.plane.k-pax { color: #cfe3ff; }
.mk.plane.k-cargo { color: #ffb547; }
.mk.plane.k-other { color: #8e97a6; }
.mk.plane.k-cg { color: #ff4d3d; }
.mk.plane.k-cg .pico { filter: drop-shadow(0 0 6px rgba(255,77,61,.95)) drop-shadow(0 1px 2px rgba(0,0,0,.7)); }
.mk.plane.k-cg .ptag { border-color: #ff4d3d; }
:root[data-theme="light"] .mk.plane.k-pax { color: #2b4f86; }
:root[data-theme="light"] .mk.plane.k-other { color: #5a6270; }
.cgon { color: #ff7a6b !important; font-weight: 650; }
#cg-list li { cursor: default; } #cg-list li[data-hex] { cursor: pointer; }

/* tremor plot in volcano popups */
.trem img { display: block; width: 100%; height: auto; border-radius: 6px; margin: 4px 0 3px; background: #fff; }
.trem-st { display: inline-flex; gap: 4px; margin-left: 6px; flex-wrap: wrap; }
.trem-st button { font: inherit; font-size: 10.5px; padding: 1px 6px; border-radius: 9px; border: 1px solid var(--line); background: none; color: var(--text-2); cursor: pointer; }
.trem-st button.active { background: var(--accent, #f18a59); border-color: transparent; color: #111; }
.trem-note { line-height: 1.35; }

/* Terms of use: notice, (i) box link and the window */
.tou-attr a, #tou-src a, #tou-note a { color: var(--accent-2); font-weight: 600; }
#tou-note { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 10px;
  background: var(--surface-solid); color: var(--text, #e6edf3); border: 1px solid var(--line, #2a313c); border-radius: 10px;
  padding: 7px 8px 7px 14px; font-size: 12.5px; box-shadow: 0 6px 22px rgba(0,0,0,.35); max-width: min(560px, calc(100vw - 24px)); }
#tou-note button { font: inherit; font-weight: 650; border: 0; border-radius: 7px; padding: 4px 12px; background: var(--accent); color: #fff; cursor: pointer; white-space: nowrap; }
@media (max-width: 760px) { #tou-note { top: auto; bottom: 12px; } }
#tou-dlg { width: min(780px, calc(100vw - 24px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--line, #2a313c); border-radius: 14px;
  background: var(--surface-solid); color: var(--text, #e6edf3); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
#tou-dlg::backdrop { background: rgba(0,0,0,.55); }
#tou-dlg .tou-body { padding: 22px 26px 26px; overflow-y: auto; max-height: calc(100vh - 50px); font-size: 14px; line-height: 1.55; }
#tou-dlg .tou-body h1 { font-size: 22px; margin: 0 0 4px; } #tou-dlg .tou-body h2 { font-size: 15.5px; margin: 22px 0 6px; } #tou-dlg .tou-body h3 { font-size: 14px; margin: 14px 0 4px; }
#tou-dlg .tou-body .meta, #tou-dlg .tou-body .muted { color: var(--text-2, #9aa4b2); font-size: 12.5px; }
#tou-dlg .tou-body .box { border: 1px solid var(--line, #2a313c); border-left: 4px solid var(--accent, #f18a59); border-radius: 8px; padding: 8px 12px; margin: 12px 0; }
#tou-dlg .tou-body .caps { text-transform: uppercase; font-size: 12.5px; }
#tou-dlg .tou-body table { border-collapse: collapse; width: 100%; font-size: 13px; } #tou-dlg .tou-body td, #tou-dlg .tou-body th { border-bottom: 1px solid var(--line, #2a313c); padding: 5px; text-align: left; vertical-align: top; }
#tou-dlg .tou-body nav.toc { columns: 2; font-size: 13px; } #tou-dlg .tou-body nav.toc a { display: block; color: var(--text-2, #9aa4b2); }
#tou-dlg .tou-x { position: sticky; top: 8px; float: right; margin: 8px 10px 0 0; background: none; border: 0; color: var(--text-2, #9aa4b2); font-size: 22px; cursor: pointer; z-index: 2; }
:root[data-theme="light"] #tou-dlg { background: #fff; color: #1f2328; }
:root[data-theme="light"] #tou-note { background: rgba(255,255,255,.96); color: #1f2328; }
/* (i) box: stay in the free corner right of the bottom panel (text wraps upward); above the panel if there's no room */
.maplibregl-ctrl-bottom-right { z-index: 6; }
.maplibregl-ctrl-attrib.maplibregl-compact-show { max-width: max(230px, calc((100vw - 860px) / 2 - 24px)); }
.maplibregl-ctrl-attrib .tou-attr { display: block; margin-bottom: 2px; }
.maplibregl-ctrl-attrib .tou-attr { color: var(--text-2); }

/* pool hours from sundlaugar.is */
.slweek { border-collapse: collapse; margin: 2px 0 4px; } .slweek td { padding: 1px 10px 1px 0; font-variant-numeric: tabular-nums; } .slweek tr.today td { font-weight: 700; }
.sltext summary { cursor: pointer; color: var(--accent-2); margin: 4px 0; } .sltext div { color: var(--text-2); line-height: 1.4; }

/* =====================================================================
   Phones (≤ 760 px): one big menu button, menu and bottom panel take turns
   ===================================================================== */
#m-tools { display: none; }
@media (max-width: 760px) {
  /* header: name + live status on the left, one large menu button on the right */
  #brand { top: max(8px, env(safe-area-inset-top)); left: 8px; right: 8px; padding: 6px 6px 6px 12px; gap: 8px; }
  #brand .logo { min-width: 0; flex: 1; }
  #brand .logo .sub { max-width: none; }
  .hdr-buttons { flex: none; }
  #btn-panel { width: 44px; height: 44px; min-width: 44px; font-size: 21px; border-radius: 12px; display: grid; place-items: center; padding: 0; }
  body:not(.panel-hidden) #btn-panel { background: var(--accent); color: #fff; border-color: transparent; }

  /* the menu: a tall bottom sheet; language / Clear / map style at its top */
  #panel { height: min(72dvh, calc(100dvh - 92px)); padding-bottom: env(safe-area-inset-bottom); z-index: 7; }
  #m-tools { display: flex; gap: 6px; align-items: center; padding: 10px 12px 2px; }
  #m-tools #lang { flex: 1; min-width: 0; height: 38px; font-size: 15px; }
  #m-tools button { height: 38px; min-width: 44px; padding: 0 12px; font-size: 14px; }
  #panel .tabs button { padding: 9px 4px; font-size: 13.5px; }

  /* never both: while the menu is open the bottom panel steps aside */
  body:not(.panel-hidden) #lever { display: none; }
  #lever { bottom: calc(6px + env(safe-area-inset-bottom)) !important; padding: 6px 10px 8px; }
  .ltabs { margin: 0 0 4px; }
  .ltabs button { padding: 8px 12px; font-size: 13.5px; }
  .ltabs .lclose { margin-left: auto; width: 40px; height: 36px; font-size: 16px; }

  /* weather / quake readout restacked for a narrow screen */
  .pane { height: auto !important; }
  #pane-weather .readout, #pane-quakes .readout { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; }
  #wx-play, #btn-play { grid-row: 1 / span 2; width: 38px; height: 38px; }
  .rtxt { min-width: 0; }
  #wx-title, #win-title { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 0 !important; }
  #wx-sub, #win-sub { min-height: 0 !important; font-size: 11.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  #wxl-seg, #mag-seg { grid-column: 1 / -1; display: flex; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin-top: 6px; gap: 4px; }
  #wxl-seg::-webkit-scrollbar, #mag-seg::-webkit-scrollbar { display: none; }
  #wxl-seg button, #mag-seg button { flex: none; padding: 7px 11px; font-size: 13px; white-space: nowrap; }
  #wtrack { margin: 18px 14px 0; }
  .wlegend { margin-top: 2px; }

  /* clutter off: pinch to zoom, no clock / scale over the panel; (i) box tucked under the locate button */
  .maplibregl-ctrl-top-right { top: calc(max(8px, env(safe-area-inset-top)) + 66px); }
  .maplibregl-ctrl-zoom-in, .maplibregl-ctrl-zoom-out { display: none !important; }
  .maplibregl-ctrl-scale { display: none; }
  #clock { display: none !important; }
  .maplibregl-ctrl-bottom-right { top: calc(max(8px, env(safe-area-inset-top)) + 116px); bottom: auto; }
  .maplibregl-ctrl-attrib.maplibregl-compact-show { max-width: calc(100vw - 24px); }

  /* popups: a little wider, comfortable to tap */
  .maplibregl-popup { max-width: calc(100vw - 20px) !important; }
}
@media (max-width: 760px) {
  #m-tools button, #m-tools select { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 9px; font: inherit; font-size: 14px; }
  #m-tools button.on { background: var(--accent); color: #fff; border-color: transparent; }
  #wtrack { margin-top: 30px; }
}

/* Terms line + (i): always-visible line beside the (i) on wide screens; on phones only the (i), which shows both */
.tou-ctl { display: flex; align-items: flex-end; gap: 6px; background: none !important; box-shadow: none !important; margin: 0 10px 10px 0 !important; }
.tou-ctl .maplibregl-ctrl-attrib { margin: 0 !important; }
.tou-line { font-size: 11px; line-height: 1.35; color: var(--text-2); background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 4px 9px; max-width: max(170px, calc((100vw - 860px) / 2 - 60px)); backdrop-filter: blur(6px); }
.tou-line a { color: var(--accent-2); font-weight: 600; }
.maplibregl-ctrl-attrib .tou-attr { display: none !important; }
@media (max-width: 760px) {
  .tou-line { display: none; }
  .maplibregl-ctrl-attrib .tou-attr { display: block !important; margin-bottom: 3px; }
  .tou-ctl { margin: 0 10px 0 0 !important; }
}
.tou-line { font-size: 10.5px; white-space: nowrap; max-width: none; padding: 4px 8px; }
@media (max-width: 1240px) { .tou-line { white-space: normal; max-width: max(170px, calc((100vw - 860px) / 2 - 44px)); } }
.maplibregl-ctrl-attrib-inner, .maplibregl-ctrl-attrib-inner * { color: var(--text-2); }
.maplibregl-ctrl-attrib-inner a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line); }
.maplibregl-ctrl-attrib-inner .tou-attr a { color: var(--accent-2); text-decoration: none; }
.maplibregl-ctrl-attrib.maplibregl-compact-show { max-width: 360px; }
@media (max-width: 760px) { .maplibregl-ctrl-attrib.maplibregl-compact-show { max-width: calc(100vw - 70px); } }

.badge.upcoming { background: transparent; border: 1px dashed currentColor; color: var(--text-2); }

/* travel-weather town cards: symbol, temperature, wind, rain/snow; coloured edge = travel score */
.wxcard { display: grid; gap: 1px; padding: 3px 7px 3px 8px; min-width: 58px; border-radius: 9px; cursor: pointer;
  background: rgba(16, 19, 25, .9); color: #eef2f7; border: 1px solid rgba(255,255,255,.12); border-left: 4px solid var(--sc, #888);
  box-shadow: 0 2px 8px rgba(0,0,0,.45); font-size: 11px; line-height: 1.15; font-variant-numeric: tabular-nums; pointer-events: auto; }
.wxcard .top { display: flex; align-items: center; gap: 4px; }
.wxcard .tmp { font-size: 14.5px; font-weight: 700; }
.wxcard .wnd { display: flex; align-items: center; gap: 3px; color: #cfe3ff; }
.wxcard .wnd svg { flex: none; transition: transform .4s; }
.wxcard .wnd small { opacity: .75; font-size: 9.5px; margin-left: 1px; }
.wxcard .wnd.hi { color: #ffb08a; font-weight: 700; }
.wxcard .pr { color: #8fc3ff; font-size: 10.5px; }
.wxcard .pr[hidden] { display: none; }
.wxcard .nm { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 2px; white-space: nowrap; font-size: 10.5px; font-weight: 650;
  color: #fff; text-shadow: 0 1px 2px #000, 0 0 4px #000; pointer-events: none; }
.wxcard:hover { z-index: 5; border-color: rgba(255,255,255,.35); }
:root[data-theme="light"] .wxcard { background: rgba(255,255,255,.95); color: #1d2430; border-color: rgba(0,0,0,.12); }
:root[data-theme="light"] .wxcard .wnd { color: #2b4f86; } :root[data-theme="light"] .wxcard .pr { color: #1b64be; }
:root[data-theme="light"] .wxcard .nm { color: #1d2430; text-shadow: 0 0 3px #fff, 0 0 3px #fff; }
@media (max-width: 760px) { .wxcard { min-width: 52px; padding: 2px 6px 2px 7px; } .wxcard .tmp { font-size: 13px; } }

#precipfx { position: absolute; inset: 0; pointer-events: none; z-index: 1; }

/* ski areas */
.mk.skimk { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.mk.skimk .ico { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: #59616e; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.6); }
.mk.skimk.open .ico { background: #3fbf7f; }
.mk.skimk .lbl { font-size: 11px; font-weight: 650; color: #fff; text-shadow: 0 1px 2px #000, 0 0 4px #000; white-space: nowrap; }
:root[data-theme="light"] .mk.skimk .lbl { color: #1d2430; text-shadow: 0 0 3px #fff, 0 0 3px #fff; }
.skilist { display: flex; flex-wrap: wrap; gap: 3px 10px; margin: 2px 0; } .skilist span { white-space: nowrap; }
.sdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #59616e; margin-right: 4px; vertical-align: middle; } .sdot.on { background: #3fbf7f; }
.skiwx { border-collapse: collapse; } .skiwx td { padding: 1px 10px 1px 0; font-variant-numeric: tabular-nums; }
