/* BEYOND region demo: the app's tokens (BEYOND-APP-DESIGN.md): ink panels, snow type, one cobalt accent */
:root {
  --ink: #0D0F12; --snow: #EEF0EE; --night-1: #16191D; --night-2: #1F2328; --line: #2C3136;
  --text: #EEF0EE; --text-2: #9AA1A8; --cobalt: #2340FF; --cobalt-on-dark: #6B7FFF;
  --panel: rgba(18, 21, 25, 0.84); --panel-solid: #16191D;
  --display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Martian Mono', 'IBM Plex Mono', ui-monospace, monospace;
  --r: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--ink); color: var(--text); font: 14px/1.4 var(--body); -webkit-font-smoothing: antialiased; }
#map { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
#labels { position: fixed; inset: 0; pointer-events: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
.glass { background: var(--panel); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border: 1px solid rgba(255, 255, 255, 0.07); box-shadow: var(--shadow); }

/* ---------- top: brand + places */
#top { position: fixed; left: 16px; right: 16px; top: 14px; display: flex; gap: 12px; align-items: flex-start; pointer-events: none; z-index: 5; }
#brand { pointer-events: auto; border-radius: var(--r); padding: 10px 16px 11px; min-width: 0; flex: none; }   /* never squeezed: the places bar scrolls instead */
#brand .logo { height: 18px; width: auto; display: block; }
#brand .logos { display: flex; align-items: center; gap: 12px; }
#brand .sep { width: 1px; height: 20px; background: rgba(255, 255, 255, .3); }
#brand .partner { height: calc(12px * var(--k, 1)); width: auto; display: block; }   /* --k: preset logoSize */
#brand.has-logo h1 { display: none; }
#brand.has-logo .sub { display: none; }        /* with a resort logo the card is only the two logos */
#brand h1 { margin: 6px 0 0; font: 700 19px/1.1 var(--display); letter-spacing: -0.01em; white-space: nowrap; }
#brand .sub { color: var(--text-2); font-size: 12px; margin-top: 2px; white-space: nowrap; }
#places { pointer-events: auto; min-width: 0; display: flex; gap: 6px; padding: 6px; border-radius: 999px; overflow-x: auto; scrollbar-width: none; margin-left: auto; max-width: 100%; }
#places::-webkit-scrollbar { display: none; }
#places button { white-space: nowrap; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 13px; color: var(--snow); transition: background .15s; }
#places button:hover { background: rgba(255, 255, 255, 0.08); }
#places button.on { background: var(--cobalt); color: #fff; }
#places .sep { width: 1px; background: var(--line); margin: 6px 2px; flex: none; }

/* ---------- right controls */
#ctrl { position: fixed; right: 16px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 5; }
#ctrl > * { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
#ctrl button:hover { background: rgba(40, 45, 52, 0.9); }
#ctrl svg { width: 22px; height: 22px; fill: var(--snow); }
#ctrl svg.st { fill: none; stroke: var(--snow); stroke-width: 2; stroke-linecap: round; }
/* where you are (locate.js), as the BEYOND map's #locateBtn: wait = finding the GPS fix, on = the dot is on the map */
#locate.wait svg { stroke: var(--cobalt-on-dark); animation: locate-wait 1.2s ease-in-out infinite; }
#locate.on { border-color: var(--cobalt-on-dark); } #locate.on svg { stroke: var(--cobalt-on-dark); }
@keyframes locate-wait { 50% { opacity: .45; } }
#compass svg { width: 30px; height: 30px; }
#ctrl .group { height: auto; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
#ctrl .group button { width: 44px; height: 42px; display: grid; place-items: center; font: 600 20px/1 var(--body); }
#ctrl .group button + button { border-top: 1px solid var(--line); }

/* ---------- dock (the big buttons) */
#dock { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 4px; padding: 6px; border-radius: 20px; z-index: 6; max-width: calc(100% - 32px); overflow-x: auto; scrollbar-width: none; }
#dock::-webkit-scrollbar { display: none; }
#dock button { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 70px; padding: 9px 10px 8px; border-radius: 14px; font: 600 12px/1 var(--body); color: var(--text-2); transition: background .15s, color .15s; }
#dock button svg { width: 24px; height: 24px; fill: currentColor; }
#dock button:hover { color: var(--snow); background: rgba(255, 255, 255, 0.06); }
#dock button.open { background: var(--cobalt); color: #fff; }

/* ---------- sheets (above the dock) */
.sheet { position: fixed; left: 16px; bottom: 100px; transform: translate(0, 12px); width: min(500px, calc(100% - 32px)); max-height: min(60vh, 560px); overflow: auto; border-radius: 18px; padding: 16px 18px 18px; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; z-index: 6; }
.sheet.on { opacity: 1; transform: translate(0, 0); pointer-events: auto; }
.sheet h2 { margin: 0 0 12px; font: 700 16px/1.2 var(--display); display: flex; align-items: center; gap: 10px; }
.sheet h2 .x { margin-left: auto; color: var(--text-2); font-size: 20px; line-height: 1; padding: 2px 6px; border-radius: 8px; }
.sheet h2 .x:hover { color: var(--snow); background: rgba(255,255,255,.07); }
.sheet h3 { margin: 16px 0 8px; font: 600 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.seg button { padding: 10px 8px; border-radius: 12px; background: var(--night-2); font-weight: 600; border: 1px solid transparent; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.seg button .sw { width: 100%; height: 34px; border-radius: 8px; background-size: cover; background-position: center; }
.seg button.on { border-color: var(--cobalt-on-dark); background: #1d2340; }
.toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tg { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--night-2); text-align: left; font-weight: 500; }
.tg .dot { width: 34px; height: 20px; border-radius: 99px; background: #3a4047; position: relative; flex: none; transition: background .15s; }
.tg .dot::after { content: ''; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--snow); transition: left .15s; }
.tg.on .dot { background: var(--cobalt); }
.tg.on .dot::after { left: 17px; }
.tg .sw2 { width: 18px; height: 4px; border-radius: 2px; margin-left: auto; flex: none; }
.row { display: flex; align-items: center; gap: 12px; }
.row label { color: var(--text-2); font-size: 12.5px; min-width: 86px; }
.val { font: 500 12px var(--mono); color: var(--snow); font-variant-numeric: tabular-nums; min-width: 56px; text-align: right; }
input[type=range] { -webkit-appearance: none; appearance: none; flex: 1; height: 28px; background: transparent; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--track, #3a4047); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--track, #3a4047); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--snow); margin-top: -7px; box-shadow: 0 1px 4px rgba(0,0,0,.5); border: 3px solid var(--cobalt); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--snow); border: 3px solid var(--cobalt); }
input[type=date] { background: var(--night-2); border: 1px solid var(--line); color: var(--snow); border-radius: 10px; padding: 7px 10px; font: 500 13px var(--mono); color-scheme: dark; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 6px 10px; border-radius: 99px; background: var(--night-2); font-size: 12.5px; font-weight: 600; }
.chip:hover { background: #2a3038; }
.legend { display: flex; height: 10px; border-radius: 3px; overflow: hidden; margin-top: 10px; }
.legend span { flex: 1; }
.legend-l { display: flex; justify-content: space-between; font: 500 10.5px var(--mono); color: var(--text-2); margin-top: 4px; }
.readout2 { display: flex; gap: 14px; font: 500 12px var(--mono); color: var(--text-2); margin-top: 10px; flex-wrap: wrap; }
.readout2 b { color: var(--snow); font-weight: 500; }
.play { width: 40px; height: 40px; border-radius: 50%; background: var(--cobalt); display: grid; place-items: center; flex: none; }
.play svg { width: 20px; height: 20px; fill: #fff; }

/* lists */
.list { display: flex; flex-direction: column; gap: 2px; }
.item { display: flex; align-items: center; gap: 10px; padding: 8px 8px; border-radius: 10px; text-align: left; width: 100%; }
.item:hover { background: rgba(255, 255, 255, 0.06); }
.item .ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--night-2); }
.item .ic svg { width: 18px; height: 18px; fill: var(--snow); }
.item .t { flex: 1; min-width: 0; }
.item .t b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .t small { color: var(--text-2); font-size: 12px; }
.item .m { font: 500 11.5px var(--mono); color: var(--text-2); white-space: nowrap; }
.num { min-width: 28px; height: 22px; padding: 0 6px; border-radius: 11px; display: inline-grid; place-items: center; font: 700 12px var(--body); color: #fff; border: 1.5px solid rgba(255,255,255,.85); flex: none; }
.search { width: 100%; background: var(--night-2); border: 1px solid var(--line); border-radius: 10px; color: var(--snow); padding: 9px 12px; font: inherit; margin-bottom: 8px; }
.search:focus { outline: 1px solid var(--cobalt-on-dark); }

/* webcams */
.camgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cam { display: flex; flex-direction: column; gap: 6px; text-align: left; border-radius: 12px; overflow: hidden; background: var(--night-2); padding-bottom: 8px; }
.cam img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #2a3038; display: block; }
.cam span { font-size: 12px; font-weight: 600; padding: 0 8px; line-height: 1.25; }
.cam:hover { outline: 1px solid var(--cobalt-on-dark); }
#card .camimg { width: 100%; border-radius: 10px; margin-top: 12px; display: block; background: #2a3038; min-height: 120px; object-fit: cover; }

/* ---------- card */
#card { position: fixed; right: 76px; top: 96px; width: 340px; max-height: calc(100% - 210px); overflow: auto; border-radius: 18px; padding: 16px 18px; z-index: 7; opacity: 0; transform: translateX(12px); pointer-events: none; transition: opacity .18s, transform .18s; }
#card.on { opacity: 1; transform: none; pointer-events: auto; }
#card .hd { display: flex; align-items: flex-start; gap: 12px; }
#card .hd .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
#card .hd .ic svg { width: 24px; height: 24px; fill: #fff; }
#card .hd h2 { margin: 0; font: 700 18px/1.2 var(--display); }
#card .hd .k { color: var(--text-2); font-size: 12.5px; margin-top: 3px; }
#card .hd .x { margin-left: auto; color: var(--text-2); font-size: 22px; line-height: 1; padding: 0 4px; border-radius: 8px; }
#card .hd .x:hover { color: var(--snow); }
#card .facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-top: 14px; }
#card .facts div { background: var(--night-2); border-radius: 10px; padding: 8px 10px; }
#card .facts small { display: block; font: 500 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
#card .facts b { font: 500 14px var(--mono); font-variant-numeric: tabular-nums; }
#card .acts { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.btn { padding: 9px 14px; border-radius: 10px; background: var(--cobalt); color: #fff; font-weight: 600; font-size: 13.5px; display: inline-flex; gap: 8px; align-items: center; text-decoration: none; }
.btn.ghost { background: var(--night-2); color: var(--snow); }
.btn svg { width: 16px; height: 16px; fill: currentColor; }
#card .note { color: var(--text-2); font-size: 12px; margin-top: 12px; }
#card .stops { margin-top: 12px; border-left: 3px solid var(--c, #888); padding-left: 12px; display: flex; flex-direction: column; gap: 2px; }
#card .stops button { text-align: left; padding: 4px 6px; border-radius: 6px; font-size: 13px; }
#card .stops button:hover { background: rgba(255,255,255,.06); }
#card svg.prof { width: 100%; height: 90px; margin-top: 12px; display: block; }
.sunline { position: relative; height: 16px; border-radius: 4px; background: #262b31; margin-top: 8px; overflow: hidden; }
.sunline i { position: absolute; top: 0; bottom: 0; background: linear-gradient(#ffd56a, #f3a83b); }
.sunline-l { display: flex; justify-content: space-between; font: 500 10px var(--mono); color: var(--text-2); margin-top: 3px; }

/* ---------- readout, attribution, loading */
#readout { position: fixed; left: 16px; bottom: 18px; font: 500 11.5px var(--mono); color: var(--text-2); padding: 8px 12px; border-radius: 10px; z-index: 4; font-variant-numeric: tabular-nums; white-space: nowrap; }
#readout b { color: var(--snow); font-weight: 500; }
#attr { position: fixed; right: 10px; bottom: 4px; font-size: 10px; color: rgba(255,255,255,.75); text-shadow: 0 1px 2px rgba(0,0,0,.8); z-index: 3; max-width: 60%; text-align: right; }
#attr a { color: inherit; }
#busy { position: fixed; left: 50%; top: 86px; transform: translateX(-50%); padding: 6px 12px; border-radius: 99px; font: 500 11px var(--mono); color: var(--text-2); z-index: 4; opacity: 0; transition: opacity .3s; pointer-events: none; }
#busy.on { opacity: 1; }
#splash { position: fixed; inset: 0; background: radial-gradient(1200px 600px at 50% 40%, #1b2130, #0D0F12); display: grid; place-items: center; z-index: 50; transition: opacity .6s; }
#splash.off { opacity: 0; pointer-events: none; }
#splash .in { text-align: center; }
#splash .logos { display: flex; align-items: center; justify-content: center; gap: 24px; }
#splash .logo { height: 34px; width: auto; display: block; }
#splash .logos.wait { visibility: hidden; }
#splash .sep { width: 1px; height: 38px; background: rgba(255, 255, 255, .28); }
#splash .partner { height: calc(23px * var(--k, 1)); width: auto; display: block; }
#splash .t { margin-top: 16px; font: 500 14px var(--body); color: #c9ced6; max-width: 80vw; }
#splash .t:empty { display: none; }
#splash .bar { width: 220px; height: 3px; background: #242a31; border-radius: 2px; margin: 26px auto 0; overflow: hidden; }
#splash .bar i { display: block; height: 100%; width: 0; background: var(--cobalt-on-dark); transition: width .3s; }
#toast { position: fixed; left: 50%; top: 86px; transform: translateX(-50%); padding: 9px 16px; border-radius: 12px; z-index: 9; display: none; }

@media (max-width: 760px) {
  #top { flex-direction: column; left: 10px; right: 10px; top: 10px; gap: 8px; }
  #brand { padding: 8px 12px; } #brand h1 { font-size: 16px; } #brand .sub { display: none; } #brand .logo { height: 14px; }
  #brand .logos { gap: 10px; } #brand .sep { height: 16px; } #brand .partner { height: calc(10px * var(--k, 1)); }
  #places { margin-left: 0; width: 100%; }
  #ctrl { right: 10px; top: auto; bottom: 104px; transform: none; }
  #dock { bottom: 10px; } #dock button { min-width: 58px; padding: 8px 6px; font-size: 11px; }
  .sheet { left: 10px; bottom: 92px; max-height: 55vh; width: calc(100% - 20px); }
  #card { left: 10px; right: 10px; width: auto; top: auto; bottom: 92px; max-height: 50vh; }
  #readout { display: none; }
  .toggles { grid-template-columns: 1fr; }
}

/* snow & avalanches (17 Nov 2026): EAWS level badges, the bulletin, aspect roses */
.lvl { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 5px; border-radius: 5px; font: 700 12px var(--mono); color: #111; vertical-align: middle; }
.lvl.l0 { background: #9aa4b1; } .lvl.l1 { background: #ccff66; } .lvl.l2 { background: #ffff00; } .lvl.l3 { background: #ff9900; }
.lvl.l4 { background: #ff0000; color: #fff; } .lvl.l5 { background: #8B0000; color: #fff; outline: 1.5px solid #fff; }
.avy-regs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.avy-regs .chip { display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--cobalt); color: #fff; }
.avy-head { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.avy-head .lvl { min-width: 44px; height: 40px; font-size: 18px; border-radius: 10px; }
.avy-head b { display: block; font-size: 16px; } .avy-head small { color: var(--text-2); font-size: 12px; }
.avy-line { margin-top: 8px; font-size: 13px; line-height: 1.45; }
.avy-line svg.mini { width: 14px; height: 14px; fill: currentColor; vertical-align: -2px; }
.avy-probs { display: grid; gap: 8px; margin-top: 12px; }
.avy-p { display: flex; align-items: center; gap: 8px; background: var(--night-2); border-radius: 10px; padding: 8px 10px; }
.avy-p > div { min-width: 0; } .avy-p b { font-weight: 600; } .avy-p small { display: block; color: var(--text-2); font-size: 12px; margin-top: 2px; }
.avy-rose, .avy-band { flex: none; }
.avy-p .lvl { margin-left: 4px; }
.avy-text { margin: 10px 0 0; font-size: 12.5px; line-height: 1.5; color: #cfd5da; }
.avy-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 12px; color: var(--text-2); }
.avy-foot a { color: var(--cobalt-on-dark); font-weight: 600; white-space: nowrap; }
