* { box-sizing: border-box; }
:root { font: 16px/1.5 "Trebuchet MS", system-ui, sans-serif; color: #233d33; background: #e6ebdf; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 290px; }
main { width: min(100% - 32px, 1440px); margin: 0 auto; padding-bottom: 30px; }
header { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; border-bottom: 1px solid #aeb9a8; }
.header-actions,.nature-heading-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:6px}
.feedback-link{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:6px 10px;border:1px solid #879e77;border-radius:6px;background:#fffdf4;color:#264339;text-align:center;text-decoration:none}
.feedback-link:hover{text-decoration:underline}
.nature-heading-actions{flex:0 0 auto;max-width:50%}
.brand { color: #183c32; text-decoration: none; font-weight: bold; letter-spacing: .08em; }
.intro { padding: clamp(18px, 3vw, 45px) 0 20px; }
h1, h2, .county-findings h4 { font-family: Georgia, serif; margin: 0; font-weight: normal; }
h1 { font-size: clamp(32px, 5vw, 65px); line-height: 1.08; letter-spacing: -.025em; }
h2 { font-size: clamp(22px, 3vw, 32px); }
.intro p { margin: 9px 0 0; }
.school-retk-entry { display:flex; flex-wrap:wrap; align-items:flex-start; gap:8px; margin-top:12px; }
.school-retk-entry>button, .journal-school-next { min-height:44px; }
.school-retk-entry>p { margin:8px 0; font-weight:bold; }
.class-experiment-list[open] { flex-basis:100%; }
.class-experiment-list summary { width:fit-content; min-height:44px; padding:9px 12px; border:1px solid #879e77; border-radius:8px; background:#fffdf4; color:#264339; font-weight:bold; cursor:pointer; }
.class-experiments { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.class-experiments button { min-height:44px; max-width:100%; text-align:left; }
.layout { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(235px, 1fr); align-items: start; gap: 16px; }
.atlas, .guide { border: 1px solid #aeb9a8; padding: clamp(14px, 2vw, 26px); border-radius: 14px; }
.atlas { background: #f0ead4 linear-gradient(130deg, #f7f0dc, #dce5d2); }
.guide { background: #183c32; color: #fff3da; color-scheme: dark; }
.atlas-title, .book-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.book-heading { margin-bottom: 12px; }
#map { display: block; width: 100%; max-height: 62vh; min-height: 210px; overflow: visible; }
.land { cursor: pointer; stroke: #66745c; stroke-width: 1.35; stroke-linejoin: round; }
.land:hover, .land:focus-visible { fill: #f2c980; stroke: #46341e; stroke-width: 2; }
.land.lit { fill: #8eac79; }
.land.selected { fill: #e3b674; stroke: #785d3b; stroke-width: 2.2; }
.placename { font: bold 13px "Trebuchet MS", sans-serif; fill: #263d32; stroke: #ebe6cc; stroke-width: 2px; paint-order: stroke; pointer-events: none; }
.pin { pointer-events: none; fill: #6a482b; stroke: #fff2ca; stroke-width: 1.3; }
.sea { font: italic 16px Georgia, serif; fill: #476d65; letter-spacing: 1px; }
.atlas-muted-county { fill: #d3dacd; stroke: #8c9a89; pointer-events: none; }
.map-foot { margin: 10px 0 2px; border-top: 1px solid #aeb9a8; padding-top: 8px; }
.atlas small { color: #435d51; }
.atlas:has(.illustrated) { background: #f7f9f4; }
.atlas-views { display: inline-flex; gap: 2px; padding: 3px; margin: 8px 0 2px; background: #e4eae3; border-radius: 9px; }
.atlas-views button { color: #345248; background: transparent; border: 0; min-height: 42px; }
.atlas-views button[aria-pressed=true] { color: #fff; background: #284f45; }
#map-sheet { width: 100%; }
#map-sheet.illustrated { overflow: auto; border: 1px solid #d5dfd9; border-radius: 6px; background: #fffefa; isolation: isolate; }
.illustrated #map { height: auto; max-height: none; min-height: 0; aspect-ratio: 1126/784; }
#map-sheet.enlarged { max-height: min(72dvh, 680px); }
.enlarged #map { width: max(160%, 860px); }
#map-zoom { font-size: .88rem; margin-top: 6px; background: white; color: #345248; }
.illustrated .land { fill: #f0efd8; stroke: #a4a48b; stroke-width: 1.05; }
.illustrated .land:nth-of-type(3n) { fill: #e7ecd5; }
.illustrated .land.lit { fill: #b6d2b1; }
.illustrated .land.selected,.illustrated .land:hover,.illustrated .land:focus-visible { fill: #f2d89e; stroke: #785a35; stroke-width: 2.4; }
.illustrated .placename { font: bold 13px Georgia, serif; fill: #223f34; stroke: #f9fbf4; stroke-width: 3px; }
.paper-geography,.paper-leader { pointer-events: none; }
.paper-relief { mix-blend-mode: multiply; }
.paper-relief image { mix-blend-mode: multiply; }
.paper-feature-name { font: italic 10.5px Georgia,serif; fill: #384d45; paint-order: stroke; stroke: #fffdf0; stroke-width: 2px; }
.paper-sea { font: italic 15px Georgia, serif; letter-spacing: 1px; fill: #507f85; }
.paper-scale,.paper-compass { font: 11px Georgia, serif; color: #526e64; fill: #526e64; }
.paper-place { cursor: pointer; }
.paper-hit { fill: transparent; }
.paper-place:focus-visible { outline: none; }
.paper-place:focus-visible .paper-hit { stroke: #8d632f; stroke-width: 2; }
.paper-place image { mix-blend-mode: multiply; }
.paper-place-name { font: italic 12px Georgia, serif; fill: #244e41; paint-order: stroke; stroke: #fffefa; stroke-width: 3px; }
.paper-leader { fill: none; stroke: #799788; stroke-width: 1; stroke-dasharray: 2.5 3; }
.paper-place:hover text,.paper-place:focus-visible text,.paper-place[aria-pressed=true] text { text-decoration: underline; font-weight: bold; }
#atlas-landscape { margin: 0 0 16px; background: #fffefa; color: #264339; border-radius: 8px; overflow: hidden; }
#atlas-landscape img { display: block; width: 100%; height: auto; max-height: 270px; object-fit: contain; mix-blend-mode: multiply; }
#atlas-landscape figcaption { padding: 5px 14px 12px; }
#atlas-landscape h3 { margin: 0; font: 22px/1.2 Georgia, serif; }
#atlas-landscape p { margin: 4px 0 0; font-size: .91rem; }
.map-conclusion-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 12px; margin: 8px 0; }
.map-conclusion-filter p { flex-basis: 100%; margin: 0; }
.guide select { width: 100%; padding: 8px; margin: 5px 0 18px; font: inherit; background: #254a40; color: inherit; border: 1px solid #8a9e8e; border-radius: 6px; }
.county-findings h4 { font-size: 24px; }
.county-findings ul { padding-left: 1.4em; }
.county-findings button { margin: 0 6px 6px 0; }
button { font: inherit; cursor: pointer; min-height: 40px; padding: 6px 12px; border-radius: 6px; color: #fff3da; background: #244e40; border: 1px solid #829a82; }
button.primary { background: #e5bf7d; color: #26382c; border-color: #b68b49; font-weight: bold; }
button:disabled { opacity: .60; cursor: default; }
:focus-visible { outline: 3px solid #ac7727; outline-offset: 3px; }
dialog { background: #18342f; color: #fff3da; border: 1px solid #879e77; border-radius: 12px; max-height: 92dvh; padding: clamp(12px, 2.6vw, 26px); color-scheme: dark; }
dialog::backdrop { background: #142e27b8; }
#book textarea { background: #122a24; color: #fff3da; border: 1px solid #829a82; border-radius: 6px; }
#nature-saved { color: #325d40; font-weight: bold; }
@media (max-width: 700px) {
  .layout { grid-template-columns: 1fr; }
  .nature-layout { grid-template-columns: 1fr; }
  #nature-view { height: min(48dvh, 360px); min-height: 230px; }
}
#book{width:min(800px,94vw);overflow-y:auto;scroll-padding-top:5.5em}
#book-conclusion-summary{position:sticky;top:0;z-index:1;display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:.3em .85em;padding:.55em .75em;background:#18342f;border:1px solid #879e7766;border-radius:8px}
#book-conclusion-summary fieldset{display:flex;flex-wrap:wrap;gap:.3em .85em;min-width:0;margin:0;padding:0;border:0}
#book-conclusion-summary label{display:inline-flex;align-items:center;gap:.35em;cursor:pointer}
#book-conclusion-summary input{accent-color:#e8bc78}
#book[data-direct-comparison]{scroll-padding-top:3.75em}
#book[data-direct-comparison] .book-heading{position:sticky;top:0;z-index:2;background:#18342f;padding-block:4px}
#book[data-direct-comparison] #book-conclusion-summary{position:static}
.journal-drafts-only > :not(#nature-journal),.journal-drafts-only .journal-overview,.journal-drafts-only .journal-comparison-choice,
.journal-ready-only > :not(#nature-journal),.journal-ready-only #nature-journal > :not(.journal-ready-view){display:none}
.journal-ready-view section+section{margin-top:1em;border-top:1px solid #879e7666}
.journal-ready-view h4{margin:.65em 0}
.journal-completed-conclusion + .journal-completed-conclusion{margin-top:.4em;border-top:1px solid #879e7666}
.journal-completed-conclusion summary{padding-inline:.25em}
.journal-completed-text{display:block;margin:.25em 0 0 1.15em;white-space:pre-wrap;overflow-wrap:anywhere}
.journal-ready-view section p{margin:.25em 0 .8em;white-space:pre-wrap;overflow-wrap:anywhere}
#nature-journal{padding-bottom:1em;border-bottom:1px solid #879e7766}
#nature-journal summary{cursor:pointer;padding:.4em 0;line-height:1.45}
#nature-journal ul{margin:.25em 0 .65em;padding-left:1.5em}
#nature-journal li+li{margin-top:.35em}
.nature-comparison{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr));gap:.8em;margin:.6em 0}
.nature-comparison>div{border:1px solid #879e7766;border-radius:8px;padding:.65em}
.nature-comparison h4{margin:0}
.nature-comparison-summary{display:grid;grid-template-columns:fit-content(8em) 1fr;gap:.3em .65em;margin:.75em 0 .4em;padding:.6em .75em;background:#24453c;border-radius:8px;font-size:.95em}
.nature-comparison-summary dt{font-weight:bold;color:#f3d28e}
.nature-comparison-summary dd{margin:0;overflow-wrap:anywhere}
.nature-comparison mark{background:#f3d28e;color:#25382b;border-radius:.2em;padding:0 .12em}
.nature-change-label{display:inline-block;margin-right:.25em;padding:0 .35em;border-radius:.25em;background:#d7e7c8;color:#23372b;font-weight:bold}
.journal-next,.journal-school-next{margin-top:.65em;margin-right:.45em}
.journal-school-finished{font-weight:bold}
.nature-ready:not([hidden]){display:block;color:#bce6a9;margin-top:.4em}
.county-findings button+button{margin:.25em 0 .25em .4em;color:#fff4d8}
#nature-dialog{color-scheme:light;width:min(1220px,96vw);max-width:96vw;max-height:94dvh;padding:clamp(12px,2vw,24px);background:#f5f2e7;color:#273e34;border:1px solid #859b83;border-radius:12px;overscroll-behavior:contain}
#nature-dialog::backdrop{background:#102c27d9}
.nature-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.nature-heading>div{min-width:0;overflow-wrap:anywhere;hyphens:auto}
#nature-title{margin:2px 0;font:600 clamp(21px,3vw,34px)/1.12 Georgia,serif;color:#273e34}
.nature-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(255px,.86fr);gap:18px}
.nature-layout figure{min-width:0;margin:0}
#nature-view{position:relative;height:clamp(330px,59vh,660px);background:#d3ded5;border-radius:8px;overflow:hidden}
#nature-view #scene{position:absolute;inset:0;width:100%;height:100%;display:block}
#nature-views{position:absolute;top:8px;left:8px;display:flex;gap:4px;flex-wrap:wrap}
#nature-dialog [hidden]{display:none!important}
#nature-dialog button{background:#fffdf4;color:#264339;border:1px solid #92a58e;border-radius:6px;padding:7px 10px;font:inherit;min-height:36px}
#nature-dialog button.action,#nature-back,#nature-dialog button[aria-pressed=true]{background:#295a4c;color:white}
#nature-dialog button:disabled{opacity:.55}
#nature-dialog button:focus-visible,#nature-dialog input:focus-visible{outline:3px solid #bf8a36;outline-offset:2px}
#nature-dialog figure button{font-size:.84rem}
#nature-caption,#nature-dialog .detail,#nature-dialog small{font-size:.82rem;color:#4b6251}
#nature-caption{margin-top:7px}
.nature-panel{min-width:0}
#nature-dialog p{color:inherit;margin:4px 0 12px}
#nature-dialog h3{margin:10px 0 4px;color:#294939}
#nature-controls{border-top:1px solid #bbc6b8;padding-top:10px}
#nature-controls input[type=range]{width:100%;accent-color:#386557}
#nature-front-controls{margin-bottom:12px;padding:8px 12px;border:1px solid #bbc6b8;border-radius:8px;background:#fffdf4}
#nature-front-controls #nature-controls{border:0;padding:0}
#nature-dialog #nature-front-controls #nature-saved{margin:0;font-size:.88rem}
#nature-dialog[data-station="0079"] #nature-saved{font-weight:normal}
#nature-dialog[data-station="0079"] #nature-saved[data-saved]{font-weight:bold;color:#295a4c}
.emajogi-reading{display:flex;flex-wrap:wrap;justify-content:space-between;gap:0 12px;font-weight:bold}
.emajogi-reading output{font-variant-numeric:tabular-nums}
#nature-water-level{display:block;min-height:44px;margin:0}
#nature-controls fieldset{margin:0 0 7px;padding:0;border:0}
#nature-controls legend{font-weight:bold}
#nature-controls .choices{display:flex;flex-wrap:wrap;gap:4px}
#nature-controls fieldset button{margin:2px 4px 2px 0}
#nature-controls canvas{display:block;width:100%;max-width:540px;height:auto}
#nature-dialog #nature-status{margin:12px 0;border-left:3px solid #a47737;padding-left:9px}
#nature-result-actions:not(:has(button:not([hidden]))){display:none}
#nature-result-actions{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
#nature-dialog #nature-result-actions button{min-height:44px}
#nature-front-controls #nature-result-actions{margin:6px 0 0}
#nature-dialog[data-station="0052"] #nature-controls button{min-height:44px}
.bog-readings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:6px 0}
.bog-readings div{background:#e8eee1;border-radius:6px;padding:5px 8px}
.bog-readings dt{font-weight:bold}
.bog-readings dd{margin:0;font-size:.86rem}
.bog-buttons{display:flex;flex-wrap:wrap;gap:6px;margin:5px 0}
.reed-actions,.drumlin-actions,.karst-actions,.river-actions,.flume-actions,.moss-actions,.dune-actions,.dew-actions,.crater-actions,.valley-actions,.sight-actions{display:flex;flex-wrap:wrap;gap:6px;margin:5px 0}
.reed-result canvas{border-radius:6px}
#nature-dialog:is([data-station="0037"],[data-station="0039"],[data-station="0045"],[data-station="0050"],[data-station="0056"],[data-station="0060"],[data-station="0064"],[data-station="0068"],[data-station="0071"],[data-station="0074"],[data-station="0081"],[data-station="0084"],[data-station="0087"]) #nature-controls button{min-height:44px}
#nature-dialog[data-station="0039"] #nature-controls p{margin:4px 0}
.lighthouse-reading{font-weight:bold}
#keila-aeg,#narva-time,#rakvere-aeg,#parnu-aeg,#puhajarv-aeg,#kaali-vesi,#voru-korgus{display:block;min-height:32px;margin:0}
.crater-level,.sight-reading{display:flex;flex-wrap:wrap;justify-content:space-between;gap:0 8px;font-weight:bold}
#nature-dialog .sight-previous,#nature-dialog .sight-result{margin:4px 0}
.sight-result{font-weight:bold}
#nature-dialog :is(.sandstone-prompt,.sandstone-reading,.sandstone-earlier){margin:4px 0}
.sandstone-layers{display:grid;gap:4px}
#nature-controls .sandstone-layers button{display:grid;grid-template-columns:8em minmax(0,1fr);align-items:center;gap:6px;margin:0;text-align:left;font-size:.88rem}
.sandstone-sample{position:relative;display:block;min-height:22px;border-radius:4px;background:var(--stone)}
.sandstone-sample::before{content:"";position:absolute;inset:calc(50% - 1.5px) 7px;background:var(--ink)}
.sandstone-sample[data-pattern="dashed"]::before{background:repeating-linear-gradient(90deg,var(--ink) 0 9px,transparent 9px 16px)}
.sandstone-sample[data-pattern="slanted"]::before{inset:5px 7px;background:repeating-linear-gradient(125deg,transparent 0 9px,var(--ink) 9px 12px,transparent 12px 17px)}
.sandstone-sample[data-pattern="dotted"]::before{inset:2px 7px;background:radial-gradient(circle,var(--ink) 1.5px,transparent 2.5px) 0 0/12px 9px}
.crater-reading{display:block;font-variant-numeric:tabular-nums}
#nature-dialog .crater-previous{margin:2px 0 6px}
:is(.river-results,.flume-results,.moss-results,.dune-results,.dew-results){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:6px 0}
:is(.river-results,.flume-results,.moss-results,.dune-results,.dew-results) div{padding:5px 8px;border-radius:6px;background:#e8eee1}
:is(.river-results,.flume-results,.moss-results,.dune-results,.dew-results) dt{font-weight:bold}
:is(.river-results,.flume-results,.moss-results,.dune-results,.dew-results) dd{margin:0;font-size:.86rem}
.dune-results div{border-inline-start:4px solid var(--post-color)}
.valley-results{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:6px 0;font-size:.88rem}
.valley-results div{background:#e8eee1;border-radius:6px;padding:5px 6px}
.valley-results dt{font-weight:bold;overflow-wrap:anywhere}
.valley-results dd{margin:0;font-variant-numeric:tabular-nums}
#nature-dialog .valley-previous{margin:2px 0 6px;font-size:.82rem}
.valley-chart{border-radius:5px}
.drumlin-readout,.karst-reading{font-weight:bold;font-variant-numeric:tabular-nums}
#nature-dialog details a{color:#295a4c}
@media(max-width:740px){#nature-dialog{width:98vw;max-width:98vw;padding:10px}.nature-layout{grid-template-columns:1fr;gap:10px}#nature-view{height:clamp(230px,39dvh,360px)}.nature-heading{align-items:flex-start}#nature-back{flex-shrink:0}}
@media (max-width: 700px) { .nature-layout { grid-template-columns: 1fr; } #nature-view { height: min(48dvh, 360px); min-height: 230px; } }
