/* The wetland walks (experience/wetland/ and its sites): the 3D stage, the guide's words, sampling, the microscope and the field guide. */
html, body { height: 100%; overflow: hidden; }
body { margin: 0; background: #0b1215; }
#stage { position: fixed; inset: 0; touch-action: none; }
#stage canvas { display: block; width: 100%; height: 100%; cursor: grab; }
#stage canvas:active { cursor: grabbing; }
.ov { position: absolute; z-index: 3; }
.card { background: rgba(9,16,19,0.9); border: 1px solid var(--rule); border-radius: 14px; backdrop-filter: blur(6px); }
/* top bar */
#top { left: 12px; right: 12px; top: calc(10px + env(safe-area-inset-top, 0px)); display: flex; gap: 10px; align-items: center; pointer-events: none; }
#top > * { pointer-events: auto; }
#top .title { padding: 7px 12px; font: 600 15px var(--display); letter-spacing: 0.06em; text-transform: uppercase; }
#top .title a { color: var(--dim); text-decoration: none; margin-right: 8px; }
#prog { display: flex; gap: 4px; align-items: center; padding: 8px 12px; font: 500 12px var(--body); color: var(--dim); }
#prog span { width: 16px; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.16); }
#prog span.done { background: #7fd19b; } #prog span.now { background: #ffe08a; }
#prog b { margin-left: 8px; font-weight: 500; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 34vw; }
#top .sp { flex: 1; }
/* the guide's words */
#dlg { left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: min(640px, calc(100% - 24px)); padding: 12px 16px 14px; }
#dlg .who { font: 500 11px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: #ffbf7a; }
#dlg-txt { margin: 6px 0 10px; font: 400 16px/1.5 var(--body); color: var(--fg); min-height: 3em; }
#dlg .acts { display: flex; flex-wrap: wrap; gap: 6px; }
#dlg .acts .btn { font-size: 13px; padding: 7px 11px; }
#dlg.walking #dlg-txt { min-height: 0; }
#dlg-txt b { font-weight: 700; color: #fff; }
/* intro */
#intro { inset: 0; z-index: 8; display: grid; place-items: center; background: rgba(5,10,12,0.55); }
#intro .card { width: min(560px, calc(100% - 32px)); padding: 20px 22px; }
#intro h1 { margin: 4px 0 8px; font-size: clamp(30px, 6vw, 44px); }
#intro p { color: #d3e2e3; line-height: 1.5; }
#intro .row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
#intro .small { font-size: 12px; color: var(--dim); }
@media (hover: none) and (pointer: coarse) { #keys { display: none; } }
#keys { left: 14px; bottom: 16px; font: 500 11px var(--mono); color: var(--dim); background: rgba(9,16,19,0.6); padding: 4px 8px; border-radius: 6px; }
/* sampling */
#samp { right: 12px; top: calc(62px + env(safe-area-inset-top, 0px)); width: min(380px, calc(100% - 24px)); max-height: calc(100% - 92px); overflow-y: auto; padding: 14px 16px; }
#samp h3 { margin: 2px 0 8px; font: 600 20px var(--display); letter-spacing: 0.03em; }
#samp p { margin: 6px 0; font-size: 14px; line-height: 1.5; color: #d3e2e3; }
#samp .small, .small { font-size: 12px !important; color: var(--dim) !important; }
.robin { border-left: 3px solid #ffbf7a; padding: 4px 0 4px 10px; margin: 8px 0; }
.robin b { font: 500 11px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: #ffbf7a; }
.robin p { margin: 2px 0 0 !important; }
.kit { background: rgba(255,255,255,0.04); border-radius: 10px; padding: 8px 12px; margin: 8px 0; font-size: 13px; }
.kit ul { margin: 4px 0 0; padding-left: 18px; color: #d3e2e3; }
.sites { display: grid; gap: 6px; margin: 10px 0; }
.site { display: grid; grid-template-columns: 28px 1fr; gap: 0 8px; text-align: left; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--rule); background: rgba(255,255,255,0.03); color: var(--fg); cursor: pointer; font: inherit; }
.site span { grid-row: span 2; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(134,217,221,0.16); color: var(--aqua); font: 600 13px var(--mono); }
.site b { font-size: 14px; } .site small { font-size: 12px; color: var(--dim); }
.site.done span { background: #7fd19b; color: #0b1215; }
.site:hover { border-color: var(--aqua); }
.row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.label { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; background: #f3efe2; color: #22281f; border-radius: 8px; padding: 10px 12px; font: 13px var(--mono); margin: 8px 0 12px; }
.label span { color: #6b6a5e; }
.dots { display: flex; gap: 8px; margin: 10px 0; } .dots span { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--aqua); } .dots span.on { background: var(--aqua); }
.choices { display: grid; gap: 6px; margin: 8px 0; } .choices .btn { text-align: left; }
.good { color: #9fe0b4 !important; } .hint { color: #ffcf8a !important; }
.tests { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 8px 0; }
.test { text-align: left; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--rule); background: rgba(255,255,255,0.03); color: var(--fg); cursor: pointer; font: inherit; }
.test b { display: block; font-size: 13px; } .test small { font-size: 11.5px; color: var(--dim); }
.test.done { border-left: 4px solid #8aa; } .test.good { border-left-color: #7fd19b; } .test.fair { border-left-color: #ffcf6a; } .test.poor { border-left-color: #ff8a7a; } .test.info { border-left-color: #86d9dd; }
.read { margin: 8px 0; padding: 8px 10px; border-radius: 9px; background: rgba(255,255,255,0.04); border-left: 4px solid #86d9dd; }
.read.good { border-left-color: #7fd19b; } .read.fair { border-left-color: #ffcf6a; } .read.poor { border-left-color: #ff8a7a; }
.read b { font: 600 18px var(--display); letter-spacing: 0.02em; } .read p { margin: 2px 0 0 !important; font-size: 13px !important; }
.meter { margin: 8px 0; padding: 10px; border-radius: 9px; background: #10201c; font: 500 14px var(--mono); color: #9fe0b4; } .meter b { font-size: 24px; }
.strip .pad { width: 56px; height: 56px; border-radius: 6px; border: 3px solid #eee; margin: 6px 0; }
.chart { display: flex; gap: 4px; flex-wrap: wrap; } .chart button { width: 44px; height: 38px; border-radius: 6px; border: 2px solid rgba(255,255,255,0.3); cursor: pointer; position: relative; }
.chart button span { position: absolute; left: 0; right: 0; bottom: -16px; font: 10px var(--mono); color: var(--dim); }
.strip #pfb { margin-top: 18px; }
.tview { width: 120px; height: 120px; border-radius: 50%; margin: 8px auto; background: radial-gradient(circle, #9a8a5a 0%, #6a5a3a 70%, #3a3020 100%); display: grid; place-items: center; overflow: hidden; }
.disc { width: 70px; height: 70px; border-radius: 50%; background: conic-gradient(#111 0 25%, #fff 0 50%, #111 0 75%, #fff 0); }
.tube input { width: 100%; } .trow { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--dim); }
table.res { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 13px; }
table.res td, table.res th { padding: 5px 6px; border-bottom: 1px solid var(--rule); text-align: left; }
table.res tr.good td:last-child { color: #9fe0b4; } table.res tr.fair td:last-child { color: #ffcf6a; } table.res tr.poor td:last-child { color: #ff8a7a; }
table.cmp td:not(:first-child), table.cmp th { text-align: right; font-family: var(--mono); }
/* the microscope */
#scope { inset: 0; z-index: 9; display: grid; place-items: center; background: rgba(5,10,12,0.7); }
.scope-card { width: min(520px, calc(100% - 20px)); padding: 12px 14px; }
.scope-top { display: flex; justify-content: space-between; align-items: center; font: 600 15px var(--display); letter-spacing: 0.05em; text-transform: uppercase; }
.field { --blur: 2px; position: relative; width: min(420px, 82vw, 56vh); aspect-ratio: 1; margin: 10px auto; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 45% 42%, #fbfff4 0%, #eef3e6 45%, #cfd8c4 80%, #1b2018 100%); box-shadow: 0 0 0 6px #111, inset 0 0 40px rgba(0,0,0,0.35); }
.field .bug { position: absolute; left: 0; top: 0; padding: 0; border: 0; background: none; cursor: pointer; filter: blur(var(--blur)); }
.field .bug svg { width: 100%; height: 100%; display: block; opacity: 0.92; }
.field .cross { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(transparent 49.8%, rgba(0,0,0,0.12) 49.8% 50.2%, transparent 50.2%), linear-gradient(90deg, transparent 49.8%, rgba(0,0,0,0.12) 49.8% 50.2%, transparent 50.2%); }
.scope-ctl { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--dim); }
.scope-ctl input { vertical-align: middle; width: 140px; }
.mag { display: flex; gap: 4px; } .mag button { padding: 5px 9px; border-radius: 12px; border: 1px solid var(--rule); background: transparent; color: var(--dim); font: 500 12px var(--mono); cursor: pointer; } .mag button[aria-pressed="true"] { background: var(--aqua); color: var(--aqua-ink); border-color: var(--aqua); }
/* an organism's card, and the field guide */
#ocard { inset: 0; z-index: 10; display: grid; place-items: center; background: rgba(5,10,12,0.6); }
.ocard { position: relative; width: min(640px, calc(100% - 20px)); max-height: calc(100% - 30px); overflow-y: auto; padding: 16px; display: grid; grid-template-columns: 220px 1fr; gap: 16px; }
.ocard .close { position: absolute; right: 10px; top: 10px; }
.oart { position: relative; } .oart svg { width: 100%; border-radius: 50%; box-shadow: 0 0 0 5px #111, inset 0 0 30px rgba(0,0,0,0.3); display: block; }
.oart span { display: block; text-align: center; margin-top: 8px; font: 500 12px var(--mono); color: var(--dim); }
.otxt h3 { margin: 2px 0 2px; font: 600 26px var(--display); letter-spacing: 0.03em; } .otxt .what { color: #ffbf7a !important; margin: 0 0 8px !important; }
.otxt p { font-size: 14px; line-height: 1.5; color: #d3e2e3; margin: 6px 0; } .otxt .tells { background: rgba(127,209,155,0.08); border-radius: 9px; padding: 8px 10px; } .otxt .tells b { display: block; font: 500 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: #9fe0b4; }
.ocard.guide { display: block; } .ocard.guide h3 { margin: 2px 0 10px; font: 600 24px var(--display); }
.ggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.gitem { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px; border-radius: 10px; border: 1px solid var(--rule); background: rgba(255,255,255,0.03); color: var(--fg); font: inherit; cursor: pointer; }
.gitem svg { width: 74px; height: 74px; border-radius: 50%; } .gitem b { font-size: 12.5px; } .gitem small { font-size: 10.5px; color: var(--dim); }
.gitem.locked { cursor: default; } .gitem.locked svg { filter: grayscale(1) brightness(0.25); }
@media (max-width: 640px) {
  .ocard { grid-template-columns: 1fr; } .oart svg { width: 180px; margin: 0 auto; }
  #samp { top: auto; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); max-height: 52%; }
  #top .title span { display: none; } #top .title a { margin: 0; } #prog b { max-width: 42vw; }
  #top { flex-wrap: wrap; } #top .sp { flex-basis: 100%; height: 0; } /* the buttons on their own row, under the progress */
  #top .btn { padding: 6px 10px; font-size: 13px; }
  #dlg-txt { font-size: 15px; }
}
[hidden] { display: none !important; }
/* the E. coli culture plate: tap each colony to count it */
.plate { position: relative; width: 170px; height: 170px; margin: 8px auto; border-radius: 50%; background: radial-gradient(circle, #f6e7c6 0%, #ecd9a8 70%, #c9b17a 100%); box-shadow: 0 0 0 4px #e9ecef, 0 0 0 5px #9aa; }
.plate .col { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; padding: 0; border-radius: 50%; border: 0; background: #5b2a6e; cursor: pointer; }
.plate .col.on { outline: 2px solid #ffe08a; }

/* the rock bag (rocks.js) */
svg.lens { display: block; width: 100%; max-width: 360px; margin: 8px auto; border-radius: 14px; box-shadow: 0 0 0 4px #111, inset 0 0 20px rgba(0,0,0,0.4); }
.field.ts { background: #fdfbf4; }
.field.ts svg { width: 100%; height: 100%; display: block; }
.field.ts svg.xp { background: #050505; }
.field.ts .tf { cursor: pointer; }
.scope-ctl label { display: flex; align-items: center; gap: 8px; }
ol.tl { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
ol.tl li { display: grid; gap: 1px; padding: 6px 10px; border-left: 3px solid #86d9dd; background: rgba(255,255,255,0.03); border-radius: 0 8px 8px 0; font-size: 13px; }
ol.tl b { font: 600 12px var(--mono); color: #ffbf7a; }
#win-btn[aria-pressed="true"] { background: #dfeff5; color: #0b1215; border-color: #dfeff5; } /* winter mode on, as at the helm */

/* a story scene's hold-to-press button: no long-press menu on phones */
[data-act="sc:hold"] { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
