/* TerraPore Water Map: one stylesheet for the whole app.
   Dark by design: used outdoors or in a dark house, on a battery she is saving.
   One accent (the TerraPore blue). Mint means drink now, amber means buy. */
:root{
  color-scheme:dark;
  --bg:#080b10; --surface:#10151c; --surface2:#171e28; --surface3:#212a36; --surface4:#2b3644;
  --line:rgba(255,255,255,.07); --line2:rgba(255,255,255,.13);
  --text:#f3f6fa; --soft:#d0d8e2; --muted:#9aa6b5; --dim:#7b8795;
  --accent:#3fb4f0; --accent-hi:#74cdfa; --accent-ink:#03131e;
  --filter:#3fb4f0; --drink:#4fe0a4; --buy:#f5b759; --warn:#ff9f6b; --good:#7fe3a9;
  --c:var(--accent); --ct:rgba(63,180,240,.13); --cb:rgba(63,180,240,.34);
  --glass:rgba(14,19,26,.74);
  --tab-h:60px; --panel-w:420px;
  --st:env(safe-area-inset-top,0px); --sb:env(safe-area-inset-bottom,0px);
  --sheet-y:0px; --sheet-vis:0px;
  --ease:cubic-bezier(.22,1,.36,1); --spring:cubic-bezier(.32,.72,0,1);
  --font:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,"Helvetica Neue",system-ui,sans-serif;
  --round:ui-rounded,"SF Pro Rounded",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,system-ui,sans-serif;
  /* layers */
  --z-map:0; --z-sheet:20; --z-float:30; --z-page:40; --z-tab:50; --z-over:60; --z-toast:70;
}
.g-filter{--c:var(--filter);--ct:rgba(63,180,240,.13);--cb:rgba(63,180,240,.34)}
.g-drink{--c:var(--drink);--ct:rgba(79,224,164,.12);--cb:rgba(79,224,164,.32)}
.g-buy{--c:var(--buy);--ct:rgba(245,183,89,.12);--cb:rgba(245,183,89,.32)}
/* Over a light map the glass needs more ink, or the grey text on it washes out. */
html[data-style=day]{--glass:rgba(14,19,26,.9)}
html[data-style=satellite]{--glass:rgba(14,19,26,.88)}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;height:100%;overflow:hidden;background:var(--bg);color:var(--text);
  font:16px/1.45 var(--font);-webkit-text-size-adjust:100%;-webkit-font-smoothing:antialiased;overscroll-behavior:none}
button,input{font:inherit;color:inherit}
button{cursor:pointer;background:none;border:0;padding:0;touch-action:manipulation}
a{color:inherit}
a,button,.row{-webkit-touch-callout:none}
img{display:block;max-width:100%}
h1,h2,h3,p{margin:0}
h1,h2,h3{text-wrap:balance}
[hidden]{display:none!important}
:focus-visible{outline:2px solid var(--accent-hi);outline-offset:2px}
.ic{width:22px;height:22px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.glass{background:var(--glass);-webkit-backdrop-filter:blur(22px) saturate(1.7);backdrop-filter:blur(22px) saturate(1.7);
  border:1px solid var(--line2);box-shadow:0 10px 30px rgba(0,0,0,.36),inset 0 1px 0 rgba(255,255,255,.05)}

/* ------------------------------------------------------------ map */
#map{position:fixed;inset:0;z-index:var(--z-map);background:#0b0f14}
html[data-style=day] #map{background:#eef0ec}
.maplibregl-map{font:inherit}
.maplibregl-canvas:focus:not(:focus-visible){outline:none}
.maplibregl-canvas:focus-visible{outline:2px solid var(--accent-hi);outline-offset:-4px}
.maplibregl-ctrl-top-right{top:calc(var(--st) + 70px);right:6px}
.maplibregl-ctrl-attrib.maplibregl-compact{background:rgba(10,14,19,.88);color:var(--soft);border-radius:14px;min-height:24px;margin:0 6px 0 0}
.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:3px 28px 3px 9px}
.maplibregl-ctrl-attrib a{color:var(--soft)}
.maplibregl-ctrl-attrib-button{filter:invert(1);opacity:.75}
.maplibregl-ctrl-attrib-inner{font-size:11px;line-height:1.5}
.you{position:relative;width:22px;height:22px}
.you i{position:absolute;inset:0;border-radius:50%;background:#2f8fff;border:3px solid #fff;box-shadow:0 2px 10px rgba(0,0,0,.55)}
.you b{position:absolute;inset:-18px;border-radius:50%;background:rgba(47,143,255,.3);animation:pulse 2.6s var(--ease) infinite}
.you.place i{background:#fff;border:5px solid #0b0f14;box-shadow:0 0 0 2px #fff,0 2px 10px rgba(0,0,0,.55)}
.you.place b{display:none}
@keyframes pulse{0%{transform:scale(.3);opacity:.9}100%{transform:scale(1.15);opacity:0}}

/* ------------------------------------------------------------ top bar */
.topbar{position:fixed;z-index:var(--z-float);top:calc(var(--st) + 10px);left:12px;right:12px;display:flex;gap:8px;align-items:center}
.tb-btn{width:50px;height:50px;border-radius:50%;display:grid;place-items:center;flex:none;transition:transform .15s var(--ease)}
.tb-btn:active{transform:scale(.94)}
.tb-btn.logo img{height:27px;width:auto}
.tb-btn.locate{color:var(--accent)}
.tb-btn.locate.on{color:var(--accent-ink);background:var(--accent);border-color:transparent}
.tb-btn.locate.busy .ic{animation:spin 1s linear infinite}
.search{flex:1;min-width:0;height:50px;border-radius:25px;display:flex;align-items:center;gap:9px;padding:0 5px 0 16px;color:var(--muted);margin:0;transition:border-color .2s}
.search .ic{width:19px;height:19px}
.search input{flex:1;min-width:0;height:100%;background:none;border:0;outline:0;color:var(--text);font-size:16px;text-overflow:ellipsis;-webkit-appearance:none;appearance:none}
.search input::placeholder{color:var(--muted)}
.search input::-webkit-search-cancel-button{display:none}
.search .clear{width:44px;height:44px;flex:none;display:grid;place-items:center;border-radius:50%;color:var(--muted)}
.search:focus-within{border-color:rgba(63,180,240,.7)}
.search.busy::after{content:"";width:18px;height:18px;margin-right:12px;border-radius:50%;border:2.5px solid var(--line2);border-top-color:var(--accent);animation:spin .8s linear infinite;flex:none}

.here-pill{position:fixed;z-index:var(--z-float);top:calc(var(--st) + 70px);left:50%;transform:translate(-50%,-8px);opacity:0;pointer-events:none;height:40px;padding:0 16px 0 12px;border-radius:20px;display:flex;align-items:center;gap:7px;font-size:14px;font-weight:650;white-space:nowrap;visibility:hidden;transition:opacity .2s,transform .25s var(--ease),visibility 0s .25s}
.here-pill.on{opacity:1;transform:translate(-50%,0);pointer-events:auto;visibility:visible;transition:opacity .2s,transform .25s var(--ease)}
.here-pill .ic{width:17px;height:17px;color:var(--accent)}

.float{position:fixed;z-index:var(--z-float);right:12px;bottom:calc(var(--sheet-vis) + 12px);display:flex;flex-direction:column;gap:8px;transition:bottom .5s var(--spring),opacity .2s}
html.dragging .float{transition:none}
html.sheet-full .float{opacity:0;pointer-events:none;visibility:hidden;transition:bottom .5s var(--spring),opacity .2s,visibility 0s .2s}
.float button{width:46px;height:46px;border-radius:50%;display:grid;place-items:center}
/* plus and minus: one finger can zoom the map out. Shown only where the stack clears the top bar. */
.float .zoom{width:46px;border-radius:23px;display:flex;flex-direction:column;overflow:hidden}
.float .zoom button{width:100%;height:42px;border-radius:0}
.float .zoom button+button{box-shadow:inset 0 1px 0 var(--line2)}
.float .zoom button:focus-visible{outline-offset:-3px}
@media (max-height:739px){.float .zoom{display:none}}
.layers{position:fixed;z-index:var(--z-float);right:66px;bottom:calc(var(--sheet-vis) + 12px);border-radius:22px;padding:8px;display:flex;gap:6px;transform-origin:100% 100%}
html.live .layers{animation:pop .22s var(--ease)}
.layers button{display:flex;flex-direction:column;align-items:center;gap:6px;font-size:12px;font-weight:600;color:var(--muted);padding:4px;border-radius:14px}
.layers .sw{width:62px;height:62px;border-radius:15px;border:2px solid transparent;box-shadow:inset 0 0 0 1px var(--line2)}
.layers button[aria-pressed=true]{color:var(--text)}
.layers button[aria-pressed=true] .sw{border-color:var(--accent)}
.sw-dark{background:radial-gradient(circle at 72% 68%,#1c6fa3 0 20%,transparent 21%),linear-gradient(135deg,#1a222c,#0b0f14)}
.sw-day{background:radial-gradient(circle at 72% 68%,#8fd0f2 0 20%,transparent 21%),linear-gradient(135deg,#f4f2ec,#d9e7cf)}
.sw-sat{background:radial-gradient(circle at 72% 68%,#17485e 0 20%,transparent 21%),linear-gradient(135deg,#4c5a36,#27341f 55%,#3d3b29)}
@keyframes pop{from{transform:scale(.9);opacity:0}to{transform:none;opacity:1}}

/* ------------------------------------------------------------ bottom sheet */
.sheet{position:fixed;z-index:var(--z-sheet);left:0;right:0;top:calc(var(--st) + 70px);bottom:0;display:flex;flex-direction:column;
  background:rgba(13,17,24,.9);-webkit-backdrop-filter:blur(30px) saturate(1.6);backdrop-filter:blur(30px) saturate(1.6);
  border-radius:30px 30px 0 0;box-shadow:0 -1px 0 var(--line2),0 -18px 50px rgba(0,0,0,.5);
  transform:translate3d(0,var(--sheet-y),0);transition:transform .5s var(--spring);will-change:transform}
html.dragging .sheet{transition:none}
.sheet-head{flex:none;padding:0 14px 10px;touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none}
.handle{display:block;width:100%;height:24px;position:relative}
.handle span{position:absolute;left:50%;top:9px;width:38px;height:5px;margin-left:-19px;border-radius:3px;background:rgba(255,255,255,.45)}
.seg{position:relative;display:flex;background:rgba(255,255,255,.06);border-radius:14px;padding:3px}
.seg-ind{position:absolute;top:3px;bottom:3px;left:3px;width:calc((100% - 6px)/3);border-radius:11px;background:var(--surface4);box-shadow:0 1px 4px rgba(0,0,0,.35),inset 0 1px 0 rgba(255,255,255,.07);transform:translateX(calc(var(--ix,0)*100%));transition:transform .32s var(--spring)}
.seg button{position:relative;flex:1;min-width:0;height:38px;padding:0 8px;border-radius:11px;display:flex;align-items:center;justify-content:center;gap:6px;font-size:14px;font-weight:600;color:var(--muted);white-space:nowrap;transition:color .2s}
.seg i{width:8px;height:8px;border-radius:50%;background:var(--c);flex:none}
.seg .n{font-size:12px;font-weight:700;color:var(--muted);font-variant-numeric:tabular-nums}
/* a tab with nothing in it goes quiet; the open tab never does */
.seg button.none:not([aria-selected=true]){color:var(--dim)}
.seg button.none i{opacity:.4}
@media (max-width:411px){.seg .n{display:none}}
.seg button[aria-selected=true]{color:var(--text)}
.seg button[aria-selected=true] .n{color:var(--c)}
/* --sheet-pad is set once per snap by app.js; --sheet-y is the older name and stays as the fallback */
.sheet-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:4px 14px calc(var(--sheet-pad,var(--sheet-y)) + var(--tab-h) + var(--sb) + 36px)}
/* lowered sheet: a pull on the card moves the sheet, the browser does not take it as a page pan */
html.sheet-peek .sheet-body{touch-action:none}

.meta{display:flex;flex-wrap:wrap;align-items:center;gap:6px;row-gap:6px;margin:2px 4px 12px;font-size:13px;color:var(--muted);min-width:0}
.meta>.ic{width:15px;height:15px;color:var(--dim)}
.meta-w{font-weight:600;color:var(--soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;max-width:calc(100% - 21px)}
.meta-t{white-space:nowrap}
.meta-s{display:inline-flex;align-items:center;gap:4px;white-space:nowrap;font-size:12px;color:var(--good)}
.meta-s .ic{width:13px;height:13px;stroke-width:2.6}
.meta-live{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;font-size:12px;color:var(--muted)}
.meta-live::before{content:"";width:12px;height:12px;border-radius:50%;border:2px solid var(--line2);border-top-color:var(--accent);animation:spin .8s linear infinite}
.meta-r{position:relative;margin-left:auto;display:inline-flex;align-items:center;gap:5px;height:30px;padding:0 11px;border-radius:15px;background:rgba(255,255,255,.07);font-size:12.5px;font-weight:650;color:var(--text);flex:none}
.meta-r::after{content:"";position:absolute;inset:-7px 0}
.meta-r .ic{width:14px;height:14px}

/* the nearest spot */
.hero{position:relative;padding:2px 4px 0}
.eyebrow{display:flex;align-items:center;gap:8px;font-size:12.5px;font-weight:700;letter-spacing:.02em;color:var(--c)}
.eyebrow .dot{width:8px;height:8px;border-radius:50%;background:var(--c);box-shadow:0 0 0 4px var(--ct)}
.hero-top{display:flex;gap:14px;align-items:baseline;margin-top:4px}
.hero-id{flex:1;min-width:0}
.hero-name{font-size:26px;line-height:1.1;font-weight:750;letter-spacing:-.022em;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;padding-bottom:.08em}
.hero-name.long{font-size:21px;line-height:1.14;letter-spacing:-.015em}
.hero-name:focus-visible,.intro h2:focus-visible,.empty b:focus-visible{outline:0}
.hero-kind{margin-top:5px;font-size:14px;color:var(--muted)}
.hero-dist{flex:none;text-align:right}
.num{font:800 46px/.92 var(--round);letter-spacing:-.03em;font-variant-numeric:tabular-nums}
.unit{font:700 17px/1 var(--round);color:var(--muted);margin-left:3px}
.dirline{display:inline-flex;align-items:center;gap:6px;margin-top:8px;font-size:13px;color:var(--muted);white-space:nowrap}
.dirline .arr{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:var(--ct);color:var(--c)}
.dirline .arr .ic{width:13px;height:13px;stroke-width:2.8;transform:rotate(var(--r,0deg));transition:transform .4s var(--ease)}
.chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
.chip{display:inline-flex;align-items:center;font-size:12.5px;font-weight:600;border-radius:999px;padding:4px 10px;background:rgba(255,255,255,.07);color:var(--soft)}
.chip.good{background:rgba(127,227,169,.12);color:var(--good)}
.chip.warn{background:rgba(255,159,107,.12);color:#ffb78f}
.hours{display:flex;gap:8px;align-items:flex-start;margin-top:10px;font-size:13px;color:var(--muted)}
.hours .ic{width:16px;height:16px;margin-top:1px}

.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:50px;padding:0 16px;border-radius:16px;background:rgba(255,255,255,.08);color:var(--text);font-weight:650;font-size:16px;text-decoration:none;white-space:nowrap;transition:transform .15s var(--ease),background .2s,opacity .2s}
.btn .ic{width:20px;height:20px}
.btn.primary{background:var(--accent);color:var(--accent-ink);font-weight:750}
.btn.ghost{background:none;color:var(--soft)}
.btn.icon{width:50px;padding:0;flex:none}
.btn.big{height:56px;font-size:17px;border-radius:18px;width:100%}
.btn:active{transform:scale(.97)}
.btn[disabled]{opacity:.45;pointer-events:none}
@media (hover:hover){.btn:hover{background:rgba(255,255,255,.12)}.btn.primary:hover{background:var(--accent-hi)}.btn.ghost:hover{background:rgba(255,255,255,.06)}}
.hero-actions{display:flex;gap:8px;margin-top:16px}
.hero-actions>.btn:not(.icon){flex:1 1 0;min-width:0;padding:0 10px}
/* three buttons in one row down to 310 px wide; under that, Guide me takes its own line */
@media (max-width:359px){.hero-actions .btn:not(.icon){font-size:15px;gap:6px;padding:0 8px}.hero-actions .btn.icon{width:46px}}
@media (max-width:339px){.hero-actions{gap:6px}.hero-actions .btn:not(.icon){font-size:14px;gap:5px;padding:0 6px}.hero-actions .btn:not(.icon) .ic{width:17px;height:17px}}
@media (max-width:309px){.hero-actions{flex-wrap:wrap}.hero-actions>.btn.primary{flex:1 0 100%}}

.straw-link{display:flex;align-items:center;gap:12px;margin-top:12px;padding:8px 12px 8px 8px;border-radius:18px;background:rgba(255,255,255,.05);text-decoration:none;transition:background .2s}
.straw-link img{width:48px;height:48px;border-radius:12px;object-fit:cover;flex:none}
.straw-link span{flex:1;min-width:0}
.straw-link b{display:block;font-size:15px;font-weight:650}
.straw-link small{display:block;color:var(--muted);font-size:13px}
.straw-link .ic{color:var(--dim);width:18px;height:18px}

/* list */
.list-h{display:flex;align-items:baseline;justify-content:space-between;margin:26px 4px 4px;font-size:13px;font-weight:650;color:var(--muted)}
.list-h h3{font:inherit;margin:0}
.list-h h3+span,.list-h span+span{font-weight:500;color:var(--dim);font-variant-numeric:tabular-nums}
.rows{margin:0 -6px}
.row{position:relative;display:flex;align-items:center;gap:12px;width:100%;text-align:left;padding:10px;border-radius:16px;transition:background .15s}
.row+.row::before{content:"";position:absolute;left:64px;right:10px;top:0;height:1px;background:var(--line)}
.row:active{background:rgba(255,255,255,.06)}
@media (hover:hover){.row:hover{background:rgba(255,255,255,.05)}}
.row.on{background:var(--ct)}
.row.on::before,.row.on+.row::before{display:none}
.row-ic{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;flex:none;color:var(--c);background:var(--ct)}
.row-ic .ic{width:20px;height:20px}
.row-main{flex:1;min-width:0}
.row-main b{font-weight:600;white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;line-height:1.25;overflow-wrap:anywhere}
.row-main small{display:block;font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.row-d{flex:none;text-align:right}
.row-d b{display:block;font:700 17px/1.2 var(--round);font-variant-numeric:tabular-nums}
.row-d small{display:inline-flex;align-items:center;gap:3px;font-size:12px;color:var(--muted)}
.row-d small .ic{width:12px;height:12px;transform:rotate(var(--r,0deg));color:var(--c);stroke-width:2.8}

/* product card inside the list */
.promo{display:flex;gap:14px;align-items:center;margin:12px 0;padding:10px;border-radius:22px;text-decoration:none;background:linear-gradient(140deg,#16222e,#0f151c);box-shadow:inset 0 0 0 1px var(--line2)}
.promo img{width:96px;height:96px;border-radius:14px;object-fit:cover;flex:none}
.promo-txt{flex:1;min-width:0}
.promo b{display:block;margin:0 0 4px;font-size:17px;line-height:1.2;font-weight:700;letter-spacing:-.01em}
.promo small{display:block;font-size:13.5px;line-height:1.35;color:var(--muted)}
.promo-cta{display:inline-flex;align-items:center;gap:4px;margin-top:8px;font-weight:700;font-size:14px;color:var(--accent)}
.promo-cta .ic{width:15px;height:15px;stroke-width:2.4}

.more{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;height:48px;margin-top:10px;border-radius:16px;background:rgba(255,255,255,.05);color:var(--soft);font-weight:600;font-size:15px}
.more .ic{width:18px;height:18px;color:var(--muted)}
.credit{font-size:12px;color:var(--dim);text-align:center;margin:20px 10px 4px;line-height:1.5}
.credit a{color:var(--muted)}
.install-card{position:relative;display:flex;gap:12px;align-items:center;margin-top:16px;padding:12px 44px 12px 12px;border-radius:20px;background:rgba(255,255,255,.05);text-decoration:none}
.install-card img{width:48px;height:48px;border-radius:12px;flex:none}
.install-card b{display:block;font-size:15px;font-weight:650}
.install-card small{display:block;font-size:13px;color:var(--muted)}
/* the card is a box with a link and a close button side by side, never a button inside a link */
div.install-card{padding:0}
.install-card a{display:flex;gap:12px;align-items:center;flex:1;min-width:0;padding:12px 50px 12px 12px;border-radius:20px;text-decoration:none}
.install-card .x{position:absolute;top:50%;right:3px;margin-top:-22px;width:44px;height:44px;display:grid;place-items:center;border-radius:50%;color:var(--dim)}
.install-card .x .ic{width:16px;height:16px}

.intro{text-align:center;padding:10px 12px 4px}
.intro-art{width:74px;height:74px;margin:2px auto 16px;border-radius:22px;display:grid;place-items:center;background:radial-gradient(circle at 50% 35%,#16354a,#0b1118 75%);box-shadow:inset 0 0 0 1px var(--line2),0 12px 30px rgba(0,0,0,.4)}
.intro-art img{height:42px;width:auto}
.intro h2{font-size:26px;line-height:1.1;font-weight:750;letter-spacing:-.02em;margin-bottom:8px}
.intro p{margin:0 auto 18px;max-width:330px;color:var(--muted)}
.fine{font-size:13px;color:var(--dim);margin-top:12px}
.empty{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:10px 10px 8px}
.empty b{font-size:17px}
.empty p{color:var(--muted);font-size:14.5px;line-height:1.4;max-width:320px}
.empty .btn{width:100%;max-width:320px}
.empty-ic{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;color:var(--c);background:var(--ct)}
.empty-ic .ic{width:22px;height:22px}
.status{display:flex;gap:10px;align-items:center;font-size:14px;color:var(--soft);margin:4px 4px 14px}
.spinner{width:18px;height:18px;border-radius:50%;border:2.5px solid var(--line2);border-top-color:var(--accent);animation:spin .8s linear infinite;flex:none}
.skel{border-radius:22px;height:170px;background:linear-gradient(90deg,rgba(255,255,255,.04) 0%,rgba(255,255,255,.09) 50%,rgba(255,255,255,.04) 100%);background-size:200% 100%;animation:shimmer 1.3s linear infinite}
.skel.s{height:58px;border-radius:16px;margin-top:8px}
@keyframes shimmer{from{background-position:100% 0}to{background-position:-100% 0}}
@keyframes spin{to{transform:rotate(360deg)}}
html.live .rise{animation:rise .45s var(--ease) both;animation-delay:calc(var(--i,0)*28ms)}
@keyframes rise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

/* ------------------------------------------------------------ tab bar */
.tabbar{position:fixed;z-index:var(--z-tab);left:12px;right:12px;bottom:calc(var(--sb) + 8px);height:var(--tab-h);display:flex;padding:5px;border-radius:30px}
.tabbar a{position:relative;flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;text-decoration:none;color:var(--muted);font-size:11px;font-weight:600;border-radius:25px;white-space:nowrap;transition:color .2s,background .25s}
.tabbar .ic{width:23px;height:23px}
.tabbar a[aria-current=page]{color:var(--accent);background:rgba(63,180,240,.14)}
.tabbar a:active{transform:scale(.96)}
/* The list and the pages fade out before the bar, so no half-cut card shows through the glass.
   The fade starts 84 px above the bottom edge: app.js (fitHalf) keeps the button row under the nearest water at 86 px or higher. */
body::after{content:"";position:fixed;z-index:45;left:0;right:0;bottom:0;height:calc(var(--tab-h) + var(--sb) + 24px);pointer-events:none;background:linear-gradient(rgba(13,17,24,0),#0d1118 16px)}
html:not([data-page=water]) body::after{background:linear-gradient(rgba(8,11,16,0),var(--bg) 16px)}
/* Home-screen app on iPhone: a dark band under the clock, so page text and a light map never run through it.
   It is 0 px tall in a browser tab. */
body::before{content:"";position:fixed;z-index:45;left:0;right:0;top:0;height:var(--st);pointer-events:none;background:linear-gradient(var(--bg) 60%,rgba(8,11,16,0))}
html[data-page=shop] body::before{background:linear-gradient(rgba(8,11,16,.72),rgba(8,11,16,0))}
html[data-page=water] body::before{z-index:1;height:calc(var(--st) * 1.3);background:linear-gradient(rgba(8,11,16,.62),rgba(8,11,16,0))}

/* ------------------------------------------------------------ touch feel */
/* A stray pinch on a control must not zoom the fixed layout, and a press must not select its label.
   The list and the pages keep pinch zoom, so she can still make the words bigger. */
.tb-btn,.tabbar,.float,.here-pill,.layers{touch-action:none}
.search{touch-action:pan-x pan-y}
.tb-btn,.tabbar,.sheet-head,.btn,.row,.more,.seg{-webkit-user-select:none;user-select:none}

/* ------------------------------------------------------------ pages */
.page{position:fixed;z-index:var(--z-page);inset:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;background:var(--bg);visibility:hidden;opacity:0;transform:translateY(12px);transition:opacity .22s,transform .32s var(--ease),visibility 0s .32s}
.page.on{visibility:visible;opacity:1;transform:none;transition:opacity .22s,transform .32s var(--ease)}
.page-in{padding:calc(var(--st) + 26px) 20px calc(var(--tab-h) + var(--sb) + 48px);max-width:640px;margin:0 auto}
.brand-row{display:flex;align-items:center;gap:9px;margin-bottom:14px}
.brand-row img.drop{height:24px;width:auto}
.brand-row img.word{height:15px;width:auto}
.page-title{font-size:36px;line-height:1.05;font-weight:800;letter-spacing:-.03em}
.page h1:focus-visible{outline:0}
.page-sub{margin-top:10px;color:var(--muted);font-size:17px;line-height:1.4;max-width:34em}
.sec{margin-top:44px}
.sec-h{font-size:26px;line-height:1.1;font-weight:750;letter-spacing:-.022em;margin-bottom:8px}
.lead{margin:0 0 16px;color:var(--muted)}
.back{display:inline-flex;align-items:center;gap:4px;min-height:44px;margin:0 0 18px -6px;padding:6px 10px 6px 4px;border-radius:12px;color:var(--accent);font-weight:600;text-decoration:none}
.back .ic{width:20px;height:20px}

.pills{display:flex;background:rgba(255,255,255,.06);border-radius:14px;padding:3px;margin:16px 0 14px}
.pills a{flex:1;min-width:0;height:40px;border-radius:11px;display:grid;place-items:center;font-weight:600;font-size:15px;color:var(--muted);text-decoration:none;white-space:nowrap;transition:background .2s,color .2s}
.pills a[aria-current=true]{background:var(--surface4);color:var(--text);box-shadow:0 1px 4px rgba(0,0,0,.35)}

.carousel{margin:0 -20px}
.track{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;padding:4px 20px 8px;scrollbar-width:none;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
.track::-webkit-scrollbar{display:none}
.slide{flex:0 0 86%;scroll-snap-align:center;scroll-snap-stop:always;background:var(--surface);border-radius:26px;overflow:hidden;box-shadow:inset 0 0 0 1px var(--line)}
.slide-pic{position:relative;aspect-ratio:5/4;background:#06090d}
.pic{position:absolute;inset:0}
.pic img{width:100%;height:100%;object-fit:cover}
.pic.crop{background-repeat:no-repeat}
.badge{position:absolute;top:12px;right:12px;font-size:12px;font-weight:650;padding:6px 11px;border-radius:999px;background:rgba(8,11,16,.72);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);color:var(--soft)}
.slide-body{padding:16px 18px 22px}
.step-of{font-size:13px;font-weight:650;color:var(--accent);font-variant-numeric:tabular-nums}
.slide h3{margin:6px 0 7px;font-size:22px;line-height:1.15;font-weight:750;letter-spacing:-.02em}
.slide p{color:var(--soft);font-size:16px}
.car-nav{display:flex;align-items:center;justify-content:space-between;padding:10px 20px 0}
.nb{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;background:var(--surface2);transition:opacity .2s,transform .15s}
.nb:active{transform:scale(.94)}
.nb:disabled{opacity:.3;cursor:default}
/* each dot is a 24 by 44 px target; the mark she sees stays 7 px */
.dots{display:flex;gap:0;align-items:center}
.dots button{width:24px;height:44px;display:grid;place-items:center;background:none;transition:width .3s var(--ease)}
.dots button::before{content:"";width:7px;height:7px;border-radius:4px;background:rgba(255,255,255,.45);transition:width .3s var(--ease),background .3s}
.dots button[aria-current=true]{width:34px}
.dots button[aria-current=true]::before{width:22px;background:var(--accent)}

.note{display:flex;gap:10px;align-items:flex-start;padding:13px 14px;margin-bottom:16px;border-radius:16px;background:rgba(245,183,89,.09);font-size:15px;color:var(--soft)}
.note .ic{color:var(--buy);width:20px;height:20px;margin-top:1px}

.buy-card{display:flex;gap:16px;align-items:center;margin-top:36px;padding:12px;border-radius:24px;text-decoration:none;background:linear-gradient(140deg,#16222e,#0f151c);box-shadow:inset 0 0 0 1px var(--line2)}
.buy-card img{width:108px;height:108px;border-radius:16px;object-fit:cover;flex:none}
.buy-card b{display:block;margin:0 0 5px;font-size:19px;line-height:1.15;font-weight:750;letter-spacing:-.015em}
.buy-card small{display:block;color:var(--muted);font-size:14px;line-height:1.35}
.mini{display:flex;gap:13px;align-items:center;margin-top:10px;padding:10px 14px 10px 10px;border-radius:20px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line);text-decoration:none}
.mini img,.mini .tile{width:54px;height:54px;border-radius:14px;object-fit:cover;flex:none}
.mini .tile{display:grid;place-items:center;background:var(--surface3);color:var(--accent)}
.mini span{flex:1;min-width:0}
.mini b{display:block;font-weight:650}
.mini small{display:block;color:var(--muted);font-size:14px}
.mini>.ic{color:var(--dim);width:18px;height:18px}

/* shop */
.shop-hero{position:relative;margin:calc(-1 * (var(--st) + 26px)) -20px 0;aspect-ratio:1/1;max-height:62vh;overflow:hidden;background:#06090d}
.shop-hero img{width:100%;height:100%;object-fit:cover}
.shop-hero::after{content:"";position:absolute;left:0;right:0;bottom:0;height:46%;background:linear-gradient(transparent,var(--bg))}
.shop-brand{position:absolute;z-index:1;left:20px;top:calc(var(--st) + 20px);display:flex;align-items:center;gap:8px}
.shop-brand img.drop{height:24px;width:auto}
.shop-brand img.word{height:15px;width:auto}
.kicker{position:relative;margin-top:-18px;font-size:15px;font-weight:650;color:var(--accent)}
.headline{margin:8px 0 22px;font-size:30px;line-height:1.1;font-weight:800;letter-spacing:-.028em}
.cta{display:flex;align-items:center;justify-content:center;gap:10px;height:58px;border-radius:19px;background:var(--accent);color:var(--accent-ink);font-weight:750;font-size:17px;text-decoration:none;box-shadow:0 14px 34px rgba(63,180,240,.26);transition:transform .15s var(--ease),background .2s}
.cta:active{transform:scale(.98)}
@media (hover:hover){.cta:hover{background:var(--accent-hi)}}
.cta .ic{width:20px;height:20px;stroke-width:2.4}
.checks{list-style:none;margin:24px 0 0;padding:0;display:grid;gap:13px}
.checks li{display:flex;gap:12px;align-items:flex-start;color:var(--soft)}
.checks .ic{color:var(--accent);width:21px;height:21px;margin-top:1px}
.inside-pic{border-radius:24px;overflow:hidden;background:#06090d}
.steps{list-style:none;margin:20px 0 0;padding:0;display:grid;gap:20px;counter-reset:s}
.steps li{display:flex;gap:14px;align-items:flex-start}
.steps li::before{counter-increment:s;content:counter(s);flex:none;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:rgba(63,180,240,.14);color:var(--accent);font:800 15px/1 var(--round);margin-top:-2px}
.steps b{display:block;font-size:18px;font-weight:700;letter-spacing:-.01em;margin-bottom:3px}
.steps p{color:var(--soft);font-size:15.5px}
.vs{display:grid;gap:10px}
.vs-row{background:var(--surface);border-radius:20px;padding:15px 16px;box-shadow:inset 0 0 0 1px var(--line)}
.vs-old,.vs-new{display:flex;gap:11px;align-items:flex-start}
.vs-old{color:var(--muted);font-size:15px}
.vs-old .ic{color:var(--warn);width:20px;height:20px;margin-top:1px}
.vs-new{margin-top:11px;font-weight:600}
.vs-new .ic{color:var(--good);width:20px;height:20px;margin-top:1px}
.closer{margin:52px 6px 22px;text-align:center;font-size:28px;line-height:1.12;font-weight:800;letter-spacing:-.025em}

/* field guide */
.g-sec{margin-top:34px}
.g-h{display:flex;align-items:center;gap:10px;margin-bottom:12px;font-size:21px;line-height:1.15;font-weight:750;letter-spacing:-.018em}
.g-h .ic{color:var(--accent);width:23px;height:23px}
.sub-h{margin:16px 0 8px;font-size:14px;font-weight:700}
.sub-h.ok{color:var(--good)}
.sub-h.no{color:var(--warn)}
.ticks{list-style:none;margin:0;padding:0;display:grid;gap:9px}
.ticks li{display:flex;gap:10px;align-items:flex-start;color:var(--soft)}
.ticks .ic{width:19px;height:19px;margin-top:2px}
.ticks.good .ic{color:var(--good)}
.ticks.bad .ic{color:var(--warn)}
.ticks.plain .ic{color:var(--dim)}
.g-sec>p{color:var(--soft)}
.g-box{background:var(--surface);border-radius:24px;padding:16px;box-shadow:inset 0 0 0 1px var(--line)}
.steppers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0 10px}
.stepper{display:flex;flex-direction:column;align-items:center;gap:8px;padding:12px 6px;border-radius:18px;background:var(--surface2)}
.stepper>span{font-size:13px;font-weight:600;color:var(--muted)}
.stepper div{display:flex;align-items:center;justify-content:space-between;gap:2px;width:100%}
.stepper b{flex:1;min-width:0;text-align:center;font:800 30px/1 var(--round);font-variant-numeric:tabular-nums}
.stepper button{flex:none;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:var(--surface4);transition:transform .15s}
@media (max-width:389px){.stepper button{width:40px;height:40px}.stepper b{font-size:26px}}
@media (max-width:349px){.steppers{grid-template-columns:1fr}}
.stepper button:active{transform:scale(.92)}
.stepper button .ic{width:18px;height:18px}
.calc-out{display:flex;align-items:baseline;justify-content:center;gap:8px;flex-wrap:wrap;padding:18px 14px 16px;border-radius:18px;background:rgba(63,180,240,.09);text-align:center}
.calc-out b{font:800 54px/.9 var(--round);letter-spacing:-.03em;color:var(--accent-hi);font-variant-numeric:tabular-nums}
.calc-out span{font:700 21px/1 var(--round);color:var(--soft)}
.calc-out small{flex-basis:100%;color:var(--muted);font-size:13.5px}
.calc-foot{margin-top:10px;font-size:14px;color:var(--muted)}
.tip{display:flex;gap:13px;align-items:flex-start;padding:14px 0;border-top:1px solid var(--line)}
.tip:first-of-type{border-top:0;padding-top:2px}
.tip .ic{color:var(--accent);width:22px;height:22px;margin-top:2px}
.tip b{display:block;margin-bottom:2px;font-weight:650}
.tip p{font-size:15.5px;color:var(--soft)}
.sources{margin:22px 6px 0;font-size:13px;color:var(--dim);text-align:center}

/* put it on your phone */
.os-switch{display:flex;background:rgba(255,255,255,.06);border-radius:14px;padding:3px;margin:22px 0 18px}
.os-switch button{flex:1;height:40px;border-radius:11px;font-weight:600;font-size:15px;color:var(--muted);transition:background .2s,color .2s}
.os-switch button[aria-pressed=true]{background:var(--surface4);color:var(--text);box-shadow:0 1px 4px rgba(0,0,0,.35)}
.i-steps{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.i-step{display:flex;gap:14px;align-items:center;padding:12px;border-radius:22px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line)}
.i-art{flex:none;width:92px;height:92px;border-radius:16px;background:#0b1016;display:grid;place-items:center;overflow:hidden;box-shadow:inset 0 0 0 1px var(--line)}
.i-art svg{width:100%;height:100%}
.i-step .n{font-size:13px;font-weight:650;color:var(--accent)}
.i-step b{display:block;font-size:17px;font-weight:700;letter-spacing:-.01em;margin:2px 0 3px}
.i-step p{font-size:14.5px;color:var(--muted);line-height:1.35}
.i-done{display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px;padding:34px 16px;border-radius:26px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line)}
.i-done .ok{width:64px;height:64px;border-radius:50%;display:grid;place-items:center;background:rgba(127,227,169,.14);color:var(--good)}
.i-done .ok .ic{width:30px;height:30px;stroke-width:2.6}
.i-done b{font-size:21px;font-weight:750}
.i-done p{color:var(--muted);max-width:300px}
.i-why{margin-top:28px;display:grid;gap:12px}
.i-why li{display:flex;gap:12px;align-items:flex-start;color:var(--soft)}
.i-why{list-style:none;padding:0}
.i-why .ic{color:var(--accent);width:21px;height:21px;margin-top:1px}

/* ------------------------------------------------------------ news */
.t-water{--tc:var(--accent)} .t-power{--tc:var(--buy)} .t-storm{--tc:#b7c4ff} .t-world{--tc:var(--warn)} .t-top{--tc:var(--soft)}
.n-tag{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:700;color:var(--tc,var(--soft));white-space:nowrap}
.n-tag::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.n-meta{font-size:12.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.n-pic{position:relative;flex:none;overflow:hidden;background:var(--surface2);display:grid;place-items:center;color:var(--tc,var(--muted))}
.n-pic img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.n-pic .ic{width:26px;height:26px;opacity:.8}

/* the small band on the map sheet */
.n-band{margin:18px -14px 0}
.n-band-h{display:flex;align-items:baseline;justify-content:space-between;margin:0 18px 8px;font-size:13px;font-weight:650;color:var(--muted)}
.n-band-h a{color:var(--accent);font-weight:600;text-decoration:none;padding:4px 0 4px 10px}
.n-strip{display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x proximity;padding:0 14px 4px;scrollbar-width:none;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
.n-strip::-webkit-scrollbar{display:none}
.n-card{flex:0 0 78%;max-width:300px;scroll-snap-align:start;display:flex;gap:11px;align-items:center;padding:8px 12px 8px 8px;border-radius:18px;background:rgba(255,255,255,.05);text-decoration:none;transition:background .2s}
.n-card:active{background:rgba(255,255,255,.09)}
.n-card .n-pic{width:66px;height:66px;border-radius:12px}
.n-card-t{min-width:0}
.n-card-t b{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:14px;line-height:1.25;font-weight:650}
.n-card-t .n-meta{display:block;margin-top:4px}
.n-alert-row{display:flex;align-items:center;gap:10px;margin:0 0 12px;padding:10px 12px;border-radius:16px;background:rgba(255,159,107,.11);text-decoration:none;font-size:14px;font-weight:600;color:#ffc4a3}
.n-alert-row .ic{width:19px;height:19px;color:var(--warn)}
.n-alert-row span{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.n-alert-row .ic.go{width:15px;height:15px;color:var(--dim)}

/* the news page */
.n-tabs{display:flex;gap:6px;overflow-x:auto;margin:22px -20px 16px;padding:0 20px;scrollbar-width:none}
.n-tabs::-webkit-scrollbar{display:none}
.n-tabs button{flex:none;height:38px;padding:0 15px;border-radius:19px;background:rgba(255,255,255,.07);font-size:14.5px;font-weight:600;color:var(--soft);white-space:nowrap;transition:background .2s,color .2s}
.n-tabs button[aria-pressed=true]{background:var(--text);color:#0a0d12}
.n-tabs button .c{margin-left:6px;font-weight:500;opacity:.6;font-variant-numeric:tabular-nums}
.n-lead{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;margin:0 -20px;padding:2px 20px 6px;scrollbar-width:none;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
.n-lead::-webkit-scrollbar{display:none}
.n-hero{position:relative;flex:0 0 86%;max-width:420px;scroll-snap-align:center;aspect-ratio:4/3;border-radius:24px;overflow:hidden;background:var(--surface2);text-decoration:none;display:flex;align-items:flex-end}
.n-hero .n-pic{position:absolute;inset:0}
.n-hero::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(8,11,16,0) 28%,rgba(8,11,16,.55) 58%,rgba(8,11,16,.94) 100%)}
.n-hero-t{position:relative;z-index:1;padding:16px}
.n-hero-t h3{margin:7px 0 7px;font-size:20px;line-height:1.2;font-weight:750;letter-spacing:-.015em;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.n-hero-t .n-meta{color:var(--soft)}
.n-list{margin-top:18px}
.n-row{display:flex;gap:14px;align-items:flex-start;padding:14px 0;border-top:1px solid var(--line);text-decoration:none}
.n-row:first-child{border-top:0}
.n-row .n-pic{width:86px;height:86px;border-radius:14px}
.n-row-t{flex:1;min-width:0}
.n-row-t h3{margin:5px 0 4px;font-size:16.5px;line-height:1.25;font-weight:650;letter-spacing:-.008em;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.n-row-t p{font-size:14px;line-height:1.35;color:var(--muted);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;margin-bottom:5px}
.n-alerts{margin-top:20px;display:grid;gap:8px}
.n-alert{border-radius:18px;background:rgba(255,159,107,.1);padding:13px 14px}
.n-alert summary{display:flex;align-items:center;gap:10px;list-style:none;cursor:pointer}
.n-alert summary::-webkit-details-marker{display:none}
.n-alert summary .ic{color:var(--warn);width:21px;height:21px}
.n-alert summary span{flex:1;min-width:0}
.n-alert summary b{display:block;font-weight:700;color:#ffd2b8}
.n-alert summary small{display:block;font-size:13px;color:var(--muted)}
.n-alert summary .ic.go{width:16px;height:16px;color:var(--dim);transition:transform .2s}
.n-alert[open] summary .ic.go{transform:rotate(90deg)}
.n-alert p{margin-top:10px;font-size:14.5px;color:var(--soft);white-space:pre-line}
.n-calm{display:flex;align-items:center;gap:10px;margin-top:20px;padding:12px 14px;border-radius:16px;background:rgba(127,227,169,.08);font-size:14.5px;color:var(--soft)}
.n-calm .ic{color:var(--good);width:20px;height:20px}
.n-skel{height:92px;border-radius:16px;margin-top:10px;background:linear-gradient(90deg,rgba(255,255,255,.04) 0%,rgba(255,255,255,.09) 50%,rgba(255,255,255,.04) 100%);background-size:200% 100%;animation:shimmer 1.3s linear infinite}
.n-skel.big{height:240px;border-radius:24px;margin-top:0}

/* ------------------------------------------------------------ guide me (compass) */
.compass{position:fixed;inset:0;z-index:var(--z-over);display:flex;flex-direction:column;align-items:center;text-align:center;padding:calc(var(--st) + 12px) 20px calc(var(--sb) + 18px);background:radial-gradient(120% 70% at 50% 34%,#102a3c 0%,#080b10 70%);overflow-y:auto}
html.live .compass{animation:fade .25s var(--ease)}
@keyframes fade{from{opacity:0}to{opacity:1}}
.c-top{width:100%;max-width:520px;display:flex;align-items:center;gap:12px;text-align:left}
.c-x{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.09);flex:none}
.c-title{min-width:0}
.c-title b{font-size:19px;font-weight:700;letter-spacing:-.015em;white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;line-height:1.2}
.c-title span{color:var(--muted);font-size:14px}
.dial{position:relative;width:min(78vw,44vh,340px);aspect-ratio:1/1;margin:auto 0 0;flex:none}
.dial svg{width:100%;height:100%;overflow:visible}
.c-dist{margin-top:18px;font:800 80px/.9 var(--round);letter-spacing:-.04em;font-variant-numeric:tabular-nums}
.c-dist small{font-size:28px;letter-spacing:0;color:var(--muted);margin-left:5px}
.c-sub{margin-top:8px;color:var(--soft);font-size:16px}
.c-hint{margin:14px auto 0;max-width:360px;min-height:22px;color:var(--muted);font-size:15px}
.c-acc{margin-top:6px;font-size:13px;color:var(--muted)}
.c-actions{display:flex;gap:10px;width:100%;max-width:440px;margin-top:auto;padding-top:18px}
.c-actions>*{flex:1}
.c-actions #cEnd{flex:0 0 96px}
.c-arrive{display:flex;flex-direction:column;align-items:center;gap:10px;margin:auto 0 0;max-width:380px}
.c-ok{width:96px;height:96px;border-radius:50%;display:grid;place-items:center;background:rgba(127,227,169,.15);color:var(--good);box-shadow:0 0 0 12px rgba(127,227,169,.06)}
html.live .c-ok{animation:pop .5s var(--ease)}
.c-ok .ic{width:46px;height:46px;stroke-width:2.6}
.c-arrive h2{margin-top:12px;font-size:38px;font-weight:800;letter-spacing:-.03em}
.c-arrive p{margin-bottom:8px;color:var(--soft)}
.c-arrive .btn{width:100%}

/* ------------------------------------------------------------ welcome */
.welcome{position:fixed;inset:0;z-index:var(--z-over);background:var(--bg);display:flex}
.welcome:focus,.welcome:focus-visible{outline:0}
.w-box{position:relative;flex:1;min-width:0;display:flex;flex-direction:column;min-height:0;background:var(--bg)}
.w-skip{position:absolute;z-index:2;top:calc(var(--st) + 14px);right:16px;height:44px;padding:0 14px;border-radius:22px;background:rgba(8,11,16,.55);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);color:var(--soft);font-weight:600;font-size:14px}
.w-track{flex:1;min-height:0;min-width:0;width:100%;display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain}
.w-track::-webkit-scrollbar{display:none}
.w-slide{flex:0 0 100%;min-width:0;scroll-snap-align:start;scroll-snap-stop:always;display:flex;flex-direction:column;padding:calc(var(--st) + 14px) 24px 0;min-height:0;overflow-y:auto}
/* the picture is square when there is room and gives way in height when there is not, so its sides are never cut */
.w-slide>:first-child{margin-top:auto}
.w-slide>:last-child{margin-bottom:auto}
.w-art{position:relative;flex:0 1 auto;aspect-ratio:1/1;min-height:150px;border-radius:32px;overflow:hidden;background:#06090d}
.w-art img{width:100%;height:100%;object-fit:cover}
.w-art.dark{display:grid;place-items:center;background:radial-gradient(circle at 50% 40%,#12354b,#080b10 76%)}
.w-art .w-dial{width:min(64%,250px)}
.w-art .w-icon{display:flex;flex-direction:column;align-items:center;gap:16px}
.w-art .w-icon img.tile{width:120px;height:120px;border-radius:28px;box-shadow:0 22px 54px rgba(0,0,0,.55)}
.w-art .w-icon img.word{height:20px;width:auto}
.w-slide h2{margin:24px 0 8px;font-size:34px;line-height:1.05;font-weight:800;letter-spacing:-.03em}
.w-slide p{color:var(--muted);font-size:17px;line-height:1.4}
.w-steps{margin:12px 0 0;padding:0;list-style:none;display:grid;gap:9px;color:var(--soft)}
.w-steps li{display:flex;gap:11px;align-items:center}
.w-steps .n{flex:none;width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:var(--surface3);color:var(--accent);font:800 13px/1 var(--round)}
.w-steps .ic{width:17px;height:17px;vertical-align:-3px}
.w-more{display:inline-block;margin-top:1px;padding:11px 0;color:var(--accent);font-weight:600;text-decoration:none}
.w-foot{padding:16px 24px calc(var(--sb) + 18px);display:flex;flex-direction:column;gap:10px;align-items:center}
.w-foot .dots{margin:-14px 0 -10px}
.w-foot .btn{width:100%}
@media (max-height:640px){
  .w-art{min-height:104px}
  .w-art .w-icon{gap:10px}
  .w-art .w-icon img.tile{width:76px;height:76px;border-radius:18px}
  .w-art .w-icon img.word{height:16px}
  .w-slide h2{margin-top:16px;font-size:28px}
  .w-foot{padding-top:10px}
}

/* ------------------------------------------------------------ settings */
dialog.dlg{background:var(--surface);color:var(--text);border:0;border-radius:28px;width:min(460px,calc(100% - 24px));max-height:calc(100% - 48px);padding:0;box-shadow:0 0 0 1px var(--line2),0 30px 80px rgba(0,0,0,.6)}
dialog.dlg::backdrop{background:rgba(3,5,8,.62);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}
html.live dialog.dlg[open]{animation:dlg .3s var(--ease)}
@keyframes dlg{from{opacity:0;transform:translateY(14px) scale(.98)}to{opacity:1;transform:none}}
.dlg-in{padding:18px 18px 20px}
.dlg-head{display:flex;align-items:center;gap:12px;margin-bottom:16px}
.dlg-head img{width:46px;height:46px;border-radius:12px}
.dlg-head div{flex:1;min-width:0}
.dlg-head b{display:block;font-size:18px;font-weight:700;letter-spacing:-.015em}
.dlg-head small{color:var(--muted);font-size:13px}
.set-row{padding:12px 0}
.set-row>span{display:block;margin-bottom:8px;font-size:13px;font-weight:600;color:var(--muted)}
.opts{display:flex;background:rgba(255,255,255,.06);border-radius:13px;padding:3px}
.opts button{flex:1;height:38px;border-radius:10px;font-weight:600;font-size:14.5px;color:var(--muted);transition:background .2s,color .2s}
.opts button[aria-pressed=true]{background:var(--surface4);color:var(--text);box-shadow:0 1px 4px rgba(0,0,0,.35)}
.set-list{margin-top:8px;border-radius:16px;background:rgba(255,255,255,.04);overflow:hidden}
.set-btn{display:flex;align-items:center;gap:12px;width:100%;padding:14px;text-align:left;font-weight:550;text-decoration:none}
.set-btn:focus-visible{outline-offset:-2px}
.set-btn+.set-btn{box-shadow:inset 0 1px 0 var(--line)}
.set-btn .ic{color:var(--accent);width:20px;height:20px}
.set-btn .ic.go{margin-left:auto;color:var(--dim);width:16px;height:16px}
.set-about{padding-top:16px;font-size:13.5px;color:var(--muted)}
.set-about p{margin:0 0 8px}

/* ------------------------------------------------------------ toast */
.toast{position:fixed;z-index:var(--z-toast);left:50%;top:calc(var(--st) + 72px);transform:translate(-50%,-10px);opacity:0;pointer-events:none;width:max-content;max-width:min(92vw,420px);background:#f3f6fa;color:#0a0d12;font-weight:600;font-size:14.5px;padding:11px 17px;border-radius:16px;box-shadow:0 14px 36px rgba(0,0,0,.5);transition:opacity .2s,transform .3s var(--ease);text-align:center}
.toast.on{opacity:1;transform:translate(-50%,0)}

/* ------------------------------------------------------------ wide screens: side panel */
.side-bg{display:none}
@media (min-width:900px){
  .side-bg{display:block;position:fixed;z-index:10;left:0;top:0;bottom:0;width:var(--panel-w);background:var(--surface);box-shadow:1px 0 0 var(--line2)}
  .topbar{left:14px;right:auto;width:calc(var(--panel-w) - 28px);top:14px}
  .topbar .glass{background:var(--surface2);box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none}
  .sheet{left:0;right:auto;width:var(--panel-w);top:78px;bottom:0;border-radius:0;box-shadow:none;background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none;transform:none!important;transition:none}
  .sheet-head{cursor:default;padding-top:4px;touch-action:auto}
  .handle{display:none}
  .sheet-body{padding-bottom:calc(var(--tab-h) + 44px)}
  .float{bottom:28px;right:16px}
  .layers{bottom:28px;right:72px}
  .here-pill{left:calc(var(--panel-w) + (100vw - var(--panel-w))/2);top:16px}
  .maplibregl-ctrl-top-right{top:6px}
  .tabbar{left:14px;right:auto;width:calc(var(--panel-w) - 28px);bottom:14px;background:var(--surface2);-webkit-backdrop-filter:none;backdrop-filter:none;box-shadow:0 0 0 1px var(--line2)}
  body::after{right:auto;width:var(--panel-w);height:calc(var(--tab-h) + 38px);background:linear-gradient(rgba(16,21,28,0),var(--surface) 16px)}
  .page{right:auto;width:var(--panel-w);box-shadow:1px 0 0 var(--line2)}
  .toast{left:calc(var(--panel-w) + (100vw - var(--panel-w))/2);top:22px}
  .welcome{background:rgba(3,5,8,.72);align-items:center;justify-content:center;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
  .w-box{flex:none;width:440px;height:min(800px,94vh);border-radius:32px;overflow:hidden;box-shadow:0 0 0 1px var(--line2),0 30px 90px rgba(0,0,0,.6)}
  .w-slide{padding-top:22px}
  .w-skip{top:18px}
}
@media (max-width:899px){
  /* Day and Satellite: a near-solid sheet with a soft edge, so a light map does not grey it or get smeared by its shadow.
     Phone layout only; on wide screens the panel behind the sheet is already solid. */
  html[data-style=day] .sheet{background:rgba(13,17,24,.97);box-shadow:0 -1px 0 var(--line2),0 -6px 24px rgba(0,0,0,.16)}
  html[data-style=satellite] .sheet{background:rgba(13,17,24,.96)}
  /* her dot rests while a full-screen page covers the map */
  html:not([data-page=water]) .you b{animation:none}
}
/* A phone on its side has no room for the map and the sheet together. The other pages still work there. */
@media (orientation:landscape) and (min-width:560px) and (max-width:899px) and (max-height:460px){
  html[data-page=water] body::after{content:"Turn your phone upright to use the map.";top:0;height:auto;display:grid;place-items:center;padding:24px 24px calc(var(--tab-h) + var(--sb) + 24px);text-align:center;background:var(--bg);color:var(--text);font-weight:650;font-size:18px;pointer-events:auto}
}
@media (max-width:359px){
  .num{font-size:40px}
  .hero-name{font-size:25px}
  .seg button{font-size:13px;gap:4px}
  .page-title{font-size:32px}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
  .you b{display:none}
}

html.still *,html.still *::before,html.still *::after{animation:none!important;transition:none!important}
