{"id":2489,"date":"2026-04-07T10:39:27","date_gmt":"2026-04-07T08:39:27","guid":{"rendered":"https:\/\/www.petrklichelp.cz\/?page_id=2489"},"modified":"2026-04-19T16:51:09","modified_gmt":"2026-04-19T14:51:09","slug":"test-page","status":"publish","type":"page","link":"https:\/\/www.petrklichelp.cz\/en\/test-page\/","title":{"rendered":"Test Page"},"content":{"rendered":"\n\n\n\n\n\n\n\n<div id=\"envSim1\" class=\"envsim\">\n<style>\n#envSim1,#envSim1*{box-sizing:border-box}\n#envSim1{\n  --bg1:#eef1ed;--bg2:#dde3dc;--text:#1f2a23;--muted:#5f6c63;\n  --line:rgba(31,42,35,0.12);--card:rgba(255,255,255,0.72);\n  --card-strong:rgba(255,255,255,0.84);--accent:rgba(68,83,74,0.92);\n  width:100%;max-width:1400px;margin:0 auto;padding:14px;\n  font-family:Inter,Arial,sans-serif;color:var(--text)\n}\n#envSim1 .wrap{\n  width:100%;\n  background:radial-gradient(circle at top left,rgba(255,255,255,.8),transparent 30%),\n    linear-gradient(180deg,var(--bg1) 0%,var(--bg2) 100%);\n  border-radius:24px;padding:14px;overflow:hidden\n}\n#envSim1 .header{margin-bottom:18px}\n#envSim1 .header h1{margin:0 0 8px;font-size:clamp(1.65rem,3vw,2.35rem);line-height:1.1;font-weight:700;letter-spacing:-.02em}\n#envSim1 .header p{margin:0;color:var(--muted);line-height:1.55;font-size:1rem}\n#envSim1 .grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(320px,.92fr);gap:18px;align-items:start}\n#envSim1 .panel{background:var(--card);border:1px solid var(--line);border-radius:20px;box-shadow:0 12px 30px rgba(25,35,28,.08);backdrop-filter:blur(12px);min-width:0}\n#envSim1 .scene-panel,#envSim1 .control-panel{padding:16px}\n#envSim1 .control-panel{position:sticky;top:18px}\n#envSim1 canvas.scene{width:100%;height:auto;aspect-ratio:980\/560;display:block;border-radius:18px;border:1px solid rgba(31,42,35,.08)}\n#envSim1 .section{margin-top:14px;padding:14px;border:1px solid var(--line);border-radius:16px;background:var(--card-strong)}\n#envSim1 .section:first-child{margin-top:0}\n#envSim1 .section h3{margin:0 0 10px;font-size:1rem;font-weight:700;line-height:1.3}\n#envSim1 .muted{color:var(--muted);line-height:1.55}\n#envSim1 .level-title{font-size:clamp(1.08rem,2vw,1.25rem);line-height:1.3;margin:0 0 8px;font-weight:700}\n#envSim1 .level-tag{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;background:rgba(68,83,74,.08);border:1px solid var(--line);color:var(--muted);font-size:.8rem;font-weight:600;letter-spacing:.04em;margin-bottom:10px}\n#envSim1 .choices{display:grid;gap:10px;margin-top:12px}\n#envSim1 .choice-btn,.env-small-btn,.main-btn,.toggle-btn{appearance:none;border:1px solid var(--line);background:rgba(255,255,255,.62);color:var(--text);border-radius:14px;padding:12px 14px;font:inherit;line-height:1.4;cursor:pointer;transition:all .18s ease;min-height:46px;width:100%;text-align:left}\n#envSim1 .choice-btn:hover,.env-small-btn:hover,.main-btn:hover,.toggle-btn:hover{background:rgba(255,255,255,.88);transform:translateY(-1px)}\n#envSim1 .choice-btn.selected,.toggle-btn.active{background:rgba(68,83,74,.16);border-color:rgba(68,83,74,.25);box-shadow:inset 0 0 0 1px rgba(68,83,74,.1)}\n#envSim1 .choice-btn.harmful{border-color:rgba(180,60,40,.2)}\n#envSim1 .choice-btn.harmful:hover,#envSim1 .choice-btn.harmful.selected{border-color:rgba(180,60,40,.4);background:rgba(180,60,40,.06)}\n#envSim1 .choice-indicator{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:8px;vertical-align:middle;flex-shrink:0}\n#envSim1 .actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}\n#envSim1 .actions>*{flex:1 1 140px}\n#envSim1 .main-btn{background:var(--accent);color:#fff;border-color:var(--accent);text-align:center}\n#envSim1 .main-btn[disabled]{opacity:.45;cursor:not-allowed;transform:none}\n#envSim1 .toggle-row{display:flex;gap:8px;flex-wrap:wrap}\n#envSim1 .toggle-row .toggle-btn{flex:1 1 100px;text-align:center;font-size:.88rem;padding:9px 10px}\n#envSim1 .stats-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}\n#envSim1 .stat-card{padding:12px;border-radius:14px;background:rgba(255,255,255,.52);border:1px solid var(--line);min-width:0;transition:border-color .3s ease,transform .25s ease}\n#envSim1 .stat-card.improving{border-color:rgba(50,120,60,.3);transform:translateY(-1px)}\n#envSim1 .stat-card.worsening{border-color:rgba(160,50,30,.3);transform:translateY(-1px)}\n#envSim1 .stat-label{font-size:.9rem;color:var(--muted);margin-bottom:4px}\n#envSim1 .stat-row{display:flex;align-items:baseline;gap:8px;margin-bottom:8px}\n#envSim1 .stat-value{font-size:1.35rem;font-weight:700}\n#envSim1 .stat-delta{font-size:.82rem;font-weight:700;opacity:0;transition:opacity .3s ease}\n#envSim1 .stat-delta.vis{opacity:1}\n#envSim1 .stat-delta.pos{color:#3a7a4a}\n#envSim1 .stat-delta.neg{color:#b03020}\n#envSim1 .bar{width:100%;height:8px;background:rgba(31,42,35,.08);border-radius:999px;overflow:hidden}\n#envSim1 .bar>span{display:block;height:100%;background:rgba(68,83,74,.62);border-radius:inherit;transition:width .65s cubic-bezier(.34,1.56,.64,1)}\n#envSim1 .bar>span.low{background:rgba(160,50,30,.62)}\n#envSim1 .bar>span.mid{background:rgba(170,120,30,.62)}\n#envSim1 .preview-box,.system-response,.summary-box{padding:14px;border-radius:14px;background:rgba(255,255,255,.58);border:1px solid var(--line);line-height:1.55;min-width:0;overflow-wrap:anywhere;margin-top:14px}\n#envSim1 .preview-box.active{border-color:rgba(68,83,74,.3);transform:translateY(-1px)}\n#envSim1 .system-response.updated{border-color:rgba(68,83,74,.35);animation:flashBorder .8s ease}\n@keyframes flashBorder{0%{border-color:rgba(68,83,74,.8);box-shadow:0 0 18px rgba(68,83,74,.12)}100%{border-color:rgba(68,83,74,.35);box-shadow:none}}\n#envSim1 .effect-lines{list-style:none;padding:0;margin:10px 0 0;display:flex;flex-direction:column;gap:5px}\n#envSim1 .effect-line{display:flex;align-items:center;gap:8px;font-size:.84rem}\n#envSim1 .effect-dot{width:6px;height:6px;border-radius:50%;flex-shrink:0}\n#envSim1 .effect-dot.pos{background:#3a7a4a}\n#envSim1 .effect-dot.neg{background:#b03020}\n#envSim1 .effect-dot.neu{background:var(--muted)}\n#envSim1 .footer-note{font-size:.88rem;color:var(--muted);margin-top:10px;line-height:1.5}\n#envSim1 .hidden{display:none!important}\n#envSim1 ul.clean{margin:10px 0 0;padding-left:18px}\n#envSim1 ul.clean li{margin-bottom:6px}\n#envSim1 .pill{display:inline-block;padding:5px 10px;border-radius:999px;background:rgba(68,83,74,.09);border:1px solid var(--line);font-size:.86rem;margin-right:6px;margin-bottom:6px}\n#envSim1 .final-type{font-size:1.15rem;font-weight:700;margin-bottom:10px}\n#envSim1 .clean-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:7px}\n#envSim1 .clean-list li{padding:9px 12px;border-radius:11px;background:rgba(255,255,255,.45);border:1px solid var(--line);font-size:.86rem;color:var(--muted);line-height:1.48}\n#envSim1 .clean-list li strong{color:var(--text);font-weight:600}\n#envSim1 .small-label{font-size:.78rem;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--muted);margin:14px 0 8px}\n@media(max-width:1024px){#envSim1 .grid{grid-template-columns:1fr}#envSim1 .control-panel{position:static}}\n@media(max-width:767px){#envSim1{padding:8px}#envSim1 .wrap{padding:10px;border-radius:18px}#envSim1 .scene-panel,#envSim1 .control-panel{padding:12px}#envSim1 .section{padding:12px}#envSim1 .stats-grid{grid-template-columns:1fr}#envSim1 .actions{flex-direction:column}#envSim1 .actions>*{flex:1 1 auto}#envSim1 .toggle-row{flex-direction:column}#envSim1 .toggle-row .toggle-btn{flex:1 1 auto}}\n#envSim1 .mute-btn{position:absolute;top:10px;right:10px;z-index:10;appearance:none;border:1px solid rgba(31,42,35,.18);background:rgba(245,248,244,.82);color:var(--text);border-radius:999px;padding:6px 14px 6px 10px;font:inherit;font-size:.82rem;font-weight:600;cursor:pointer;transition:all .18s ease;display:flex;align-items:center;gap:6px;backdrop-filter:blur(8px);box-shadow:0 2px 8px rgba(25,35,28,.1)}\n#envSim1 .mute-btn:hover{background:rgba(255,255,255,.95);transform:translateY(-1px)}\n#envSim1 .mute-btn.muted{background:rgba(180,60,40,.08);border-color:rgba(180,60,40,.25);color:#b03020}\n#envSim1 .scene-panel{position:relative}\n#envSim1 .launch-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}\n#envSim1 .launch-row .main-btn,#envSim1 .launch-row .env-small-btn{width:auto;min-width:180px}\n#envSim1 .immersive-toggle{display:none}\n#envSim1 .immersive-topbar{display:none}\n#envSim1 .immersive-hint{display:none}\n#envSim1.immersive{position:fixed;inset:0;z-index:99999;max-width:none;padding:0;background:linear-gradient(180deg,var(--bg1) 0%,var(--bg2) 100%)}\n#envSim1.immersive .wrap{height:100dvh;border-radius:0;padding:0;display:flex;flex-direction:column;overflow:hidden}\n#envSim1.immersive .header{display:none}\n#envSim1.immersive .grid{display:grid;grid-template-columns:1fr;height:100%;gap:0}\n#envSim1.immersive .panel{border-radius:0;border-left:none;border-right:none;box-shadow:none;background:rgba(255,255,255,.18);backdrop-filter:blur(10px)}\n#envSim1.immersive .scene-panel{padding:0;display:flex;flex-direction:column;min-height:0;background:linear-gradient(180deg,rgba(255,255,255,.18),rgba(255,255,255,.04));border:none}\n#envSim1.immersive .scene-extras{display:none}\n#envSim1.immersive .immersive-topbar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:calc(env(safe-area-inset-top,0px) + 10px) 12px 10px 12px}\n#envSim1.immersive .immersive-topbar .label{font-size:.82rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}\n#envSim1.immersive .scene{flex:1 1 auto;width:100%;height:100%;aspect-ratio:auto;border-radius:0;border:none;min-height:34dvh;max-height:54dvh}\n#envSim1.immersive .control-panel{position:relative;top:auto;padding:12px 12px calc(12px + env(safe-area-inset-bottom,0px));border-top-left-radius:22px;border-top-right-radius:22px;background:rgba(255,255,255,.92);margin-top:-14px;max-height:48dvh;overflow:auto;border:1px solid rgba(31,42,35,.08)}\n#envSim1.immersive .launch-row{display:none}\n#envSim1.immersive .immersive-hint{display:block;font-size:.84rem;color:var(--muted);margin:0 0 10px}\n#envSim1.immersive .system-response .actions,#envSim1.immersive .section .actions{position:sticky;bottom:0;background:linear-gradient(180deg,rgba(255,255,255,0),rgba(255,255,255,.98) 26%);padding-top:10px}\n@media(max-width:767px){#envSim1 .immersive-toggle{display:inline-flex;align-items:center;justify-content:center}#envSim1 .launch-row{margin-top:12px}#envSim1 .launch-row .main-btn,#envSim1 .launch-row .env-small-btn{flex:1 1 100%;width:100%}}\n\n<\/style>\n\n<div class=\"wrap\">\n  <div class=\"header\">\n    <h1>Environmental Decision Simulator<\/h1>\n    <p>Make choices, preview the impact, confirm your decision, and hear the environment respond through adaptive sound.<\/p>\n    <div class=\"launch-row\">\n      <button id=\"envLaunchBtn\" class=\"main-btn immersive-toggle\" type=\"button\">Launch Mobile Mode<\/button>\n      <button id=\"envExitBtn\" class=\"env-small-btn immersive-toggle hidden\" type=\"button\">Exit Full Screen<\/button>\n    <\/div>\n  <\/div>\n\n  <div class=\"grid\">\n    <div class=\"panel scene-panel\">\n      <div class=\"immersive-topbar\">\n        <div>\n          <div class=\"label\">Live simulation<\/div>\n          <div class=\"muted\" style=\"font-size:.86rem\">Watch the environment change while you answer below.<\/div>\n        <\/div>\n        <button id=\"envExitTopBtn\" class=\"env-small-btn\" type=\"button\" style=\"width:auto;min-width:120px\">Exit<\/button>\n      <\/div>\n      <button id=\"envMuteBtn\" class=\"mute-btn\" type=\"button\" aria-label=\"Mute sound\">\n        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polygon points=\"11 5 6 9 2 9 2 15 6 15 11 19 11 5\"\/><path d=\"M15.54 8.46a5 5 0 0 1 0 7.07\"\/><path d=\"M19.07 4.93a10 10 0 0 1 0 14.14\"\/><\/svg>\n        <span id=\"envMuteBtnLabel\">Mute<\/span>\n      <\/button>\n      <canvas id=\"envCanvas\" class=\"scene\" width=\"980\" height=\"560\"><\/canvas>\n\n      <div class=\"scene-extras\">\n      <div class=\"section\">\n        <h3>Environment Indicators<\/h3>\n        <div id=\"envStatsGrid\" class=\"stats-grid\"><\/div>\n        <div class=\"footer-note\">Balance is derived from how evenly Water, Biodiversity, and Air are being managed.<\/div>\n      <\/div>\n\n      <div class=\"section\">\n        <h3>Focus Mode<\/h3>\n        <div class=\"toggle-row\" id=\"envFocusRow\">\n          <button class=\"toggle-btn active\" data-focus=\"full\" type=\"button\">Full Environment<\/button>\n          <button class=\"toggle-btn\" data-focus=\"water\" type=\"button\">Water<\/button>\n          <button class=\"toggle-btn\" data-focus=\"biodiversity\" type=\"button\">Biodiversity<\/button>\n          <button class=\"toggle-btn\" data-focus=\"air\" type=\"button\">Air<\/button>\n        <\/div>\n        <div class=\"footer-note\">Use Focus Mode to isolate one environmental element and hear how it changes.<\/div>\n      <\/div>\n\n      <div class=\"section\">\n        <h3>Sensitivity<\/h3>\n        <div class=\"toggle-row\" id=\"envSensitivityRow\">\n          <button class=\"toggle-btn\" data-sensitivity=\"shielded\" type=\"button\">Shielded<\/button>\n          <button class=\"toggle-btn active\" data-sensitivity=\"aware\" type=\"button\">Aware<\/button>\n          <button class=\"toggle-btn\" data-sensitivity=\"exposed\" type=\"button\">Exposed<\/button>\n        <\/div>\n        <div class=\"footer-note\" id=\"envSensitivityNote\">Balanced listening mode with realistic detail.<\/div>\n      <\/div>\n      <\/div>\n    <\/div>\n\n    <div class=\"panel control-panel\">\n      <div id=\"envGameSection\">\n        <p class=\"immersive-hint\">The animation stays above. Make your choice here, then watch the world respond instantly.<\/p>\n        <div class=\"section\">\n          <div id=\"envLevelTag\" class=\"level-tag\">Level 1 of 6<\/div>\n          <div id=\"envLevelTitle\" class=\"level-title\">Enter the ecosystem<\/div>\n          <div id=\"envLevelText\" class=\"muted\"><\/div>\n          <div id=\"envChoicesBox\" class=\"choices\"><\/div>\n          <div id=\"envPreviewBox\" class=\"preview-box\">\n            <span id=\"envPreviewText\" class=\"muted\">Select an option above to preview its projected effect on the ecosystem.<\/span>\n          <\/div>\n          <div class=\"actions\">\n            <button id=\"envClearBtn\" class=\"env-small-btn\" type=\"button\">Clear Preview<\/button>\n            <button id=\"envConfirmBtn\" class=\"main-btn\" type=\"button\" disabled>Confirm Decision<\/button>\n          <\/div>\n        <\/div>\n\n        <div class=\"section system-response\" id=\"envResponseBox\">\n          <h3>System Response<\/h3>\n          <div id=\"envResponseText\" class=\"muted\">Your confirmed choice will update the ecosystem here.<\/div>\n          <div class=\"actions\" style=\"margin-top:12px\">\n            <button id=\"envContinueBtn\" class=\"main-btn\" type=\"button\" disabled>Continue \u2192<\/button>\n          <\/div>\n        <\/div>\n      <\/div>\n\n      <div id=\"envFinalSection\" class=\"section hidden\">\n        <h3>Your Final World<\/h3>\n        <div class=\"summary-box\">\n          <div id=\"envFinalType\" class=\"final-type\"><\/div>\n          <div id=\"envFinalSummary\" class=\"muted\"><\/div>\n          <div id=\"envFinalPills\" style=\"margin-top:10px\"><\/div>\n          <div class=\"small-label\">Key Choices<\/div>\n          <ul id=\"envFinalChoices\" class=\"clean-list\"><\/ul>\n          <div class=\"small-label\">What to listen for<\/div>\n          <ul id=\"envFinalListenFor\" class=\"clean-list\"><\/ul>\n        <\/div>\n        <div class=\"actions\" style=\"margin-top:14px\">\n          <button id=\"envReplayBtn\" class=\"env-small-btn\" type=\"button\">\u21ba Replay Soundscape<\/button>\n          <button id=\"envRestartBtn\" class=\"main-btn\" type=\"button\">Restart<\/button>\n        <\/div>\n      <\/div>\n    <\/div>\n  <\/div>\n\n  <audio id=\"envRiverAudio\" loop preload=\"auto\" crossorigin=\"anonymous\"><source src=\"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/dragon-studio-soothing-river-flow-372456.mp3\" type=\"audio\/mpeg\"><\/audio>\n  <audio id=\"envBirdsAudio\" loop preload=\"auto\" crossorigin=\"anonymous\"><source src=\"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/freesound_community-birds-19624.mp3\" type=\"audio\/mpeg\"><\/audio>\n  <audio id=\"envInsectsAudio\" loop preload=\"auto\" crossorigin=\"anonymous\"><source src=\"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/capaholiczsfx-countryside-swamp-insects-environment-402579.mp3\" type=\"audio\/mpeg\"><\/audio>\n  <audio id=\"envGentleWindAudio\" loop preload=\"auto\" crossorigin=\"anonymous\"><source src=\"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/storegraphic-soft-wind-477404.mp3\" type=\"audio\/mpeg\"><\/audio>\n  <audio id=\"envStrongWindAudio\" loop preload=\"auto\" crossorigin=\"anonymous\"><source src=\"https:\/\/www.petrklichelp.cz\/wp-content\/uploads\/2026\/04\/dragon-studio-wind-blowing-sfx-09-423678.mp3\" type=\"audio\/mpeg\"><\/audio>\n<\/div>\n<\/div>\n\n<script>\n(function(){\n\"use strict\";\nif(window.__envSim1Booted)return;\nwindow.__envSim1Booted=true;\n\nfunction init(){\n  var canvas=document.getElementById(\"envCanvas\");\n  if(!canvas)return false;\n  var root=document.getElementById(\"envSim1\");\n  if(!root)return false;\n  if(root.dataset.envReady===\"1\")return true;\n  root.dataset.envReady=\"1\";\n\n  function q(id){return document.getElementById(id);}\n  var levelTag=q(\"envLevelTag\"),levelTitle=q(\"envLevelTitle\"),levelText=q(\"envLevelText\"),\n      choicesBox=q(\"envChoicesBox\"),previewBox=q(\"envPreviewBox\"),previewText=q(\"envPreviewText\"),\n      responseBox=q(\"envResponseBox\"),responseText=q(\"envResponseText\"),\n      confirmBtn=q(\"envConfirmBtn\"),continueBtn=q(\"envContinueBtn\"),clearBtn=q(\"envClearBtn\"),\n      statsGrid=q(\"envStatsGrid\"),gameSection=q(\"envGameSection\"),finalSection=q(\"envFinalSection\"),\n      finalType=q(\"envFinalType\"),finalSummary=q(\"envFinalSummary\"),finalPills=q(\"envFinalPills\"),\n      finalChoices=q(\"envFinalChoices\"),finalListenFor=q(\"envFinalListenFor\"),\n      replayBtn=q(\"envReplayBtn\"),restartBtn=q(\"envRestartBtn\"),sensNote=q(\"envSensitivityNote\");\n\n  var required=[levelTag,levelTitle,levelText,choicesBox,previewBox,previewText,\n    responseBox,responseText,confirmBtn,continueBtn,clearBtn,statsGrid,\n    gameSection,finalSection,finalType,finalSummary,finalPills,\n    finalChoices,finalListenFor,replayBtn,restartBtn,sensNote];\n  for(var ri=0;ri<required.length;ri++){if(!required[ri]){root.dataset.envReady=\"0\";return false;}}\n\n  var focusBtns=[].slice.call(root.querySelectorAll(\"#envFocusRow .toggle-btn\"));\n  var sensBtns=[].slice.call(root.querySelectorAll(\"#envSensitivityRow .toggle-btn\"));\n  var muteBtn=q(\"envMuteBtn\"),muteBtnLabel=q(\"envMuteBtnLabel\"),launchBtn=q(\"envLaunchBtn\"),exitBtn=q(\"envExitBtn\"),exitTopBtn=q(\"envExitTopBtn\");\n  var audioEls={\n    river:q(\"envRiverAudio\"),birds:q(\"envBirdsAudio\"),insects:q(\"envInsectsAudio\"),\n    gentle:q(\"envGentleWindAudio\"),strong:q(\"envStrongWindAudio\")\n  };\n\n  var ctx=canvas.getContext(\"2d\");\n  if(!ctx)return true;\n\n  var LEVELS=[\n    {title:\"Enter the Ecosystem\",text:\"You arrive in a living environment. What should your first approach be?\",choices:[\n      {label:\"Protect the area from heavy disturbance\",positive:true,effects:{water:8,biodiversity:10,air:4,balance:9},explanation:\"Protection helps maintain a stable foundation. Water, species diversity, and overall harmony remain strong.\"},\n      {label:\"Use the area carefully and gradually\",positive:null,effects:{water:2,biodiversity:1,air:1,balance:2},explanation:\"Careful use keeps the system mostly stable, though pressure slowly begins to appear.\"},\n      {label:\"Use the area intensively for quick benefit\",positive:false,effects:{water:-9,biodiversity:-10,air:-5,balance:-11},explanation:\"Fast use increases pressure on the whole ecosystem and reduces long-term stability.\"}\n    ]},\n    {title:\"River Pressure\",text:\"People want to build close to the river. How should this be handled?\",choices:[\n      {label:\"Create a protected river buffer zone\",positive:true,effects:{water:12,biodiversity:5,air:2,balance:7},explanation:\"A buffer zone protects water flow and helps nearby species keep their habitat.\"},\n      {label:\"Allow limited building with restrictions\",positive:null,effects:{water:-3,biodiversity:-2,air:0,balance:-2},explanation:\"Restricted building reduces some harm, but the river still faces growing pressure.\"},\n      {label:\"Allow intensive development near the river\",positive:false,effects:{water:-15,biodiversity:-7,air:-3,balance:-13},explanation:\"Heavy development disrupts water systems and weakens the surrounding ecological balance.\"}\n    ]},\n    {title:\"Forest Shelter\",text:\"The forest supports shelter, moisture, and species life. What do you choose?\",choices:[\n      {label:\"Preserve most of the forest intact\",positive:true,effects:{water:5,biodiversity:12,air:7,balance:8},explanation:\"Forest cover supports biodiversity, stabilizes air, and helps the whole environment remain resilient.\"},\n      {label:\"Use only part of the forest carefully\",positive:null,effects:{water:-2,biodiversity:-4,air:-2,balance:-3},explanation:\"Partial use creates moderate pressure and gradually weakens habitat complexity.\"},\n      {label:\"Clear large parts of the forest\",positive:false,effects:{water:-8,biodiversity:-15,air:-9,balance:-14},explanation:\"Large-scale clearing removes shelter, reduces diversity, and makes the environment more fragile.\"}\n    ]},\n    {title:\"Delayed Consequences\",text:\"Not every environmental effect appears immediately. What principle guides your next decision?\",choices:[\n      {label:\"Think long-term and reduce hidden risk\",positive:true,effects:{water:6,biodiversity:6,air:6,balance:12},explanation:\"Long-term thinking limits delayed damage and improves future ecological stability.\"},\n      {label:\"Balance current need with future caution\",positive:null,effects:{water:1,biodiversity:1,air:1,balance:2},explanation:\"A balanced approach keeps the environment functioning, though vulnerabilities remain.\"},\n      {label:\"Prioritize immediate gain again\",positive:false,effects:{water:-10,biodiversity:-9,air:-7,balance:-15},explanation:\"Repeated short-term decisions magnify hidden consequences and destabilize the system further.\"}\n    ]},\n    {title:\"Recovery Phase\",text:\"Damage has appeared. How should recovery be approached?\",choices:[\n      {label:\"Restore habitat and biodiversity first\",positive:true,effects:{water:4,biodiversity:14,air:5,balance:8},explanation:\"Restoring habitats helps many ecological relationships recover together.\"},\n      {label:\"Repair only the most visible problem\",positive:null,effects:{water:3,biodiversity:2,air:1,balance:1},explanation:\"Visible repair helps, but deeper system problems may continue beneath the surface.\"},\n      {label:\"Delay restoration and focus elsewhere\",positive:false,effects:{water:-6,biodiversity:-8,air:-5,balance:-10},explanation:\"Without restoration, ecological weakness continues to spread over time.\"}\n    ]},\n    {title:\"Final Direction\",text:\"You shape the future of this place. What principle will guide its long-term path?\",choices:[\n      {label:\"Live in partnership with the environment\",positive:true,effects:{water:8,biodiversity:8,air:8,balance:10},explanation:\"A partnership model supports stability, resilience, and long-term environmental health.\"},\n      {label:\"Mix development with limited caution\",positive:null,effects:{water:1,biodiversity:1,air:1,balance:2},explanation:\"The environment remains functional, but fragile and dependent on future care.\"},\n      {label:\"Keep prioritizing extraction and control\",positive:false,effects:{water:-12,biodiversity:-12,air:-9,balance:-14},explanation:\"Continued extraction pushes the ecosystem toward breakdown and loss of natural balance.\"}\n    ]}\n  ];\n\n  function clamp(v,lo,hi){if(lo===undefined)lo=0;if(hi===undefined)hi=100;return Math.max(lo,Math.min(hi,v));}\n  function lerp(a,b,t){return a+(b-a)*t;}\n  function mixColor(a,b,t){return[Math.round(a[0]+(b[0]-a[0])*t),Math.round(a[1]+(b[1]-a[1])*t),Math.round(a[2]+(b[2]-a[2])*t)];}\n  function rgb(c,a){return a!==undefined?\"rgba(\"+c[0]+\",\"+c[1]+\",\"+c[2]+\",\"+a+\")\":\"rgb(\"+c[0]+\",\"+c[1]+\",\"+c[2]+\")\";}\n  function ecoType(avg){return avg>=80?\"Balanced Ecosystem\":avg>=55?\"Fragile Ecosystem\":avg>=30?\"Stressed Ecosystem\":\"Collapsed Ecosystem\";}\n  function sensText(m){return m===\"shielded\"?\"Softer listening mode with reduced environmental detail.\":m===\"exposed\"?\"Stronger contrasts and more exposed environmental detail.\":\"Balanced listening mode with realistic detail.\";}\n  function sensMul(m){return m===\"shielded\"?0.65:m===\"exposed\"?1.2:1.0;}\n\n  function freshState(){return{\n    levelIndex:0,water:80,biodiversity:80,air:80,balance:80,\n    dWater:80,dBio:80,dAir:80,dBal:80,\n    selectedIdx:null,confirmed:false,\n    focus:\"full\",sensitivity:\"aware\",\n    choicesMade:[],audioStarted:false,muted:false,\n    pulse:0,cloudTick:0,particles:[],leaves:[]\n  };}\n  var S=freshState();\n\n  function confirmed(){return{water:S.water,biodiversity:S.biodiversity,air:S.air,balance:S.balance};}\n  function preview(choice){if(!choice)return confirmed();return{water:clamp(S.water+choice.effects.water),biodiversity:clamp(S.biodiversity+choice.effects.biodiversity),air:clamp(S.air+choice.effects.air),balance:clamp(S.balance+choice.effects.balance)};}\n\n\n  function isNarrow(){return window.matchMedia && window.matchMedia(\"(max-width: 767px)\").matches;}\n  function setImmersive(on){\n    if(on){root.classList.add(\"immersive\");document.body.style.overflow=\"hidden\";window.scrollTo({top:0,behavior:\"instant\"});}\n    else{root.classList.remove(\"immersive\");document.body.style.overflow=\"\";}\n    if(exitBtn){exitBtn.classList.toggle(\"hidden\",!on);}\n    if(launchBtn){launchBtn.classList.toggle(\"hidden\",on);}\n    setTimeout(function(){resizeSceneForMode();},40);\n  }\n  function resizeSceneForMode(){\n    if(!canvas)return;\n    if(root.classList.contains(\"immersive\") && isNarrow()){\n      var topbar=root.querySelector(\".immersive-topbar\");\n      var topbarH=topbar?topbar.offsetHeight:56;\n      var target=Math.max(240,Math.min(window.innerHeight*0.52,window.innerHeight-topbarH-220));\n      canvas.style.height=Math.round(target)+\"px\";\n    }else{\n      canvas.style.height=\"auto\";\n    }\n  }\n  function scrollControlsIntoView(){\n    if(!isNarrow() || !root.classList.contains(\"immersive\"))return;\n    var panel=root.querySelector(\".control-panel\");\n    if(panel) panel.scrollTo({top:0,behavior:\"smooth\"});\n  }\n\n  function renderStats(previewState){\n    var base=confirmed();\n    var items=[\"Water\",\"Biodiversity\",\"Air\",\"Balance\"];\n    var keys=[\"water\",\"biodiversity\",\"air\",\"balance\"];\n    statsGrid.innerHTML=\"\";\n    items.forEach(function(label,i){\n      var key=keys[i],bval=base[key],pval=previewState?previewState[key]:null;\n      var disp=pval!==null?pval:bval,delta=pval!==null?pval-bval:null;\n      var barCls=disp>=60?\"\":(disp>=35?\" mid\":\" low\");\n      var cardCls=delta!==null?(delta>0?\" improving\":delta<0?\" worsening\":\"\"):\"\";\n      var dHtml=delta!==null&#038;&#038;delta!==0?'<span class=\"stat-delta vis '+(delta>0?\"pos\":\"neg\")+'\">'+(delta>0?\"+\":\"\")+Math.round(delta)+\"<\/span>\":'<span class=\"stat-delta\"><\/span>';\n      var card=document.createElement(\"div\");\n      card.className=\"stat-card\"+cardCls;\n      card.innerHTML='<div class=\"stat-label\">'+label+'<\/div><div class=\"stat-row\"><div class=\"stat-value\">'+Math.round(disp)+'<\/div>'+dHtml+'<\/div><div class=\"bar\"><span style=\"width:'+disp+'%\"'+barCls+'><\/span><\/div>';\n      card.querySelector(\".bar span\").className=barCls.trim();\n      statsGrid.appendChild(card);\n    });\n  }\n\n  function effectLinesHtml(effects){\n    var keys=[\"water\",\"biodiversity\",\"air\",\"balance\"];\n    var labels=[\"Water quality\",\"Biodiversity\",\"Air quality\",\"Overall balance\"];\n    var html='<ul class=\"effect-lines\">';\n    keys.forEach(function(k,i){\n      var v=effects[k],cls=v>0?\"pos\":v<0?\"neg\":\"neu\";\n      var txt=labels[i]+(v>0?\" likely to improve.\":v<0?\" likely to weaken.\":\" likely to remain stable.\");\n      html+='<li class=\"effect-line\"><span class=\"effect-dot '+cls+'\"><\/span><span class=\"muted\">'+txt+'<\/span><\/li>';\n    });\n    return html+'<\/ul>';\n  }\n  function responseLinesHtml(effects){\n    var rows=[\n      {k:\"water\",l:\"Water stability\"},\n      {k:\"biodiversity\",l:\"Biodiversity\"},\n      {k:\"air\",l:\"Air quality\"},\n      {k:\"balance\",l:\"Overall balance\"}\n    ];\n    var html='<ul class=\"effect-lines\">';\n    rows.forEach(function(r){\n      var v=effects[r.k],cls=v>0?\"pos\":v<0?\"neg\":\"neu\";\n      var txt=r.l+(v>0?\" increased.\":v<0?\" decreased.\":\" unchanged.\");\n      html+='<li class=\"effect-line\"><span class=\"effect-dot '+cls+'\"><\/span><span class=\"muted\">'+txt+'<\/span><\/li>';\n    });\n    return html+'<\/ul>';\n  }\n\n  function renderLevel(){\n    var lv=LEVELS[S.levelIndex];\n    levelTag.textContent=\"Level \"+(S.levelIndex+1)+\" of \"+LEVELS.length;\n    levelTitle.textContent=lv.title;\n    levelText.textContent=lv.text;\n    choicesBox.innerHTML=\"\";\n    lv.choices.forEach(function(choice,idx){\n      var btn=document.createElement(\"button\");\n      btn.type=\"button\";\n      var dotColor=choice.positive===true?\"#3a7a4a\":choice.positive===false?\"#b03020\":\"#a07020\";\n      btn.className=\"choice-btn\"+(choice.positive===false?\" harmful\":\"\")+(S.selectedIdx===idx?\" selected\":\"\");\n      if(S.confirmed)btn.disabled=true;\n      btn.innerHTML='<span class=\"choice-indicator\" style=\"background:'+dotColor+'\"><\/span>'+choice.label;\n      btn.addEventListener(\"click\",function(){\n        if(S.confirmed)return;\n        S.selectedIdx=idx;\n        var prev=preview(choice);\n        previewBox.classList.add(\"active\");\n        previewText.innerHTML='<strong style=\"display:block;margin-bottom:6px\">Preview<\/strong><span class=\"muted\">'+choice.explanation+'<\/span>'+effectLinesHtml(choice.effects);\n        renderStats(prev);\n        confirmBtn.disabled=false;\n        [].slice.call(choicesBox.querySelectorAll(\".choice-btn\")).forEach(function(b,i){b.classList.toggle(\"selected\",i===idx);});\n        unlockAudio();\n      });\n      choicesBox.appendChild(btn);\n    });\n    confirmBtn.disabled=S.selectedIdx===null||S.confirmed;\n    continueBtn.disabled=!S.confirmed;\n    var prevState=(!S.confirmed&&S.selectedIdx!==null)?preview(lv.choices[S.selectedIdx]):null;\n    renderStats(prevState);\n  }\n\n  function clearPreview(){\n    if(S.confirmed)return;\n    S.selectedIdx=null;\n    previewBox.classList.remove(\"active\");\n    previewText.innerHTML='<span class=\"muted\">Select an option above to preview its projected effect on the ecosystem.<\/span>';\n    [].slice.call(choicesBox.querySelectorAll(\".choice-btn\")).forEach(function(b){b.classList.remove(\"selected\");});\n    confirmBtn.disabled=true;\n    renderStats(null);\n  }\n\n  function spawnParticles(positive){\n    var col=positive===true?\"#3a7a4a\":positive===false?\"#b03020\":\"#a07020\";\n    for(var i=0;i<16;i++){\n      S.particles.push({x:canvas.width*0.5+(Math.random()-0.5)*180,y:canvas.height*0.45+(Math.random()-0.5)*80,vx:(Math.random()-0.5)*3.5,vy:-1-Math.random()*2.4,life:1,r:2+Math.random()*3,color:col});\n    }\n  }\n\n  function doConfirm(){\n    if(S.selectedIdx===null||S.confirmed)return;\n    var choice=LEVELS[S.levelIndex].choices[S.selectedIdx];\n    S.water=clamp(S.water+choice.effects.water);\n    S.biodiversity=clamp(S.biodiversity+choice.effects.biodiversity);\n    S.air=clamp(S.air+choice.effects.air);\n    S.balance=clamp(S.balance+choice.effects.balance);\n    S.confirmed=true;\n    S.choicesMade.push({level:LEVELS[S.levelIndex].title,label:choice.label});\n    responseBox.classList.remove(\"updated\");\n    void responseBox.offsetWidth;\n    responseBox.classList.add(\"updated\");\n    responseText.innerHTML='<strong style=\"display:block;margin-bottom:6px\">Confirmed<\/strong><span class=\"muted\">'+choice.explanation+'<\/span>'+responseLinesHtml(choice.effects);\n    spawnParticles(choice.positive);\n    renderLevel();renderStats(null);applyAudio();\n    scrollControlsIntoView();\n  }\n\n  function doContinue(){\n    if(!S.confirmed)return;\n    if(S.levelIndex<LEVELS.length-1){\n      S.levelIndex++;S.selectedIdx=null;S.confirmed=false;\n      responseBox.classList.remove(\"updated\");\n      responseText.innerHTML='<span class=\"muted\">Your confirmed choice will update the ecosystem here.<\/span>';\n      previewBox.classList.remove(\"active\");\n      previewText.innerHTML='<span class=\"muted\">Select an option above to preview its projected effect on the ecosystem.<\/span>';\n      renderLevel();\n      scrollControlsIntoView();\n    }else{showFinal();}\n  }\n\n  function showFinal(){\n    var avg=(S.water+S.biodiversity+S.air+S.balance)\/4;\n    gameSection.classList.add(\"hidden\");\n    finalSection.classList.remove(\"hidden\");\n    finalType.textContent=ecoType(avg);\n    finalSummary.textContent=avg>=80?\"This environment remains stable, layered, and resilient. The soundscape should feel fuller, calmer, and more integrated.\":avg>=55?\"This environment still functions but signs of weakness are emerging. The soundscape may feel thinner and less stable.\":avg>=30?\"This environment is under visible strain. Expect reduced ecological richness and stronger signs of disturbance.\":\"This environment has lost much of its ecological structure. The soundscape should feel sparse, unstable, and dominated by stress.\";\n    finalPills.innerHTML=['Water','Biodiversity','Air','Balance'].map(function(l,i){var v=[S.water,S.biodiversity,S.air,S.balance][i];return'<span class=\"pill\">'+l+' '+Math.round(v)+'<\/span>';}).join(\"\");\n    finalChoices.innerHTML=\"\";\n    S.choicesMade.forEach(function(c){var li=document.createElement(\"li\");li.innerHTML=\"<strong>\"+c.level+\":<\/strong> \"+c.label;finalChoices.appendChild(li);});\n    finalListenFor.innerHTML=\"\";\n    [S.water>=65?\"A stronger and clearer river presence.\":\"A weaker or more distant water layer.\",\n     S.biodiversity>=65?\"A richer presence of birds and environmental life.\":\"Reduced biodiversity and fewer living sound layers.\",\n     S.air>=65?\"Gentler airflow and a calmer atmospheric texture.\":\"A harsher wind presence and increased environmental strain.\",\n     S.balance<45?\"An uneven overall soundscape with less harmony between elements.\":\"A more coherent relationship between environmental layers.\"\n    ].forEach(function(t){var li=document.createElement(\"li\");li.textContent=t;finalListenFor.appendChild(li);});\n    applyAudio();\n    scrollControlsIntoView();\n  }\n\n  function doRestart(){\n    stopAudio();S=freshState();\n    gameSection.classList.remove(\"hidden\");finalSection.classList.add(\"hidden\");\n    responseBox.classList.remove(\"updated\");\n    responseText.innerHTML='<span class=\"muted\">Your confirmed choice will update the ecosystem here.<\/span>';\n    previewBox.classList.remove(\"active\");\n    previewText.innerHTML='<span class=\"muted\">Select an option above to preview its projected effect on the ecosystem.<\/span>';\n    updateToggles();updateMuteBtn();renderLevel();\n  }\n\n  function updateToggles(){\n    focusBtns.forEach(function(b){b.classList.toggle(\"active\",b.getAttribute(\"data-focus\")===S.focus);});\n    sensBtns.forEach(function(b){b.classList.toggle(\"active\",b.getAttribute(\"data-sensitivity\")===S.sensitivity);});\n    sensNote.textContent=sensText(S.sensitivity);\n  }\n\n  function unlockAudio(){\n    if(S.audioStarted)return;S.audioStarted=true;\n    Object.keys(audioEls).forEach(function(k){var a=audioEls[k];if(!a)return;a.volume=0;var p=a.play();if(p&&p.catch)p.catch(function(){});});\n  }\n  function stopAudio(){Object.keys(audioEls).forEach(function(k){var a=audioEls[k];if(!a)return;a.pause();a.currentTime=0;});}\n  function volSmooth(audio,target){\n    if(!audio)return;\n    var from=audio.volume,to=clamp(target,0,1),t0=performance.now();\n    (function step(now){var p=Math.min((now-t0)\/360,1);audio.volume=from+(to-from)*(1-Math.pow(1-p,3));if(p<1)requestAnimationFrame(step);})(t0);\n  }\n  function applyAudio(){\n    if(!S.audioStarted)return;\n    if(S.muted){Object.keys(audioEls).forEach(function(k){volSmooth(audioEls[k],0);});return;}\n    var c=confirmed(),mul=sensMul(S.sensitivity);\n    var r=clamp(c.water\/100,0,1)*0.55*mul,b=clamp(c.biodiversity\/100,0,1)*0.52*mul;\n    var ins=clamp(c.biodiversity\/100,.05,.85)*0.34*mul,gw=clamp(c.air\/100,0,1)*0.36*mul,sw=clamp((100-c.air)\/100,0,1)*0.52*mul;\n    if(S.focus===\"water\"){b=0;ins=0;gw=0;sw=0;}\n    else if(S.focus===\"biodiversity\"){r=0;gw=0;sw=0;}\n    else if(S.focus===\"air\"){r=0;b=0;ins=0;}\n    volSmooth(audioEls.river,r);volSmooth(audioEls.birds,b);volSmooth(audioEls.insects,ins);volSmooth(audioEls.gentle,gw);volSmooth(audioEls.strong,sw);\n  }\n\n  function updateMuteBtn(){\n    if(!muteBtn||!muteBtnLabel)return;\n    if(S.muted){\n      muteBtn.classList.add(\"muted\");\n      muteBtnLabel.textContent=\"Unmute\";\n      muteBtn.querySelector(\"svg\").innerHTML='<polygon points=\"11 5 6 9 2 9 2 15 6 15 11 19 11 5\"\/><line x1=\"23\" y1=\"9\" x2=\"17\" y2=\"15\"\/><line x1=\"17\" y1=\"9\" x2=\"23\" y2=\"15\"\/>';\n    }else{\n      muteBtn.classList.remove(\"muted\");\n      muteBtnLabel.textContent=\"Mute\";\n      muteBtn.querySelector(\"svg\").innerHTML='<polygon points=\"11 5 6 9 2 9 2 15 6 15 11 19 11 5\"\/><path d=\"M15.54 8.46a5 5 0 0 1 0 7.07\"\/><path d=\"M19.07 4.93a10 10 0 0 1 0 14.14\"\/>';\n    }\n  }\n\n  confirmBtn.addEventListener(\"click\",doConfirm);\n  continueBtn.addEventListener(\"click\",doContinue);\n  clearBtn.addEventListener(\"click\",clearPreview);\n  replayBtn.addEventListener(\"click\",function(){unlockAudio();applyAudio();});\n  restartBtn.addEventListener(\"click\",doRestart);\n  if(muteBtn)muteBtn.addEventListener(\"click\",function(){S.muted=!S.muted;updateMuteBtn();if(!S.audioStarted&&!S.muted){unlockAudio();}applyAudio();});\n  if(launchBtn)launchBtn.addEventListener(\"click\",function(){setImmersive(true);});\n  if(exitBtn)exitBtn.addEventListener(\"click\",function(){setImmersive(false);});\n  if(exitTopBtn)exitTopBtn.addEventListener(\"click\",function(){setImmersive(false);});\n  window.addEventListener(\"resize\",resizeSceneForMode);\n  focusBtns.forEach(function(btn){btn.addEventListener(\"click\",function(){S.focus=btn.getAttribute(\"data-focus\");updateToggles();unlockAudio();applyAudio();});});\n  sensBtns.forEach(function(btn){btn.addEventListener(\"click\",function(){S.sensitivity=btn.getAttribute(\"data-sensitivity\");updateToggles();unlockAudio();applyAudio();});});\n\n  var CW=canvas.width,CH=canvas.height,HZ=290;\n  var TERRAIN=[];for(var tx=0;tx<=CW;tx++)TERRAIN.push(Math.sin(tx*0.014)*10+Math.sin(tx*0.039)*7);\n  function ty(x){return HZ+TERRAIN[Math.min(Math.floor(x),CW)];}\n\n  function drawSky(avg){\n    var s=1-avg\/100;\n    var top=mixColor([165,195,185],[80,62,42],s*0.75);\n    var mid=mixColor([200,225,195],[110,85,55],s*0.7);\n    var hor=mixColor([185,215,175],[140,110,70],s*0.65);\n    var g=ctx.createLinearGradient(0,0,0,HZ+10);\n    g.addColorStop(0,rgb(top));g.addColorStop(0.55,rgb(mid));g.addColorStop(1,rgb(hor));\n    ctx.fillStyle=g;ctx.fillRect(0,0,CW,HZ+10);\n  }\n\n  function drawSun(avg){\n    var h=avg\/100,x=820,y=80;\n    var glow=ctx.createRadialGradient(x,y,0,x,y,110);\n    glow.addColorStop(0,\"rgba(255,235,140,\"+(0.06+h*0.1)+\")\");\n    glow.addColorStop(1,\"rgba(255,200,80,0)\");\n    ctx.fillStyle=glow;ctx.fillRect(0,0,CW,HZ);\n    ctx.beginPath();ctx.arc(x,y,26+h*10,0,Math.PI*2);\n    var sg=ctx.createRadialGradient(x,y,0,x,y,38);\n    sg.addColorStop(0,\"rgba(255,248,210,\"+(0.7+h*0.2)+\")\");\n    sg.addColorStop(0.6,\"rgba(255,210,110,\"+(0.3+h*0.2)+\")\");\n    sg.addColorStop(1,\"rgba(255,180,60,0)\");\n    ctx.fillStyle=sg;ctx.fill();\n  }\n\n  function drawClouds(avg){\n    var stress=1-avg\/100,speed=1+stress*2;\n    for(var ci=0;ci<5;ci++){\n      var cx=((ci*210+S.cloudTick*(0.7+ci*0.12)*speed)%(CW+280))-190;\n      var cy=60+(ci%3)*32+Math.sin(S.pulse*0.3+ci)*4;\n      var csc=0.7+ci*0.1;\n      var ca=0.28+stress*0.32;\n      ctx.fillStyle=stress>0.5?\"rgba(160,140,118,\"+ca+\")\":\"rgba(255,255,255,\"+ca+\")\";\n      ctx.beginPath();\n      ctx.arc(cx,cy,22*csc,Math.PI*0.5,Math.PI*1.5);\n      ctx.arc(cx+24*csc,cy-15*csc,26*csc,Math.PI,Math.PI*2);\n      ctx.arc(cx+56*csc,cy-7*csc,20*csc,Math.PI,0);\n      ctx.arc(cx+70*csc,cy,16*csc,Math.PI*1.5,Math.PI*0.5);\n      ctx.closePath();ctx.fill();\n    }\n  }\n\n  function drawMountains(avg){\n    var s=1-avg\/100;\n    ctx.fillStyle=rgb(mixColor([120,155,118],[100,82,62],s*0.6),0.55);\n    ctx.beginPath();ctx.moveTo(0,CH);\n    for(var mx=0;mx<=CW;mx+=3){var my=200-Math.sin(mx*0.012)*36-Math.sin(mx*0.033)*18;mx===0?ctx.moveTo(mx,my):ctx.lineTo(mx,my);}\n    ctx.lineTo(CW,CH);ctx.closePath();ctx.fill();\n    ctx.fillStyle=rgb(mixColor([95,130,92],[82,65,46],s*0.8),0.82);\n    ctx.beginPath();ctx.moveTo(0,CH);\n    for(mx=0;mx<=CW;mx+=3){my=245-Math.sin(mx*0.017+1)*22-Math.sin(mx*0.048)*12;mx===0?ctx.moveTo(mx,my):ctx.lineTo(mx,my);}\n    ctx.lineTo(CW,CH);ctx.closePath();ctx.fill();\n  }\n\n  function drawGround(avg){\n    var s=1-avg\/100;\n    var gc=mixColor([80,130,70],[95,75,40],s),gd=mixColor([55,100,48],[70,52,28],s);\n    var g=ctx.createLinearGradient(0,HZ,0,CH);\n    g.addColorStop(0,rgb(gc));g.addColorStop(1,rgb(gd));\n    ctx.fillStyle=g;\n    ctx.beginPath();ctx.moveTo(0,CH);ctx.lineTo(0,HZ);\n    for(var gx=0;gx<=CW;gx++)ctx.lineTo(gx,ty(gx));\n    ctx.lineTo(CW,CH);ctx.closePath();ctx.fill();\n  }\n\n  function drawRiver(water){\n    var wc=mixColor([80,148,190],[100,80,52],1-water\/100);\n    var g=ctx.createLinearGradient(0,HZ+50,0,CH);\n    g.addColorStop(0,rgb(wc,0.85));g.addColorStop(1,rgb(mixColor(wc,[30,50,70],0.4),0.78));\n    ctx.save();\n    ctx.beginPath();\n    ctx.moveTo(0,HZ+80);\n    ctx.bezierCurveTo(CW*0.18,HZ+38,CW*0.38,HZ+110,CW*0.52,HZ+55);\n    ctx.bezierCurveTo(CW*0.68,HZ+10,CW*0.82,HZ+72,CW,HZ+44);\n    ctx.lineTo(CW,CH);ctx.lineTo(0,CH);ctx.closePath();\n    ctx.fillStyle=g;ctx.fill();\n    if(water>20){\n      ctx.strokeStyle=\"rgba(255,255,255,\"+(0.08+water\/600)+\")\";ctx.lineWidth=1.5;\n      for(var wi=0;wi<6;wi++){\n        var wy=HZ+88+wi*22;\n        ctx.beginPath();ctx.moveTo(0,wy);\n        for(var wx=0;wx<=CW;wx+=16)ctx.lineTo(wx,wy+Math.sin((wx+S.pulse*55*(1+wi*0.1))*0.018+wi*0.9)*(2+water\/28));\n        ctx.stroke();\n      }\n    }\n    ctx.restore();\n  }\n\n  function drawTrees(balance,biodiversity,air){\n    var count=Math.max(2,Math.round(balance\/14));\n    var stress=1-((balance+biodiversity)\/2)\/100;\n    for(var ti=0;ti<count;ti++){\n      var ttx=80+ti*(CW\/count)*1.02+Math.sin(ti*2.2)*22;\n      var tty=ty(ttx);\n      var tsc=0.6+(ti%4)*0.08;\n      var trH=72*tsc,trW=9*tsc;\n      var sway=Math.sin((S.pulse+ti*1.8)*(0.5+(100-air)\/170))*((100-air)\/22)*tsc;\n      var cr=32*tsc;\n      var fc=mixColor([62,110,52],[100,88,42],stress);\n      var fd=mixColor([44,82,38],[78,64,28],stress);\n      ctx.save();ctx.globalAlpha=0.14*((1-stress)*0.6+0.4);\n      ctx.fillStyle=\"rgba(0,0,0,1)\";ctx.beginPath();ctx.ellipse(ttx+sway*0.4,tty+3,18*tsc,4*tsc,0,0,Math.PI*2);ctx.fill();ctx.restore();\n      ctx.fillStyle=\"rgba(90,60,32,0.95)\";ctx.beginPath();\n      ctx.moveTo(ttx-trW\/2,tty);ctx.quadraticCurveTo(ttx-3+sway*0.2,tty-trH*0.5,ttx+sway*0.4,tty-trH);ctx.quadraticCurveTo(ttx+3+sway*0.2,tty-trH*0.5,ttx+trW\/2,tty);ctx.closePath();ctx.fill();\n      ctx.fillStyle=rgb(fd,0.82);ctx.beginPath();ctx.arc(ttx+sway-9*tsc,tty-trH-2,cr*0.78,0,Math.PI*2);ctx.fill();\n      ctx.fillStyle=rgb(fd,0.82);ctx.beginPath();ctx.arc(ttx+sway+9*tsc,tty-trH-5,cr*0.73,0,Math.PI*2);ctx.fill();\n      ctx.fillStyle=rgb(fc,0.9);ctx.beginPath();ctx.arc(ttx+sway,tty-trH-cr*0.36,cr,0,Math.PI*2);ctx.fill();\n      ctx.fillStyle=rgb(mixColor(fc,[220,250,200],0.28),0.5);ctx.beginPath();ctx.arc(ttx+sway-cr*0.14,tty-trH-cr*0.68,cr*0.5,0,Math.PI*2);ctx.fill();\n    }\n  }\n\n  function drawBirds(bio){\n    var count=Math.max(0,Math.round(bio\/18));\n    ctx.strokeStyle=\"rgba(30,45,32,0.75)\";ctx.lineWidth=2;ctx.lineCap=\"round\";\n    for(var bi=0;bi<count;bi++){\n      var bt=S.pulse*(0.2+bi*0.03)+bi*1.5;\n      var bx=((bt*50+bi*120)%(CW+140))-70;\n      var by=100+(bi%4)*26+Math.sin(S.pulse*0.4+bi)*10;\n      var flap=Math.sin(bt*4)*6,bsc=0.6+(bi%3)*0.2;\n      ctx.save();ctx.globalAlpha=0.55+(bi%3)*0.15;\n      ctx.beginPath();ctx.moveTo(bx-14*bsc,by+flap*bsc);ctx.quadraticCurveTo(bx-7*bsc,by-2,bx,by);ctx.quadraticCurveTo(bx+7*bsc,by-2,bx+14*bsc,by+flap*bsc);ctx.stroke();ctx.restore();\n    }\n  }\n\n  function drawInsects(bio,avg){\n    var cf=avg<30?0.22:avg<45?0.52:1;\n    var count=Math.max(0,Math.round((bio\/22)*cf));\n    ctx.fillStyle=\"rgba(40,40,35,0.5)\";\n    for(var ii=0;ii<count;ii++){\n      var ix=130+ii*160+Math.sin((S.pulse+ii*48)*0.08)*18;\n      var iy=HZ-18+(ii%2)*28+Math.cos((S.pulse+ii*70)*0.08)*10;\n      ctx.beginPath();ctx.arc(ix,iy,3.5,0,Math.PI*2);ctx.fill();\n    }\n  }\n\n  function drawWind(air){\n    var stress=(100-air)\/100,cnt=Math.max(0,Math.round((100-air)\/10));\n    if(!cnt)return;\n    ctx.save();ctx.strokeStyle=\"rgba(200,190,170,\"+(0.06+stress*0.1)+\")\";ctx.lineWidth=1.4;ctx.lineCap=\"round\";\n    for(var wi2=0;wi2<cnt;wi2++){\n      var wy2=60+wi2*24,wx2=((S.cloudTick*(2.2+stress*3)+wi2*105)%(CW+240))-200,wl=72+stress*55;\n      ctx.beginPath();ctx.moveTo(wx2,wy2);ctx.quadraticCurveTo(wx2+wl*0.5,wy2-8,wx2+wl,wy2+2);ctx.stroke();\n    }\n    ctx.restore();\n  }\n\n  function drawParticles(){\n    S.particles=S.particles.filter(function(p){return p.life>0;});\n    S.particles.forEach(function(p){\n      p.x+=p.vx;p.y+=p.vy;p.vy+=0.08;p.life-=0.022;\n      ctx.save();ctx.globalAlpha=Math.max(0,p.life);ctx.fillStyle=p.color;\n      ctx.beginPath();ctx.arc(p.x,p.y,p.r,0,Math.PI*2);ctx.fill();ctx.restore();\n    });\n  }\n\n  function drawLeaves(bio){\n    if(bio>50&&Math.random()<(bio-50)\/520)S.leaves.push({x:Math.random()*CW,y:-10,vx:(Math.random()-0.5)*1.3,vy:0.4+Math.random()*0.7,rot:Math.random()*Math.PI*2,rotV:(Math.random()-0.5)*0.08,r:3+Math.random()*2.5,h:90+Math.floor(Math.random()*50)});\n    S.leaves=S.leaves.filter(function(l){return l.y<CH+20;});\n    S.leaves.forEach(function(l){\n      l.x+=l.vx+Math.sin(S.pulse*1.2+l.rot)*0.3;l.y+=l.vy;l.rot+=l.rotV;\n      ctx.save();ctx.translate(l.x,l.y);ctx.rotate(l.rot);\n      ctx.fillStyle=\"hsla(\"+l.h+\",52%,36%,0.7)\";ctx.beginPath();ctx.ellipse(0,0,l.r,l.r*0.55,0,0,Math.PI*2);ctx.fill();ctx.restore();\n    });\n  }\n\n  function drawVignette(avg){\n    var s=1-avg\/100;\n    var vg=ctx.createRadialGradient(CW\/2,CH\/2,CH*0.3,CW\/2,CH\/2,CH*0.85);\n    vg.addColorStop(0,\"rgba(0,0,0,0)\");vg.addColorStop(1,\"rgba(0,0,0,\"+(0.22+s*0.22)+\")\");\n    ctx.fillStyle=vg;ctx.fillRect(0,0,CW,CH);\n  }\n\n  function roundRect2d(x,y,w,h,r){\n    ctx.beginPath();ctx.moveTo(x+r,y);ctx.lineTo(x+w-r,y);ctx.quadraticCurveTo(x+w,y,x+w,y+r);ctx.lineTo(x+w,y+h-r);ctx.quadraticCurveTo(x+w,y+h,x+w-r,y+h);ctx.lineTo(x+r,y+h);ctx.quadraticCurveTo(x,y+h,x,y+h-r);ctx.lineTo(x,y+r);ctx.quadraticCurveTo(x,y,x+r,y);ctx.closePath();\n  }\n\n  function drawHud(avg){\n    var type=ecoType(avg);\n    var col=avg>=80?\"rgba(50,110,55,0.95)\":avg>=55?\"rgba(140,100,25,0.95)\":avg>=30?\"rgba(150,50,30,0.95)\":\"rgba(110,30,20,0.95)\";\n    ctx.save();\n    ctx.fillStyle=\"rgba(245,248,244,0.78)\";roundRect2d(14,14,252,44,12);ctx.fill();\n    ctx.fillStyle=\"rgba(31,42,35,0.1)\";roundRect2d(22,40,236,7,3);ctx.fill();\n    var barW=Math.max(4,236*(avg\/100));\n    ctx.fillStyle=col;roundRect2d(22,40,barW,7,3);ctx.fill();\n    ctx.fillStyle=\"rgba(31,42,35,0.85)\";ctx.font=\"600 12px Inter,Arial,sans-serif\";ctx.fillText(type,22,33);\n    ctx.fillStyle=\"rgba(95,108,99,0.9)\";ctx.font=\"11px Inter,Arial,sans-serif\";ctx.fillText(Math.round(avg)+\"% ecological health\",168,33);\n    ctx.restore();\n  }\n\n  function drawScene(ts){\n    S.pulse=ts*0.001;S.cloudTick+=0.26;\n    S.dWater=lerp(S.dWater,S.water,0.04);S.dBio=lerp(S.dBio,S.biodiversity,0.04);\n    S.dAir=lerp(S.dAir,S.air,0.04);S.dBal=lerp(S.dBal,S.balance,0.04);\n    var avg=(S.dWater+S.dBio+S.dAir+S.dBal)\/4;\n    ctx.clearRect(0,0,CW,CH);\n    drawSky(avg);drawSun(avg);drawClouds(avg);drawMountains(avg);\n    drawGround(avg);drawRiver(S.dWater);drawTrees(S.dBal,S.dBio,S.dAir);\n    drawBirds(S.dBio);drawInsects(S.dBio,avg);drawLeaves(S.dBio);\n    drawWind(S.dAir);drawParticles();drawVignette(avg);drawHud(avg);\n    requestAnimationFrame(drawScene);\n  }\n\n  updateToggles();updateMuteBtn();renderLevel();resizeSceneForMode();requestAnimationFrame(drawScene);\n  return true;\n}\n\nif(init())return;\nif(typeof MutationObserver!==\"undefined\"){var obs=new MutationObserver(function(){if(init())obs.disconnect();});obs.observe(document.documentElement||document.body,{childList:true,subtree:true});}\n[100,400,900,2000].forEach(function(ms){setTimeout(function(){init();},ms);});\n})();\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>Environmental Decision Simulator Make choices, preview the impact, confirm your decision, and hear the environment respond through adaptive sound. Launch&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-2489","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Test Page - Petrkl\u00ed\u010d help<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.petrklichelp.cz\/en\/test-page\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Test Page - Petrkl\u00ed\u010d help\" \/>\n<meta property=\"og:description\" content=\"Environmental Decision Simulator Make choices, preview the impact, confirm your decision, and hear the environment respond through adaptive sound. Launch...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.petrklichelp.cz\/en\/test-page\/\" \/>\n<meta property=\"og:site_name\" content=\"Petrkl\u00ed\u010d help\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/PetrklicHelp\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-19T14:51:09+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.petrklichelp.cz\\\/test-page\\\/\",\"url\":\"https:\\\/\\\/www.petrklichelp.cz\\\/test-page\\\/\",\"name\":\"Test Page - Petrkl\u00ed\u010d help\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.petrklichelp.cz\\\/cs\\\/#website\"},\"datePublished\":\"2026-04-07T08:39:27+00:00\",\"dateModified\":\"2026-04-19T14:51:09+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.petrklichelp.cz\\\/test-page\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.petrklichelp.cz\\\/test-page\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.petrklichelp.cz\\\/test-page\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.petrklichelp.cz\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Test Page\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.petrklichelp.cz\\\/cs\\\/#website\",\"url\":\"https:\\\/\\\/www.petrklichelp.cz\\\/cs\\\/\",\"name\":\"Petrkl\u00ed\u010d help\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.petrklichelp.cz\\\/cs\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.petrklichelp.cz\\\/cs\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.petrklichelp.cz\\\/cs\\\/#organization\",\"name\":\"Petrkl\u00ed\u010d help\",\"url\":\"https:\\\/\\\/www.petrklichelp.cz\\\/cs\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/www.petrklichelp.cz\\\/cs\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/petrklichelp.mrkninaweb.cz\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/zahrada-petrklichelp.png\",\"contentUrl\":\"https:\\\/\\\/petrklichelp.mrkninaweb.cz\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/zahrada-petrklichelp.png\",\"width\":117,\"height\":110,\"caption\":\"Petrkl\u00ed\u010d help\"},\"image\":{\"@id\":\"https:\\\/\\\/www.petrklichelp.cz\\\/cs\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/PetrklicHelp\",\"https:\\\/\\\/www.instagram.com\\\/petrklic_help\\\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Test Page - Petrkl\u00ed\u010d help","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.petrklichelp.cz\/en\/test-page\/","og_locale":"en_GB","og_type":"article","og_title":"Test Page - Petrkl\u00ed\u010d help","og_description":"Environmental Decision Simulator Make choices, preview the impact, confirm your decision, and hear the environment respond through adaptive sound. Launch...","og_url":"https:\/\/www.petrklichelp.cz\/en\/test-page\/","og_site_name":"Petrkl\u00ed\u010d help","article_publisher":"https:\/\/www.facebook.com\/PetrklicHelp","article_modified_time":"2026-04-19T14:51:09+00:00","twitter_card":"summary_large_image","twitter_misc":{"Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.petrklichelp.cz\/test-page\/","url":"https:\/\/www.petrklichelp.cz\/test-page\/","name":"Test Page - Petrkl\u00ed\u010d help","isPartOf":{"@id":"https:\/\/www.petrklichelp.cz\/cs\/#website"},"datePublished":"2026-04-07T08:39:27+00:00","dateModified":"2026-04-19T14:51:09+00:00","breadcrumb":{"@id":"https:\/\/www.petrklichelp.cz\/test-page\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.petrklichelp.cz\/test-page\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.petrklichelp.cz\/test-page\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.petrklichelp.cz\/"},{"@type":"ListItem","position":2,"name":"Test Page"}]},{"@type":"WebSite","@id":"https:\/\/www.petrklichelp.cz\/cs\/#website","url":"https:\/\/www.petrklichelp.cz\/cs\/","name":"Petrkl\u00ed\u010d help","description":"","publisher":{"@id":"https:\/\/www.petrklichelp.cz\/cs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.petrklichelp.cz\/cs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/www.petrklichelp.cz\/cs\/#organization","name":"Petrkl\u00ed\u010d help","url":"https:\/\/www.petrklichelp.cz\/cs\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.petrklichelp.cz\/cs\/#\/schema\/logo\/image\/","url":"https:\/\/petrklichelp.mrkninaweb.cz\/wp-content\/uploads\/2023\/01\/zahrada-petrklichelp.png","contentUrl":"https:\/\/petrklichelp.mrkninaweb.cz\/wp-content\/uploads\/2023\/01\/zahrada-petrklichelp.png","width":117,"height":110,"caption":"Petrkl\u00ed\u010d help"},"image":{"@id":"https:\/\/www.petrklichelp.cz\/cs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/PetrklicHelp","https:\/\/www.instagram.com\/petrklic_help\/"]}]}},"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.petrklichelp.cz\/en\/wp-json\/wp\/v2\/pages\/2489","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.petrklichelp.cz\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.petrklichelp.cz\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.petrklichelp.cz\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.petrklichelp.cz\/en\/wp-json\/wp\/v2\/comments?post=2489"}],"version-history":[{"count":36,"href":"https:\/\/www.petrklichelp.cz\/en\/wp-json\/wp\/v2\/pages\/2489\/revisions"}],"predecessor-version":[{"id":2739,"href":"https:\/\/www.petrklichelp.cz\/en\/wp-json\/wp\/v2\/pages\/2489\/revisions\/2739"}],"wp:attachment":[{"href":"https:\/\/www.petrklichelp.cz\/en\/wp-json\/wp\/v2\/media?parent=2489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}