/* Last Water for lakesareaconnect.com. Built by tools/build_site.py: src/style.css scoped under #lw-stage, then src/site.css. */
#lw-stage { --deep: #0b222a;      
  --navy: #12313b;      
  --gold: #d4b479;      
  --cream: #f7f1e3;     
  --paper: #ece4cf;     
  --ink: #2b2118;       
  --ink-soft: #5d4c3a;
  --water: #2f6f7a;
  --alert: #e39a72;     
  --serif: Georgia,"Palatino Linotype","Times New Roman",serif;
  --util: "Segoe UI",Arial,sans-serif;
  color-scheme: dark; }
#lw-stage, #lw-stage *, #lw-stage *::before, #lw-stage *::after { box-sizing: border-box; }
#lw-stage #app { position: relative; height: 100%; min-height: 320px; overflow: hidden; user-select: none; -webkit-user-select: none; background: var(--deep); }
#lw-stage #gl, #lw-stage #fx { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#lw-stage #fx { touch-action: none; cursor: crosshair; }
#lw-stage button { font: inherit; color: inherit; }
#lw-stage button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
#lw-stage .hud { position: absolute; inset: 0; z-index: 2; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between;
  padding-block: 12px 14px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
#lw-stage .hud::before, #lw-stage .hud::after { content: ""; position: absolute; left: 0; right: 0; pointer-events: none; }
#lw-stage .hud::before { top: 0; right: auto; width: min(100%, 30rem); height: 210px; background: radial-gradient(118% 100% at 0% 0%, rgba(11,34,42,.95) 0%, rgba(11,34,42,.78) 34%, rgba(11,34,42,.3) 62%, rgba(11,34,42,0) 80%); }
#lw-stage .hud::after { bottom: 0; height: 120px; background: linear-gradient(0deg, rgba(11,34,42,.86) 0%, rgba(11,34,42,0) 100%); }
#lw-stage .hud > * { position: relative; z-index: 1; }
#lw-stage .hud-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
#lw-stage .readout { min-width: 0; }
#lw-stage .lake-name { font: italic 600 21px/1.15 var(--serif); letter-spacing: .01em; text-wrap: balance; }
#lw-stage .level { display: flex; align-items: baseline; gap: 8px; margin-top: 2px; }
#lw-stage .level-num { font: 700 46px/1 var(--serif); font-variant-numeric: tabular-nums lining-nums; }
#lw-stage .level-unit { font: 500 16px/1 var(--util); color: var(--gold); letter-spacing: .02em; }
#lw-stage .meter { position: relative; width: 148px; height: 4px; margin-top: 8px; background: rgba(247,241,227,.2); }
#lw-stage .meter-fill { position: absolute; inset: 0 auto 0 0; width: 100%; background: var(--gold); transform-origin: left center; }
#lw-stage .meter-tick { position: absolute; top: -3px; width: 1.5px; height: 10px; background: var(--cream); opacity: .8; }
#lw-stage .acres { margin-top: 7px; font: 500 14px/1.2 var(--util); color: rgba(247,241,227,.86); font-variant-numeric: tabular-nums; }
#lw-stage .hud-buttons { display: flex; gap: 8px; pointer-events: auto; }
#lw-stage .icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(212,180,121,.45); border-radius: 4px; background: rgba(11,34,42,.72); color: var(--cream); cursor: pointer; }
#lw-stage .icon-btn[aria-pressed="false"] #sndWaves { display: none; }
#lw-stage .icon-btn[aria-pressed="false"] { color: rgba(247,241,227,.55); }
#lw-stage .toast { position: absolute; left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); top: 158px; margin: 0 auto; width: fit-content; max-width: 30em;
  padding: 9px 14px 10px; background: var(--paper); color: var(--ink); border: 1px solid var(--ink); outline: 1px solid var(--paper); box-shadow: 0 6px 22px rgba(0,0,0,.35);
  font: italic 400 17px/1.3 var(--serif); text-wrap: balance; animation: lw-rise .5s ease both; }
#lw-stage .banner { position: absolute; left: 0; right: 0; top: 34%; padding-inline: 24px; text-align: center; font: italic 700 30px/1.15 var(--serif); color: var(--cream);
  text-shadow: 0 2px 14px rgba(11,34,42,.95), 0 0 3px rgba(11,34,42,.9); text-wrap: balance; animation: lw-rise .6s ease both; }
#lw-stage .banner small { display: block; margin-top: 8px; font: 500 16px/1.3 var(--util); letter-spacing: .01em; }
#lw-stage .banner.bad { color: #ffd9c2; }
#lw-stage .hud-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
#lw-stage .school { display: flex; align-items: center; gap: 9px; color: var(--gold); }
#lw-stage .school-num { font: 700 32px/1 var(--serif); color: var(--cream); font-variant-numeric: tabular-nums lining-nums; min-width: 1ch; }
#lw-stage .school-label { font: 500 15px/1 var(--util); color: rgba(247,241,227,.86); }
#lw-stage .title { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
#lw-stage .title-shade { position: absolute; inset: 0 0 auto 0; height: 72%; background: linear-gradient(180deg, rgba(11,34,42,.97) 0%, rgba(11,34,42,.9) 46%, rgba(11,34,42,.5) 76%, rgba(11,34,42,0) 100%); }
#lw-stage .title-block { position: relative; padding-top: clamp(26px, 7vh, 84px); padding-left: max(22px, env(safe-area-inset-left, 0px)); padding-right: max(22px, env(safe-area-inset-right, 0px)); max-width: 44rem; }
#lw-stage .wordmark { margin: 0; font: italic 700 clamp(72px, 21vw, 150px)/.84 var(--serif); letter-spacing: -.025em; color: var(--cream); }
#lw-stage .wordmark span { display: block; color: var(--gold); padding-left: .42em; }
#lw-stage .pitch { margin: 22px 0 0; max-width: 21em; font: 400 20px/1.35 var(--serif); text-wrap: balance; }
#lw-stage .title-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; pointer-events: auto; }
#lw-stage .title-note { margin: 20px 0 0; max-width: 26em; font: 500 15px/1.4 var(--util); color: rgba(247,241,227,.82); }
#lw-stage .fine { position: relative; margin: 0; padding: 10px max(22px, env(safe-area-inset-right, 0px)) 14px max(22px, env(safe-area-inset-left, 0px)); font: 500 13px/1.35 var(--util); color: rgba(247,241,227,.8);
  background: linear-gradient(0deg, rgba(11,34,42,.9), rgba(11,34,42,0)); }
#lw-stage .btn { min-height: 50px; padding: 12px 22px; border: 1.5px solid var(--cream); border-radius: 3px; background: rgba(11,34,42,.6); color: var(--cream); font: 600 18px/1.1 var(--util); letter-spacing: .01em; cursor: pointer; }
#lw-stage .btn.primary { background: var(--gold); border-color: var(--gold); color: var(--deep); }
#lw-stage .btn.ink { border-color: var(--ink); color: var(--ink); background: transparent; min-height: 46px; padding: 10px 16px; font-size: 16px; }
#lw-stage .btn.ink.primary { background: var(--ink); color: var(--paper); }
#lw-stage .link-btn { pointer-events: auto; min-height: 44px; padding: 8px 4px; border: 0; background: none; color: var(--cream); font: 600 15px/1 var(--util); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
#lw-stage .link-btn.dark { color: var(--ink); }
#lw-stage .pick { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 60px max(16px, env(safe-area-inset-right, 0px)) 14px max(16px, env(safe-area-inset-left, 0px));
  background: linear-gradient(0deg, rgba(11,34,42,.96) 0%, rgba(11,34,42,.86) 58%, rgba(11,34,42,0) 100%); pointer-events: none; }
#lw-stage .pick > * { pointer-events: auto; }
#lw-stage .pick-line { margin: 0; font: italic 400 16px/1.3 var(--serif); color: rgba(247,241,227,.9); }
#lw-stage .pick-ask { margin: 6px 0 12px; font: 600 17px/1.3 var(--util); text-wrap: balance; }
#lw-stage .pick-actions { display: flex; gap: 10px; flex-wrap: wrap; }
#lw-stage .pick-actions .btn { flex: 1 1 5.5em; padding-inline: 10px; }
#lw-stage .pick-actions .btn small { display: block; margin-top: 3px; font: 500 13px/1 var(--util); opacity: .85; }
#lw-stage .sheet { position: absolute; inset: 0; z-index: 6; overflow-y: auto; -webkit-overflow-scrolling: touch; background: var(--paper); color: var(--ink); }
#lw-stage .sheet-inner { max-width: 40rem; margin: 0 auto; padding-block: 18px 28px; padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); }
#lw-stage .sheet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
#lw-stage .sheet h2 { margin: 0; font: italic 700 36px/1.05 var(--serif); letter-spacing: -.01em; }
#lw-stage .sheet-note { margin: 8px 0 12px; font: 500 15px/1.4 var(--util); color: var(--ink-soft); }
#lw-stage .lakes { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
#lw-stage .lakes li { border-bottom: 1px dotted rgba(43,33,24,.5); }
#lw-stage .lake-row { width: 100%; display: grid; grid-template-columns: 68px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 2px; border: 0; background: none; text-align: left; color: var(--ink); cursor: pointer; }
#lw-stage .lake-row canvas { width: 68px; height: 52px; display: block; }
#lw-stage .lake-row .nm { display: block; font: 600 21px/1.15 var(--serif); }
#lw-stage .lake-row .ln { display: block; margin-top: 2px; font: 500 14px/1.3 var(--util); color: var(--ink-soft); }
#lw-stage .lake-row .best { font: 600 13px/1.2 var(--util); color: var(--ink-soft); text-align: right; white-space: nowrap; }
#lw-stage .lake-row:hover .nm { text-decoration: underline; text-underline-offset: 4px; }
#lw-stage .lake-row:focus-visible { outline-color: var(--ink); }
#lw-stage .sheet-foot { margin: 16px 0 0; font: 500 13px/1.45 var(--util); color: var(--ink-soft); max-width: 36em; }
#lw-stage .overlay { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 18px max(16px, env(safe-area-inset-right, 0px)) 18px max(16px, env(safe-area-inset-left, 0px)); background: rgba(11,34,42,.5); }
#lw-stage #result.overlay { place-items: end center; background: none; padding-bottom: 16px; pointer-events: none; }
#lw-stage #result .cartouche { pointer-events: auto; }
#lw-stage .cartouche { width: min(100%, 27rem); padding: 20px 20px 18px; background: var(--paper); color: var(--ink); border: 1px solid var(--ink); outline: 1px solid var(--ink); outline-offset: 3px; box-shadow: 0 18px 60px rgba(0,0,0,.5); animation: lw-rise .5s ease both; }
#lw-stage .cart-lake { margin: 0 0 4px; font: 600 14px/1.2 var(--util); color: var(--ink-soft); }
#lw-stage .cartouche h2 { margin: 0; font: italic 700 31px/1.08 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
#lw-stage .cart-body { margin: 10px 0 0; font: 400 18px/1.4 var(--serif); }
#lw-stage .cart-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid rgba(43,33,24,.55); font: 500 15px/1.35 var(--util); }
#lw-stage .cart-facts dt { color: var(--ink-soft); }
#lw-stage .cart-facts dd { margin: 0; font-variant-numeric: tabular-nums; }
#lw-stage .cart-share { margin: 12px 0 0; font: italic 400 16px/1.35 var(--serif); color: var(--ink-soft); }
#lw-stage .cart-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
#lw-stage .cart-actions.stack { flex-direction: column; }
#lw-stage .cart-small { margin: 16px 0 0; font: 500 13px/1.45 var(--util); color: var(--ink-soft); }
#lw-stage .loading { position: absolute; left: 0; right: 0; bottom: 22%; z-index: 7; text-align: center; font: italic 400 19px/1 var(--serif); color: var(--cream); text-shadow: 0 2px 10px rgba(11,34,42,.9); pointer-events: none; }
#lw-stage .loading span::after { content: "…"; }
#lw-stage .fatal { position: absolute; inset: 0; z-index: 9; display: grid; place-items: center; padding: 24px; background: var(--deep); font: 400 19px/1.45 var(--serif); text-align: center; }
@keyframes lw-rise {from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; }}
@media (max-height: 560px) {
#lw-stage .wordmark { font-size: clamp(54px, 15vh, 96px); }
#lw-stage .pitch { margin-top: 12px; font-size: 18px; }
#lw-stage .title-actions { margin-top: 14px; }
#lw-stage .title-note { margin-top: 12px; }
#lw-stage .toast { top: 124px; }
#lw-stage .level-num { font-size: 38px; }
}
@media (prefers-reduced-motion: reduce) {
#lw-stage .toast, #lw-stage .banner, #lw-stage .cartouche { animation: none; }
}

/* Last Water on lakesareaconnect.com: the rules only the site build has.
   Version: v1.0 | Updated: 2026-11-27 | Change: first version (block mode on the page, full-screen takeover, reset against the site's styles).
   tools/build_site.py puts these after src/style.css (which it scopes under #lw-stage). Everything for the game is
   under #lw-stage; the lw- page sections below the stage use the site's own type and colours, as .dl-next etc. do. */

/* ---- the stage as a block on the page (like .dl-stage) */
#lw-stage { position: relative; overflow: hidden; isolation: isolate; background: #0b222a; color: #f7f1e3; text-align: left;
  font-family: var(--util); font-size: 16px; line-height: 1.4; -webkit-tap-highlight-color: transparent;
  height: 78vh; height: min(78svh, 760px); min-height: 440px; max-height: 900px; }
#lw-stage #app { height: 100%; }
/* block mode: a finger on the stage scrolls the page */
#lw-stage #fx { touch-action: pan-y pinch-zoom; cursor: default; }

/* the site's element styles stop at the stage (lower specificity than every game rule) */
#lw-stage :where(h1, h2, h3, p, ol, ul, li, dl, dt, dd) { margin: 0; max-width: none; text-wrap: wrap; letter-spacing: normal; text-transform: none; font: inherit; color: inherit; }
#lw-stage :where(button) { letter-spacing: normal; text-transform: none; }
#lw-stage :where(a) { color: inherit; }
#lw-stage :where(canvas, svg) { max-width: none; }
#lw-stage :where(:focus-visible) { outline: 2px solid #d4b479; outline-offset: -2px; }

/* ---- fallback: no JavaScript or no WebGL 2 */
#lw-stage .lw-fallback { position: absolute; inset: 0; z-index: 20; padding: 28px 24px; overflow: auto; background: #0b222a; color: #f7f1e3; font: 400 18px/1.45 var(--serif); }
#lw-stage .lw-fallback p { margin: 0 0 12px; max-width: 34rem; }
#lw-stage.lw-live .lw-fallback { display: none; }
#lw-stage.lw-nogl { height: auto; min-height: 0; max-height: none; }
#lw-stage.lw-nogl #app { display: none; }
#lw-stage.lw-nogl .lw-fallback { position: static; display: block; }

/* ---- a lake that did not load */
#lw-stage .lw-status { position: absolute; left: 16px; right: 16px; top: 30%; z-index: 8; width: fit-content; max-width: 26rem; margin: 0 auto; padding: 18px 20px 16px;
  background: rgba(11,34,42,.95); border: 1px solid rgba(212,180,121,.5); box-shadow: 0 12px 40px rgba(0,0,0,.45); text-align: center; }
#lw-stage .lw-status p { margin: 0 0 14px; font: italic 400 19px/1.4 var(--serif); color: var(--cream); }
#lw-stage .lw-status-btns { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 18px; }

/* ---- Close: back to the page */
#lw-stage .pick .lw-close { position: absolute; top: 12px; right: max(16px, env(safe-area-inset-right, 0px)); text-shadow: 0 1px 8px rgba(11,34,42,.95); }
#lw-stage #result .cartouche { position: relative; }
#lw-stage #result .lw-close { position: absolute; top: 4px; right: 12px; min-height: 40px; }
#lw-stage #result .cart-lake { padding-right: 64px; }
#lw-stage .lw-sheet-btns { display: flex; gap: 18px; align-items: baseline; }

/* ---- takeover: everything but the title happens full screen */
html.lw-full, html.lw-full body { overflow: hidden; }
html.lw-full body { overscroll-behavior: none; }
html.lw-full #lw-stage { position: fixed; inset: 0; width: auto; height: 100vh; height: 100dvh; min-height: 0; max-height: none; margin: 0; z-index: 1000; }
html.lw-full #lw-stage #fx { touch-action: none; cursor: crosshair; }

@media (max-width: 800px) { #lw-stage { margin: 0 -18px; } }
@media (max-width: 800px) and (max-height: 760px) { #lw-stage { height: min(76svh, 600px); min-height: 430px; } }

/* ---- the words below the stage, in the site's own type (same as .dl-next, .dl-about, .dl-lakes, .dl-credits) */
.lw-next { margin: 14px 0 0; font-size: .95rem; color: var(--muted); }
.lw-next + .lw-next { margin-top: 6px; }
.lw-next a { color: inherit; }
.lw-about { max-width: 44rem; padding: 26px 0 8px; }
.lw-about h2 { margin: 24px 0 8px; }
.lw-lakes { list-style: none; padding: 0; margin: 8px 0 0; columns: 2 15rem; column-gap: 32px; }
.lw-lakes li { break-inside: avoid; padding: 5px 0; border-bottom: 1px solid var(--line); }
.lw-lakes a { font-family: var(--serif); font-size: 1.05rem; }
.lw-lakes span { color: var(--muted); font-size: .86rem; margin-left: .35em; }
.lw-credits { font-size: .9rem; color: var(--muted); }
