*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#123f43;color:#173f3e;font-family:ui-rounded,'Trebuchet MS',system-ui,sans-serif}button{font:inherit;cursor:pointer;touch-action:none;-webkit-tap-highlight-color:transparent}button:focus-visible{outline:3px solid #ffbd50;outline-offset:4px}#game{height:100dvh;position:relative;max-width:1600px;margin:auto;overflow:hidden}canvas{width:100%;height:100%;display:block;touch-action:none;outline:none}header{position:absolute;top:max(16px,env(safe-area-inset-top));left:20px;right:20px;display:flex;justify-content:space-between;align-items:start;pointer-events:none}header>div{background:#123f43ed;color:#fff;padding:12px 18px;border-radius:16px;box-shadow:0 4px 0 #092d3280}header small{display:block;font-size:11px;letter-spacing:2px;color:#bbddd2;font-weight:bold;margin-bottom:4px}header strong{font-size:18px}header button{pointer-events:auto;border:2px solid #fff9;background:#123f43;color:white;border-radius:50%;width:42px;height:42px;font-weight:bold;font-size:20px}#quest{position:absolute;top:100px;left:20px;background:#fff9e9ed;border:2px solid #fff;padding:12px 16px;border-radius:15px;width:285px;box-shadow:0 4px 16px #13332f22;pointer-events:none}#quest>span{font-size:11px;letter-spacing:1.6px;font-weight:bold;color:#a65025}#quest p{margin:6px 0 9px;font-size:15px;line-height:1.35}#inventory{font-size:12px;color:#46665c;border-top:1px solid #cad6c5;padding-top:8px}#controls{position:absolute;bottom:max(22px,env(safe-area-inset-bottom));left:25px;right:25px;display:flex;justify-content:space-between;align-items:end;pointer-events:none}#pad{width:154px;height:154px;display:grid;grid-template:repeat(3,1fr)/repeat(3,1fr);gap:3px;pointer-events:auto;filter:drop-shadow(0 4px 0 #123f4370)}#pad button{background:#163e46d9;border:2px solid #ffffff7a;border-radius:13px;color:#fff;font-size:21px;user-select:none;-webkit-user-select:none}#pad button[data-dir=up]{grid-area:1/2}#pad button[data-dir=left]{grid-area:2/1}#pad button[data-dir=down]{grid-area:3/2}#pad button[data-dir=right]{grid-area:2/3}#pad button:active,#pad button.pressed{background:#e3a548;color:#193f42}.action{text-align:center;pointer-events:auto}.action button{width:76px;height:76px;border:4px solid #fff5;background:#df8534;color:#fff;border-radius:50%;font-weight:900;font-size:29px;box-shadow:0 6px 0 #875024}.action button:active{transform:translateY(3px);box-shadow:0 3px 0 #875024}.action span{display:block;color:white;text-shadow:0 2px 3px #123f43;font-size:12px;font-weight:bold;letter-spacing:1px;margin-top:12px}#near{position:absolute;bottom:205px;left:50%;transform:translateX(-50%);background:#143e44e8;border-radius:20px;padding:9px 16px;color:white;font-size:14px;text-align:center;max-width:90%;white-space:nowrap}#near:empty{display:none}#dialogue{position:absolute;bottom:max(20px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(650px,calc(100% - 30px));border:3px solid #fff;background:#fffced;border-radius:18px;padding:20px 23px;box-shadow:0 9px 0 #173f3e70;z-index:5}#speaker{display:inline-block;padding:6px 13px;background:#1d5e59;color:#fff;border-radius:9px;font-size:14px;font-weight:bold;margin-top:-36px;vertical-align:top}#speech{font-size:18px;line-height:1.55;margin:10px 0 16px}#next{float:right;background:#1c5b54;border:0;color:#fff;border-radius:10px;padding:11px 17px;font-weight:bold}#dialogue::after{content:'';display:block;clear:both}body.talking #controls,body.talking #near{visibility:hidden}#loading{position:absolute;inset:0;background:#123f43;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#fff;text-align:center;padding:30px;z-index:10}#loading strong{font-size:24px}#loading[hidden]{display:none}dialog{width:min(500px,calc(100% - 28px));max-height:85dvh;overflow:auto;border:0;border-radius:20px;padding:28px;color:#173f3e;background:#fffdf2}dialog::backdrop{background:#072f3bb8}dialog h2{font-size:26px;padding-right:20px}dialog p,dialog li{font-size:16px;line-height:1.5}dialog button{background:#1c5b54;color:white;border:0;border-radius:10px;padding:12px}#close{position:absolute;right:12px;top:12px;padding:3px;width:32px;height:32px;font-size:22px;background:#e3ebe1;color:#194c47}dialog a{color:#28665e}dialog small{font-size:13px;line-height:1.5;display:block}.links{display:flex;gap:10px;flex-wrap:wrap}#restart{background:#eee4ce;color:#173f3e}@media(max-width:600px){header{left:12px;right:12px;top:max(12px,env(safe-area-inset-top))}header>div{padding:10px 14px}header strong{font-size:16px}#quest{top:89px;left:12px;width:245px;padding:10px 13px}#quest p{font-size:14px}#controls{left:17px;right:22px}#pad{width:145px;height:145px}#speech{font-size:17px}#near{font-size:13px}}@media(max-height:500px){#quest{top:87px;width:230px}#pad{width:116px;height:116px}#controls{bottom:12px}#near{bottom:145px}#dialogue{bottom:14px;padding:14px 20px}#speech{font-size:16px;margin:4px 0 10px}}
/* CRA chapter */
html,body{background:#183b55;color:#19354b}header{z-index:2}header>div{background:#183b55ed;max-width:calc(100% - 240px)}header small{font-size:12px}header strong{font-size:18px}header nav{display:flex;gap:8px;pointer-events:auto}#notebook{width:auto;border-radius:12px;padding:0 14px;font-size:14px}#quest{top:105px;width:265px;background:#fffdf3f5}#quest>span{font-size:12px}#quest p{font-size:16px}#inventory{font-size:14px}progress{width:100%;height:8px;accent-color:#b46b24;margin-top:10px}#near{white-space:normal;width:max-content;max-width:90%;font-size:16px}.action span{font-size:14px}#speaker{font-size:16px}#speech{line-height:1.45}dialog{width:min(720px,calc(100% - 28px));background:#fffef6}dialog h2{font-size:25px;margin-top:10px}dialog .eyebrow{color:#a56025;font-size:14px;font-weight:bold;letter-spacing:1px}.choices{display:grid;gap:10px;margin-top:18px}.choices button{text-align:left;font-size:16px;line-height:1.4;background:#e6edf2;color:#19354b;border:2px solid transparent;touch-action:manipulation}.choices button:hover{border-color:#39748b}.choices button.good{background:#dcecd8;border-color:#3e7749}.feedback{min-height:24px;color:#75400b;font-weight:bold}#infoContent .primary{background:#1c5b54;color:white;margin-top:12px}.specimen{float:right;width:190px;height:190px;border-radius:14px;margin:0 0 18px 20px;background-repeat:no-repeat;border:3px solid #eadbb5}.source{font-size:14px;line-height:1.5;color:#546574;clear:both}.records{padding-left:22px}.records li{margin:8px 0}.photo{width:100%;border-radius:12px}.note{font-size:14px!important;color:#546574}#arrival{position:absolute;inset:0;background:#fdf9eb;overflow:auto;z-index:8;display:grid;grid-template-columns:1.2fr 1fr;align-items:center}#arrival[hidden]{display:none}#arrival>img{width:100%;height:100%;object-fit:cover}#arrival>div{padding:36px}#arrival h1{font-size:clamp(26px,4vw,44px);line-height:1.1}#arrival p,#arrival blockquote{font-size:18px;line-height:1.5}#arrival blockquote{margin:20px 0;color:#245850}#arrival button{background:#1c5b54;color:white;border:0;border-radius:12px;padding:14px;margin:4px;font-size:16px}.fade{animation:arrive 1.5s ease both}@keyframes arrive{from{opacity:0}to{opacity:1}}@media(max-width:650px){header>div{max-width:calc(100% - 110px);padding:8px 10px}header strong{font-size:14px}header small{font-size:12px;letter-spacing:1px}header nav{flex-wrap:wrap;width:98px;justify-content:end;gap:4px}header nav button{width:38px;height:38px}#notebook{width:98px;height:33px;padding:0 7px}#quest{top:113px;width:230px;padding:9px 12px}#quest p{font-size:14px}#quest>span{font-size:12px}#inventory{font-size:14px}#arrival{display:block}#arrival>img{height:33dvh}#arrival>div{padding:22px}.specimen{width:160px;height:160px;float:none;margin:0 auto 15px}dialog{padding:22px}#speech{font-size:16px}}@media(max-height:500px){header strong{font-size:14px}#quest{top:85px;width:210px;padding:8px}#quest p{margin:4px 0;font-size:14px}#quest progress{display:none}#dialogue{max-height:75dvh;overflow:auto}#arrival>div{padding:16px}#arrival p,#arrival blockquote{font-size:16px}#near{bottom:145px}}

/* Full source photographs: preserve their entire original frame. */
.specimen{float:none;width:100%;height:auto;margin:0 0 18px;background:none;border:0;text-align:center}
.specimen img{display:block;width:min(100%,300px);height:auto;object-fit:contain;margin:auto;border:2px solid #d9dfd9;border-radius:8px;background:#fff}
.specimen figcaption{font-size:14px;margin-top:7px;color:#536472}
#bookBadge{font-size:14px;font-weight:bold;color:#245d4c;margin-top:8px}
#bookBadge[hidden]{display:none}
#arrival>img{object-fit:contain;background:#dce5cf}
@media(max-width:650px){.specimen{width:100%;height:auto;margin:0 0 16px}.specimen img{width:min(100%,267px)}#arrival>img{height:auto;max-height:42dvh;object-fit:contain}}
@media(prefers-reduced-motion:reduce){.fade{animation:none}}

#transition{position:absolute;inset:0;z-index:15;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;background:#183b55;color:#fff;text-align:center;padding:24px;animation:arrive .35s both}#transition[hidden]{display:none}#transition strong{font-size:clamp(22px,4vw,36px)}#transition span{font-size:18px}
.birdCards{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:16px}.birdCards button{display:flex;flex-direction:column;gap:10px;background:#e6edf2;color:#19354b;border:2px solid #a8bebf;text-align:left;touch-action:manipulation}.birdCards img{width:100%;max-height:200px;object-fit:contain}.birdCards span{font-size:16px;line-height:1.4}.encounterPhoto{display:block;width:130px;height:130px;object-fit:contain;margin:auto}.encounter{animation:encounterEnter .5s ease-out}@keyframes encounterEnter{from{transform:translateY(16px);opacity:.35}to{transform:translateY(0);opacity:1}}@media(prefers-reduced-motion:reduce){.encounter{animation:none}}@media(max-width:400px){.birdCards{gap:8px}.birdCards button{padding:8px}}

#sound{width:auto;padding:0 12px;border-radius:12px;font-size:14px}header>div{max-width:calc(100% - 330px)}@media(max-width:650px){header>div{max-width:calc(100% - 110px)}#sound{width:98px;height:33px;padding:0 5px}header nav{max-height:150px}}
/* Soil investigation: clear controls and measured data, no floating map labels. */
.soilSamples{display:grid;gap:12px;margin:20px 0}.soilSamples button{display:grid;gap:6px;text-align:left;background:#e5eced;color:#19354b;border:2px solid #c5d4d5;padding:16px;touch-action:manipulation}.soilSamples strong{font-size:18px}.soilSamples span{font-size:16px}.soilSamples small{font-size:14px;color:#355957}button:disabled{cursor:default;opacity:.6}.soilSamples button:disabled{opacity:1;background:#dbebde;border-color:#8ba891}.soilLabGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:22px 0}.soilTrial{min-width:0;padding:14px;border:1px solid #bbcbd0;border-radius:14px;background:#f0f4f3}.soilTrial h3{margin:0 0 8px;font-size:20px}.soilTrial .soilTexture{font-size:14px;min-height:42px;margin:0 0 14px}.soilTrial label{display:block;font-size:14px;line-height:1.45}.soilTrial label strong{display:block}.soilTrial progress{height:14px;accent-color:#237cac;margin:8px 0}.soilTrial button{width:100%;font-size:14px;padding:11px 8px;margin:5px 0;touch-action:manipulation}.soilResult{border-top:1px solid #c9d6d5;margin:12px 0;padding-top:10px;font-size:14px}.soilResult strong{display:block;font-size:24px;margin:4px 0}.soilBar{height:10px;background:#d3dfe3;border-radius:5px;overflow:hidden}.soilBar span{display:block;height:100%;background:#237cac;animation:measureWater .6s ease-out;transform-origin:left}.soilNumber{display:flex;align-items:center;gap:8px;margin:8px 0}.soilNumber input{width:100%;min-width:0;padding:10px;border:2px solid #7d9b9f;border-radius:8px;font:inherit;background:white;color:#19354b}.soilFeedback{font-size:14px!important;min-height:44px;color:#75400b}.soilTableWrap{overflow-x:auto}.soilTable{width:100%;border-collapse:collapse;font-size:16px;margin:16px 0}.soilTable caption{text-align:left;margin-bottom:8px;font-weight:bold}.soilTable th,.soilTable td{padding:11px 8px;text-align:left;border-bottom:1px solid #c4d2d3}.soilTable thead{background:#e1eceb}.soilOrder{display:flex;gap:12px;padding:0;list-style-position:inside;flex-wrap:wrap}.soilOrder li{padding:14px;background:#e5ece9;border-radius:10px;flex:1;min-width:120px;font-weight:bold}.soilPick,.soilActions{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}.soilPick button,.soilActions button{font-size:16px;touch-action:manipulation}@keyframes measureWater{from{transform:scaleX(0)}to{transform:scaleX(1)}}@media(max-width:580px){.soilLabGrid{grid-template-columns:1fr}.soilTrial .soilTexture{min-height:0}.soilTrial{padding:18px}.soilTrial label,.soilTrial button{font-size:16px}.soilTrial progress{height:18px}.soilFeedback{min-height:0}.soilTable th,.soilTable td{padding:10px 5px;font-size:14px}}@media(prefers-reduced-motion:reduce){.soilBar span{animation:none}}
#professorPortrait{position:absolute;left:15px;bottom:0;width:145px;height:180px;pointer-events:none}#professorPortrait[hidden]{display:none}#dialogue.withProfessor{padding-left:175px;min-height:190px;width:min(760px,calc(100% - 30px))}@media(max-width:600px){#professorPortrait{width:86px;height:115px;left:8px;bottom:10px}#dialogue.withProfessor{padding-left:105px;min-height:150px}#dialogue.withProfessor #speech{font-size:16px}#dialogue.withProfessor #next{font-size:14px;padding:10px}}@media(max-height:500px){#professorPortrait{width:95px;height:126px}#dialogue.withProfessor{padding-left:125px;min-height:145px}}
.evidenceCards,.planCards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:20px 0}.evidenceCards button,.planCards button{display:flex;flex-direction:column;gap:10px;border:2px solid #b5cbd0;background:#edf3f1;color:#19354b;padding:16px;text-align:left;touch-action:manipulation}.evidenceCards strong,.planCards strong{font-size:18px}.evidenceCards span,.planCards span{font-size:16px;line-height:1.45}.evidenceCards .selected,.planCards .selected{border-color:#92500c;background:#fff0c9;box-shadow:inset 0 0 0 1px #92500c}.evidenceFolders{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:18px 0}.evidenceFolders button{display:grid;gap:10px;text-align:left;padding:18px;border:2px solid #28635e;touch-action:manipulation}.evidenceFolders strong{font-size:18px}.evidenceFolders span{font-size:16px;line-height:1.4}.evidenceFolders small{font-size:14px;color:#e0efe8}.evidenceFolders button:last-child{background:#244f70;border-color:#244f70}#journeyRecords{font-size:16px;line-height:1.45}#arrival #journeyRecords li{margin:10px 0}@media(max-width:500px){.evidenceCards,.planCards,.evidenceFolders{grid-template-columns:1fr}.evidenceCards button,.planCards button{padding:14px}} 

/* Touch scrolling remains available inside research cards and final credits. */
dialog button,#arrival button,header button{touch-action:manipulation}#close{width:44px;height:44px}#infoContent{overflow-wrap:anywhere}.musicCredits{font-size:14px;line-height:1.5;margin:16px 0}.musicCredits summary{cursor:pointer;padding:10px 0}#arrival .musicCredits p{font-size:14px}.musicCredits a{color:#245850}
