.relax-intro{display:grid;gap:20px}.relax-banner{height:260px;position:relative;overflow:hidden;border-radius:28px;box-shadow:0 8px 25px #6d8c6a18}.relax-banner>svg{width:100%;height:100%;position:absolute}.relax-banner>div{position:relative;padding:26px 22px;max-width:350px}.relax-banner h2{font-size:29px;line-height:1.15;margin:12px 0}.eyebrow{font-size:10px;letter-spacing:1.6px;font-weight:900;color:#537967}.relax-note{font-size:13px;text-align:center;color:#786f65;margin:0}.relax-cards{display:grid;gap:20px}.relax-card{border-radius:26px;overflow:hidden;background:#fffdf8;box-shadow:0 5px 18px #795c3b10;border:1px solid #e9dfd0}.game-art{height:180px;position:relative;overflow:hidden}.game-art>svg{width:100%;height:100%}.card-character{position:absolute;bottom:14px;left:22%;width:94px;transform:rotate(-7deg)}.garden-card>b{position:absolute;right:22%;top:23px;font-size:74px;color:#fff9ef;text-shadow:0 4px #769f7e}.game-copy{padding:22px}.game-copy h2{margin:8px 0;font-size:23px}.game-copy p{font-size:14px;color:#776d63}.game-copy .primary{width:100%;font-size:14px}.teaser{height:125px;display:flex;align-items:center;justify-content:center;gap:24px;font-size:64px}.teaser span{font-size:21px;font-weight:900;transform:rotate(-8deg)}.sky{background:linear-gradient(140deg,#c2e4ef,#e5f3e7);color:#698c97}.travel{background:linear-gradient(140deg,#efe0c5,#f9ead4);color:#ad8060}.soon-badge{background:#eee9dd;color:#81755e;border-radius:20px;padding:5px 12px;font-size:12px;font-weight:800}.relax-champions{padding:22px;background:#f1f1df;border-radius:24px}.relax-champions h2{font-size:22px;margin:0}.relax-champions>p{font-size:13px}.champion{display:flex;gap:10px;align-items:center;padding:12px 0;border-top:1px solid #dbdfc9}.champion .avatar{width:38px;height:38px;flex-shrink:0}.champion>span{flex:1;overflow-wrap:anywhere}.champion>strong{text-align:right}.champion small{display:block;font-size:10px;color:#7b7c67}.playing-relax .hero,.playing-relax .bottom-nav{display:none}.playing-relax #main{padding:8px!important}.playing-relax #shell{padding-bottom:0}.relax-game{max-width:820px;margin:auto}.game-top{display:flex;align-items:center;justify-content:space-between;gap:6px;height:43px}.game-top b{font-size:12px}.game-top button{padding:8px;font-size:12px}.game-hud{display:flex;justify-content:space-between;align-items:center;padding:7px 6px;font-size:13px}.game-hud>span:first-child{color:#db796a;font-size:21px;letter-spacing:3px}.garden-stage{position:relative;height:clamp(155px,26dvh,300px);overflow:hidden;border-radius:22px;background:#c7e7df;--approach:0;isolation:isolate}.runner{width:70px;height:91px;position:absolute;left:12%;bottom:12%;z-index:3;transform-origin:50% 90%}.runner svg{width:100%;height:100%;overflow:visible}.obstacle{position:absolute;width:64px;height:58px;bottom:13%;left:calc(100% - var(--approach) * 82%);z-index:2}.obstacle svg{width:100%;height:100%;overflow:visible}.garden-stage[data-action=slide] .obstacle{height:110px;width:95px;bottom:13%}.stage-label{position:absolute;top:10px;left:10px;right:10px;font-size:11px;font-weight:800;color:#4f6c58;text-align:center}.game-overlay{position:absolute;inset:0;z-index:5;background:#fff9efed;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:15px}.game-overlay h2{font-size:22px;margin:0 0 7px}.game-overlay p{font-size:12px;margin:0 0 12px}.game-overlay button{padding:10px 24px}.game-controls{padding:10px 8px}.time-row{display:flex;justify-content:space-between;font-size:12px}.game-timer{height:8px;background:#e4dece;border-radius:10px;overflow:hidden;margin-top:5px}.game-timer i{display:block;height:100%;background:linear-gradient(90deg,#e9b36e,#7da889);width:100%}.question-row{display:flex;justify-content:center;align-items:center;gap:14px;margin:8px 0}.question-row strong{font-size:32px}.question-row output{min-width:80px;border:2px solid #d8d8b9;border-radius:14px;background:#fffdf8;padding:3px 12px;font-size:32px;font-weight:900;text-align:center;color:#527662}.game-feedback{min-height:33px;font-size:13px;text-align:center;margin:5px 0 8px;line-height:1.3;color:#726b5b}.game-keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;max-width:420px;margin:auto}.game-keypad button{min-height:44px;height:clamp(44px,6.4dvh,58px);border-radius:14px;background:#fffdf7;border:1px solid #e3daca;box-shadow:0 3px #e2d6c4;font-size:23px;font-weight:900;touch-action:manipulation}.game-keypad .confirm-answer{background:#719b7f;color:white;border-color:#719b7f}.game-keypad button:active{transform:translateY(2px);box-shadow:none}.dizzy{display:none;position:absolute;top:-8px;left:9px;color:#efb74e;font-size:26px;white-space:nowrap}.error .dizzy{display:block;animation:stars 1.2s ease-in-out infinite alternate}.success .obstacle{animation:pass 1.1s linear both}.error .obstacle{left:25%;transition:left .25s}.game-result{text-align:center}.game-result h2{margin:3px;font-size:26px}.game-result p{font-size:14px;margin:10px}.game-result p>strong{font-size:30px}.game-result button{display:block;width:100%;max-width:360px;margin:10px auto}.result-trophy{font-size:42px}.wide{width:100%;min-height:48px}.paused .runner *{animation-play-state:paused}.success .stage-label{color:#356950}.success .game-feedback{color:#356950}@media(min-width:700px){.relax-cards{grid-template-columns:1fr 1fr}.relax-card:first-child{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr}.relax-card:first-child .game-art{height:100%;min-height:270px}.relax-banner>div{max-width:500px}.garden-stage{height:300px}.runner{width:90px;height:117px}.game-keypad{grid-template-columns:repeat(3,1fr)}.game-controls{max-width:480px;margin:auto}}@media(max-height:680px){.garden-stage{height:145px}.game-controls{padding-top:5px}.game-feedback{min-height:28px;font-size:12px;margin:3px 0}.question-row{margin:4px}.question-row strong,.question-row output{font-size:26px}.game-keypad{gap:5px}.game-keypad button{height:44px}.game-hud{padding:3px}.game-top{height:37px}}@media(prefers-reduced-motion:reduce){.relax-game *{animation-duration:.15s!important;animation-iteration-count:1!important;transition:none!important}.running .body,.running .leg,.garden-layer,.error .dizzy{animation:none!important}}
/* The approaching obstacle reaches the runner's right edge exactly when time runs out. */
.garden-stage{--runner-width:70px}.obstacle{left:calc(100% - var(--approach) * (88% - var(--runner-width) * .65))}



.game-result .result-trophy{display:inline-block;animation:record-glow .7s ease-in-out 3 alternate}@keyframes record-glow{to{transform:scale(1.12) rotate(8deg);filter:drop-shadow(0 0 12px #efbc6b)}}
#shell[data-page=relax]{max-width:900px}
@media(min-width:700px){.garden-stage{--runner-width:90px}.relax-intro{padding:0 12px}.relax-banner{height:280px}.relax-banner>div{max-width:470px}.relax-banner h2{font-size:36px}}
@media(max-height:640px) and (max-width:699px){.garden-stage{height:110px}.runner{width:58px;height:75px}.garden-stage{--runner-width:58px}.obstacle{width:52px;height:47px}.garden-stage[data-action=slide] .obstacle{height:89px;width:77px}.game-top{height:32px}.game-hud{padding:0 6px;height:27px}.game-hud>span:first-child{font-size:18px}.game-controls{padding:4px}.time-row{font-size:11px}.game-timer{height:6px;margin-top:3px}.question-row strong,.question-row output{font-size:24px}.question-row output{padding:1px 10px}.question-row{margin:3px 0}.game-feedback{min-height:27px;margin:2px 0 5px;font-size:11px}.game-keypad button{height:44px;min-height:44px}.game-keypad{gap:5px}.game-overlay h2{font-size:18px;margin-bottom:3px}.game-overlay p{font-size:11px;margin-bottom:5px}.game-overlay button{padding:7px 20px}}
/* Layered orchard: distant clouds, hills, trees/fence and nearby flowers move independently. */
.garden-sky,.scenery-layer{position:absolute;inset:0;pointer-events:none}.garden-sky svg{width:100%;height:100%}.scenery-layer{inset:0 auto 0 0;width:1600px;display:flex;will-change:transform}.scenery-layer svg{width:800px;height:100%;flex:0 0 800px}.scenery-clouds{transform:translateX(var(--clouds,0px))}.scenery-hills{transform:translateX(var(--hills,0px))}.scenery-orchard{transform:translateX(var(--orchard,0px))}.scenery-flowers{transform:translateX(var(--flowers,0px));z-index:1}.garden-path{position:absolute;top:82.5%;bottom:0;width:100%;background:linear-gradient(#b8c28b 0 5px,#f5dfb3 5px 10px,#e6c69d 10px 75%,#ddbd94)}.garden-path i{position:absolute;inset:8px 0 0;background:repeating-linear-gradient(90deg,transparent 0 46px,#c59f7333 47px 53px,transparent 54px 96px);transform:translateX(calc(mod(var(--travel,0px),96px) * -1));width:calc(100% + 96px)}
.garden-stage{--runner-width:85px}.runner{width:85px;height:100px;bottom:12.5%;overflow:visible;animation:none!important;transform:none!important}.runner svg{filter:drop-shadow(0 1px 0 #fff4d940)}.runner .rig-scarf{transform-origin:-3px -40px}.obstacle{filter:drop-shadow(2px 5px 1px #6c66401a)}.garden-stage[data-action=slide] .obstacle{height:145px;width:108px}.success .obstacle{animation:none;left:var(--pass,100%);transition:none}.error .obstacle{left:calc(12% + var(--runner-width) * .65 - 3px);transition:none}.stage-label{z-index:4;text-shadow:0 1px 4px #fff9ef;background:#fff9efb8;width:max-content;max-width:calc(100% - 20px);margin:auto;padding:3px 10px;border-radius:20px;font-size:10px}.dizzy{left:19px;top:49px;font-size:20px;z-index:5;letter-spacing:2px}.error .dizzy{animation:orbit-stars 1.5s linear infinite;transform-origin:30px 8px}.game-feedback.try-again{color:#ad7054;font-weight:800}.question-row output{transition:color .15s,border-color .15s}.game-feedback{font-size:12px}.game-overlay{z-index:8}.dust{position:absolute;left:12%;bottom:14%;z-index:4;width:80px;height:20px;pointer-events:none}.dust i{position:absolute;left:0;bottom:0;width:8px;height:6px;background:#fff0cb;opacity:0;border-radius:50%;animation:dust-trail .75s linear infinite;animation-delay:calc(var(--motion-time,0ms) + var(--delay,0ms))}.dust i:nth-child(2){--delay:-150ms;width:5px}.dust i:nth-child(3){--delay:-300ms;width:10px}.dust i:nth-child(4){--delay:-450ms;width:4px}.dust i:nth-child(5){--delay:-600ms;width:7px}.ready .dust,.paused .dust,.finished .dust{display:none}.error .dust i{animation:dust-impact .7s ease-out both;animation-delay:.35s;left:25px}.error .dust i:nth-child(2n){left:55px;animation-delay:.4s}.error .dust i:nth-child(3n){left:10px;animation-delay:.45s}.success .dust i{animation:dust-impact .7s ease-out both;animation-delay:1.1s}.success[data-action=slide] .dust i{animation:dust-trail .45s linear infinite;animation-delay:calc(var(--motion-time,0ms) + var(--delay,0ms))}.paused *{animation-play-state:paused!important}
@keyframes dust-trail{0%{transform:translate(5px,-1px) scale(.6);opacity:0}20%{opacity:.6}100%{transform:translate(-40px,-13px) scale(1.4);opacity:0}}@keyframes dust-impact{0%{transform:translate(0,0) scale(.5);opacity:0}15%{opacity:.65}100%{transform:translate(-28px,-12px) scale(2.3);opacity:0}}@keyframes orbit-stars{0%{transform:translate(0,0) rotate(-8deg)}25%{transform:translate(7px,-3px) rotate(0deg)}50%{transform:translate(0,-6px) rotate(8deg)}75%{transform:translate(-7px,-3px) rotate(0deg)}100%{transform:translate(0,0) rotate(-8deg)}}
@media(min-width:700px){.garden-stage{--runner-width:110px}.runner{width:110px;height:130px}.garden-stage[data-action=slide] .obstacle{height:185px;width:130px}.dizzy{top:65px;left:30px}.dust{width:110px}.garden-stage{height:300px}}
@media(max-height:640px) and (max-width:699px){.garden-stage{--runner-width:65px}.runner{width:65px;height:77px}.garden-stage[data-action=slide] .obstacle{height:110px;width:82px}.dizzy{top:34px;left:12px;font-size:16px}.stage-label{top:4px;font-size:9px;padding:1px 7px}.dust{bottom:12%}}
@media(prefers-reduced-motion:reduce){.scenery-layer,.garden-path i{transform:none!important}.dust{display:none}.runner{transform:none!important;animation:none!important}.error .dizzy{animation:none!important}.success .obstacle{opacity:.7}.game-feedback{transition:none}}
/* Phone game uses the dynamic viewport; surplus height belongs to the stage. */
@media(max-width:699px){
  body.playing-relax{height:100dvh;overflow:hidden;overscroll-behavior:none}
  .playing-relax #shell{height:100dvh;min-height:0;padding:0}
  .playing-relax #main{
    height:100%;min-height:0;animation:none;
    padding:max(6px,var(--game-safe-top,env(safe-area-inset-top,0px))) max(8px,var(--game-safe-right,env(safe-area-inset-right,0px))) max(8px,var(--game-safe-bottom,env(safe-area-inset-bottom,0px))) max(8px,var(--game-safe-left,env(safe-area-inset-left,0px)))!important;
  }
  .relax-game{height:100%;width:100%;min-height:0;margin:0;display:grid;grid-template-rows:36px 30px minmax(100px,1fr) auto}
  .game-top{height:36px;min-height:0}.game-top button{padding:8px;line-height:20px}
  .game-hud{height:30px;padding:0 6px}.game-hud>span:first-child{font-size:20px}
  .garden-stage{height:auto;min-height:0;max-height:none}
  .game-controls{padding:6px 4px 0;min-width:0;display:grid;grid-template-columns:minmax(0,1fr)}
  .time-row{font-size:12px;line-height:17px}.game-timer{height:7px;margin-top:4px}
  .question-row{margin:6px 0;min-height:48px}.question-row strong,.question-row output{font-size:30px;line-height:42px}
  .question-row output{padding:1px 12px}
  .game-feedback{font-size:12px;line-height:16px;min-height:32px;margin:0 0 6px}
  .game-keypad{width:100%;max-width:none;margin:0;gap:6px}
  .game-keypad button{height:clamp(44px,6.2dvh,54px);min-height:44px;font-size:24px}
  .game-result h2{font-size:23px}.game-result p{font-size:13px;margin:6px 0}.game-result p>strong{font-size:28px}
  .game-result .result-trophy{font-size:30px;line-height:1}.game-result button{min-height:44px;margin:6px auto 0;padding:9px 12px}
  /* A taller stage reveals more sky; tiles retain their 800:300 aspect ratio. */
  .garden-sky{background:linear-gradient(#a6dcd9,#fff2d3)}
  .garden-sky svg{position:absolute;top:0;right:0;width:800px;height:300px}
  .scenery-layer{top:auto;bottom:calc(17.5% - 53px);height:300px}
  .scenery-layer svg{width:800px;height:300px}
  .scenery-clouds{top:0;bottom:auto}
  .runner{bottom:calc(17.5% - 7px)}
  .obstacle,.garden-stage[data-action=slide] .obstacle{bottom:calc(17.5% - 5px)}
  .dust{bottom:17.5%}
}
@media(max-width:699px) and (max-height:640px){
  .relax-game{grid-template-rows:32px 26px minmax(95px,1fr) auto}
  .game-top{height:32px}.game-top button{padding:6px 8px;line-height:20px}
  .game-hud{height:26px}.game-hud>span:first-child{font-size:18px}
  .game-controls{padding-top:4px}.time-row{font-size:11px;line-height:15px}.game-timer{height:6px;margin-top:3px}
  .question-row{min-height:38px;margin:4px 0}.question-row strong,.question-row output{font-size:26px;line-height:34px}
  .game-feedback{font-size:11px;line-height:14px;min-height:28px;margin-bottom:5px}
  .game-keypad{gap:5px}.game-keypad button{height:44px}
  .runner{bottom:calc(17.5% - 5px)}
}
