:root{--cream:#fff8d8;--lime:#def88a;--ink:#123e40;--coral:#ff927d}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}body{display:flex;flex-direction:column;align-items:center;justify-content:center;background:radial-gradient(ellipse at 25% 20%,#347b71,#103536 80%);color:var(--cream);font-family:Trebuchet MS,Segoe UI,sans-serif;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}button{font:inherit;cursor:pointer;touch-action:manipulation}button:focus-visible,canvas:focus-visible{outline:3px solid var(--coral);outline-offset:3px}button[hidden]{display:none!important}.masthead,main{width:min(1280px,calc(100vw - 32px),calc((100dvh - 114px)*1.48))}.masthead{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.brand{font-size:clamp(20px,2.6vw,32px);font-weight:900;letter-spacing:.12em}.brand b{color:var(--lime)}.brand small{display:block;font-size:9px;letter-spacing:.22em;margin-top:4px;color:#aee0c2}.tools{display:flex;gap:7px}.tools button{border:1px solid #b6ebc477;background:#103b3ba0;color:var(--cream);border-radius:8px;padding:9px;font-size:12px;font-weight:bold}.tools #help-button{width:36px;border-radius:50%;background:#ffffff20}#playfield{position:relative;width:100%;aspect-ratio:960/652;border:1px solid #b5e7b277;border-radius:12px;overflow:hidden;box-shadow:0 18px 70px #001c29aa;background:#123e40;display:flex;flex-direction:column}canvas{width:100%;flex:1;min-height:0;display:block;touch-action:none}#hud{height:49px;flex:0 0 49px;display:grid;grid-template-columns:repeat(5,1fr);padding:5px 10px;background:#123e40;color:var(--cream);text-align:center;border-bottom:2px solid #74a781;pointer-events:none}#hud div{display:grid;gap:1px}#hud div+div{border-left:1px solid #b1dfaa44}#hud small{font-size:9px;letter-spacing:.13em;font-weight:900}#hud strong{font-size:21px;font-weight:900;font-variant-numeric:tabular-nums}#hearts,#seeds{color:var(--lime)}#message{height:27px;flex:0 0 27px;text-align:center;background:#123e40;padding:6px 4px;font-size:12px;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hint{margin:9px 0 0;font-size:10px;letter-spacing:.06em;color:#aee0c2}.modal{position:fixed;inset:0;z-index:1000;display:none;place-items:center;padding:14px;overflow:auto;background:#103536ed}.modal.is-visible{display:grid}.modal-card{width:min(710px,100%);max-height:calc(100dvh - 28px);overflow-y:auto;padding:28px;border:2px solid #aad978;border-radius:16px;background:linear-gradient(130deg,#fffbe5,#ddedb8);color:var(--ink);box-shadow:0 24px 70px #0008}.eyebrow{font-size:11px;font-weight:900;letter-spacing:.15em;margin:0 0 12px;color:#3b7957}.modal h1,.modal h2{font:900 clamp(30px,4vw,46px)/1.08 Georgia,serif;margin:0 0 12px}.modal em{color:#bc4c3d;font-style:normal}.modal p{line-height:1.45}.guide{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:18px 0}.guide p{margin:0;padding:11px;background:#fff6;border-top:3px solid #72a778;font-size:12px}.fine{font-size:12px;color:#345b4b}.primary{background:#a64436;color:#fffbe5;border:1px solid #bc5d48;border-radius:8px;padding:14px 20px;min-height:46px;font-weight:900;letter-spacing:.05em}.result{text-align:center;width:min(520px,100%)}.result button{display:block;margin:12px auto;min-width:180px}.result #again{border:1px solid #4b816c;background:transparent;padding:10px 18px;border-radius:8px;color:#234e44}#touch-controls,#orientation{display:none}body:has(.modal.is-visible) #touch-controls{visibility:hidden!important}body.touch-device .masthead,body.touch-device .hint{display:none}body.touch-device main{display:flex;width:100%;height:100%;align-items:center;justify-content:center}body.touch-device #hud{height:37px;flex-basis:37px;padding:3px}body.touch-device #hud small{font-size:8px;letter-spacing:0}body.touch-device #hud strong{font-size:15px}body.touch-device #message{height:22px;flex-basis:22px;font-size:9px;padding:5px 3px}body.touch-device #playfield{border-radius:7px}body.touch-device #touch-controls{display:flex;position:fixed;inset:0;align-items:center;justify-content:space-between;pointer-events:none}body.touch-device .touch-actions{display:flex;flex-direction:column;gap:7px;pointer-events:auto}.touch-actions button{min-width:112px;min-height:44px;border:1px solid #abd69b;border-radius:10px;background:#286050;color:#fffbe5;font-weight:900;font-size:11px;box-shadow:0 3px 0 #072c2c;touch-action:none}.touch-actions #dig-left,.touch-actions #dig-right{background:#ffd17a;color:#49372c}.touch-actions button:active,.touch-actions [aria-pressed=true]{transform:translateY(2px);background:#ffad8b!important;color:#123e40}.touch-actions #touch-pause,.touch-actions #touch-sound{min-height:33px;font-size:10px}#whistle:disabled{opacity:.55}@media(max-width:900px){.flyout-nav{display:none!important}}@media(max-height:450px){.modal-card{padding:16px 20px}.modal h1{font-size:29px}.modal p{font-size:12px}.guide{margin:10px 0;gap:8px}.guide p{padding:8px;font-size:11px}.eyebrow{margin-bottom:6px}.fine{margin:8px 0}.primary{padding:10px 14px}}@media(orientation:portrait) and (max-width:900px){body.touch-device #orientation{display:grid;position:fixed;inset:0;place-items:center;z-index:45;padding:28px;background:#123e40;text-align:center}#orientation span{font-size:70px;color:var(--lime)}#orientation p{line-height:1.6;max-width:30ch}body.touch-device #touch-controls{visibility:hidden!important}.guide{grid-template-columns:1fr}.modal h1{font-size:34px}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
:root{--garden-ratio:1.666667}
body #hud .low{color:#ffb4a0;text-decoration:underline;text-underline-offset:3px}
body #playfield{aspect-ratio:auto}body canvas{flex:0 0 auto;height:auto;aspect-ratio:5/3}
body.touch-device.vibecade-joystick-rails #playfield{width:min(calc(100vw - var(--vibecade-control-rail)*2),calc((100dvh - 67px)*var(--garden-ratio)))!important;max-width:min(calc(100vw - var(--vibecade-control-rail)*2),calc((100dvh - 67px)*var(--garden-ratio)))!important;height:min(calc((100vw - var(--vibecade-control-rail)*2)*.6 + 59px),calc(100dvh - 8px))!important;max-height:min(calc((100vw - var(--vibecade-control-rail)*2)*.6 + 59px),calc(100dvh - 8px))!important}
body.touch-device.vibecade-joystick-rails #playfield canvas{height:calc(100% - 59px)!important;flex:1 1 auto;aspect-ratio:5/3}
/* Garden revision: parchment instruments around the scrolling illustration. */
body{background:radial-gradient(ellipse at 30% 15%,#477665,#243f3c 80%)}
body #hud{grid-template-columns:repeat(5,minmax(0,1fr)) 70px;background:#29493e;color:#fff2d3;border-bottom-color:#879a6c}
body #map{width:64px;height:30px;display:block;margin:auto;border-radius:3px;background:#153b32;overflow:hidden}
body.touch-device #map{height:23px;width:60px}body.touch-device #hud{grid-template-columns:repeat(5,minmax(0,1fr)) 65px}
body #message{background:#29493e;color:#f5ebcb}
body .touch-actions #dig{min-height:58px;background:#e7c78e;color:#3b4939;border-color:#f4e0b3;font-size:15px}
body .touch-actions button{border-color:#a8b386;background:#3a6250;color:#f4edcf}
body .tools button{border-color:#b8c59b66;background:#28483eaa}
body .brand b{color:#e6d59c}body .modal-card{background:linear-gradient(130deg,#faf0d6,#e3e5bc);border-color:#b5bd8a}
