.ffy-shell{position:absolute;inset:0;overflow:hidden;container-type:size}[data-game=formula-freight-yard]{min-height:clamp(650px,calc(100svh - 168px),800px);aspect-ratio:auto}.ffy-hud{position:absolute;z-index:38;top:14px;right:14px;display:grid;width:min(15rem,calc(100% - 28px));min-height:48px;grid-template-columns:auto minmax(4rem,1fr) auto;align-items:center;gap:.38rem;padding:.36rem .58rem;border:2px solid rgb(255 255 255/.95);border-radius:1rem;color:#123e55;background:rgb(248 253 255/.96);box-shadow:0 7px 18px rgb(15 72 91/.22);font-size:.72rem;font-weight:950}.ffy-hud>span,.ffy-hud>strong{display:flex;align-items:center;gap:.24rem;white-space:nowrap}.ffy-hud svg{width:1rem;height:1rem;color:#ee735f}.ffy-hud>strong{justify-content:flex-end;color:#875217}.ffy-progress{display:grid;grid-template-columns:repeat(5,1fr);gap:.18rem}.ffy-progress i{height:.46rem;border-radius:999px;background:#c8dde2}.ffy-progress i.current{background:#27cbd5;box-shadow:0 0 0 2px #fff}.ffy-progress i.done{background:#ffd84f}.ffy-console{position:absolute;z-index:8;top:100px;left:50%;width:min(980px,84cqw);aspect-ratio:1.5;transform:translateX(-50%);pointer-events:none}.ffy-console img{z-index:0;object-fit:contain;filter:drop-shadow(0 20px 16px rgb(14 55 68/.28));user-select:none}.ffy-blueprint{position:absolute;z-index:1;top:23.5%;left:31.4%;display:grid;width:37.2%;height:22.9%;grid-template-rows:auto minmax(0,1fr) auto;align-items:center;justify-items:center;gap:.08rem;padding:.38rem 1.5rem .28rem 1rem;overflow:hidden;color:#083c51}.ffy-blueprint header{display:flex;align-items:center;gap:.35rem;font-size:clamp(.7rem,1.2vw,.92rem);font-weight:1000;letter-spacing:.08em;text-transform:uppercase}.ffy-blueprint header svg{width:1.1rem;height:1.1rem;color:#ff775e}.ffy-blueprint>p{margin:0;font-size:.68rem;font-weight:950;line-height:1}.ffy-shape{position:relative;display:grid;width:min(238px,70%);height:min(88px,61%);place-items:center;margin-top:.82rem;border:5px solid #f36f58;border-radius:.7rem;background:repeating-linear-gradient(135deg,rgb(255 255 255/.45) 0 12px,rgb(91 223 216/.38) 12px 24px);box-shadow:inset 0 0 0 3px rgb(255 255 255/.75),0 5px 10px rgb(9 79 95/.15)}.ffy-shape strong{color:#143f54;font-size:clamp(.82rem,1.3vw,1rem);font-weight:1000}.ffy-shape .ffy-length{top:-1.12rem;left:50%;transform:translateX(-50%)}.ffy-shape .ffy-length,.ffy-shape .ffy-width{position:absolute;font-size:.72rem;font-weight:1000;white-space:nowrap}.ffy-shape .ffy-width{top:50%;right:-2.35rem;transform:translateY(-50%) rotate(90deg)}.ffy-route-controls{position:absolute;z-index:26;top:348px;left:50%;display:flex;width:min(820px,72cqw);justify-content:space-between;transform:translateX(-50%);pointer-events:none}.ffy-route-controls button{display:grid;width:min(190px,20cqw);min-height:76px;place-items:center;align-content:center;gap:.15rem;pointer-events:auto;touch-action:manipulation;border:solid #fff;border-width:3px 3px 7px;border-radius:1.2rem;box-shadow:0 8px 15px rgb(8 54 69/.28);font-weight:1000}.ffy-route-controls button.area{color:#164e4b;border-bottom-color:#167c76;background:linear-gradient(180deg,#a7fff0,#45d6c5)}.ffy-route-controls button.perimeter{color:#623026;border-bottom-color:#b94f3b;background:linear-gradient(180deg,#ffd0ad,#ff816d)}.ffy-route-controls button span{font-size:clamp(.82rem,1.45vw,1.05rem);letter-spacing:.05em}.ffy-route-controls button small{font-size:.65rem;font-weight:900}.ffy-route-controls button:disabled{opacity:.46;cursor:default}.ffy-route-controls button[aria-pressed=true]{opacity:1;outline:5px solid #fff35b;outline-offset:2px}.ffy-formulas{position:absolute;z-index:28;top:446px;left:50%;display:grid;width:min(780px,calc(100% - 350px));grid-template-columns:repeat(2,minmax(0,1fr));gap:.48rem;margin:0;padding:0;transform:translateX(-50%);border:0}.ffy-formulas legend{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.ffy-formulas button{display:flex;min-width:0;min-height:60px;align-items:center;justify-content:center;gap:.45rem;padding:.45rem .65rem;touch-action:manipulation;border:3px solid #fff;border-bottom:6px solid #b77b27;border-radius:1rem;color:#173f54;background:linear-gradient(180deg,#fff8cb,#ffd76a);box-shadow:0 7px 14px rgb(14 59 69/.22);font-size:clamp(.78rem,1.45vw,1rem);font-weight:1000}.ffy-formulas button:nth-of-type(2n){border-bottom-color:#2689a1;background:linear-gradient(180deg,#e8fbff,#8ee4ef)}.ffy-formulas button svg{width:1.15rem;height:1.15rem;flex:0 0 auto}.ffy-formulas button.wrong-choice{color:#742d2d;border-color:#fff #fff #ad3434;background:linear-gradient(180deg,#ffd8d1,#ff8d80);animation:ffy-shake .28s ease}.ffy-formulas button:disabled{opacity:.65}.ffy-feedback{position:absolute;z-index:34;bottom:18px;left:50%;display:flex;width:min(620px,calc(100% - 360px));min-height:52px;align-items:center;justify-content:center;gap:.45rem;padding:.45rem .85rem;transform:translateX(-50%);border:2px solid rgb(255 255 255/.92);border-radius:999px;color:#fff;background:rgb(20 85 104/.95);box-shadow:0 7px 16px rgb(15 64 77/.24);text-align:center}.ffy-feedback p{margin:0;font-size:clamp(.72rem,1.2vw,.9rem);font-weight:950;line-height:1.2}.ffy-feedback svg{width:1.1rem;height:1.1rem;flex:0 0 auto;color:#fff069}[data-game=formula-freight-yard] .game-stage-prompt{justify-content:space-between;width:min(660px,calc(100% - 520px));min-height:76px;padding:8px 11px 8px 18px;border:3px solid #fff;border-radius:1.2rem;background:rgb(248 253 255/.97);box-shadow:0 7px 0 #3ca0b4,0 14px 24px rgb(20 74 90/.24)}[data-game=formula-freight-yard] .game-stage-prompt h2{color:#17405b;font-size:clamp(15px,1.65vw,21px);line-height:1.15;paint-order:normal;text-shadow:none;-webkit-text-stroke:0}[data-game=formula-freight-yard] .game-stage-prompt button[aria-label="Listen to the instruction"]{border:3px solid #fff!important}[data-game=formula-freight-yard] .ffy-shell :is(.ffy-hud,.ffy-blueprint,.ffy-shape,.ffy-route-controls,.ffy-formulas,.ffy-feedback,strong,span,p,small,button){text-shadow:none;-webkit-text-stroke:0}body:has([data-game=formula-freight-yard]) .how-to-panel,body:has([data-game=formula-freight-yard]) .how-to-panel *{text-shadow:none!important;-webkit-text-stroke:0!important}body:has([data-game=formula-freight-yard]) .how-to-panel button{min-width:48px;min-height:48px}.ffy-success-modal button,[data-game=formula-freight-yard] button,body:has([data-game=formula-freight-yard]) .how-to-panel button,body:has([data-game=formula-freight-yard]) .how-to-trigger{filter:none!important}.ffy-success-modal,.ffy-success-modal *{text-shadow:none!important;-webkit-text-stroke:0!important}[data-game=formula-freight-yard] .formula-freight-yard-mascot{z-index:24;left:-12px!important;bottom:62px!important;width:clamp(150px,17vw,210px)!important}.ffy-formulas button:focus-visible,.ffy-route-controls button:focus-visible{outline:5px solid #fff35b;outline-offset:3px}@keyframes ffy-shake{25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}@media (max-width:1000px){[data-game=formula-freight-yard] .game-stage-prompt{left:14px;width:calc(100% - 290px);transform:none}.ffy-console{top:118px;width:min(900px,94cqw)}.ffy-route-controls{top:357px;width:min(750px,80cqw)}.ffy-route-controls button{width:min(175px,22cqw)}.ffy-formulas{top:459px;width:min(700px,calc(100% - 250px))}.ffy-feedback{width:min(570px,calc(100% - 250px))}}@media (max-width:700px){[data-game=formula-freight-yard]{min-height:max(780px,calc(100svh - 126px))}[data-game=formula-freight-yard] .game-stage-prompt{top:9px;left:8px;width:calc(100% - 16px);min-height:72px;transform:none}[data-game=formula-freight-yard] .game-stage-prompt h2{font-size:clamp(14px,4vw,18px)}.ffy-hud{top:88px;right:8px;width:min(14rem,calc(100% - 16px))}.ffy-console{top:155px;width:min(660px,132cqw)}.ffy-blueprint{padding:.18rem .72rem .12rem .42rem}.ffy-blueprint header{gap:.18rem;font-size:clamp(.48rem,2.2vw,.68rem)}.ffy-blueprint header svg{width:.76rem;height:.76rem}.ffy-blueprint>p{font-size:clamp(.46rem,2vw,.62rem)}.ffy-shape{width:68%;height:59%;margin-top:.58rem;border-width:3px;border-radius:.42rem}.ffy-shape strong{font-size:clamp(.52rem,2.4vw,.76rem)}.ffy-shape .ffy-length,.ffy-shape .ffy-width{font-size:clamp(.46rem,2vw,.62rem)}.ffy-shape .ffy-length{top:-.84rem}.ffy-shape .ffy-width{right:-1.72rem}.ffy-route-controls{top:393px;width:calc(100% - 24px)}.ffy-route-controls button{width:min(152px,39vw);min-height:70px}.ffy-route-controls button small{font-size:.58rem}.ffy-shell.phase-formula .ffy-route-controls{top:370px;transform:translateX(-50%) scale(.82)}.ffy-formulas{top:458px;width:calc(100% - 20px);gap:.42rem}.ffy-formulas button{min-height:62px;padding:.38rem .35rem;font-size:clamp(.7rem,3.5vw,.88rem)}.ffy-formulas button svg{display:none}.ffy-feedback{width:calc(100% - 20px);min-height:56px;border-radius:1rem}.ffy-feedback p{font-size:clamp(.68rem,3.2vw,.82rem)}[data-game=formula-freight-yard] .formula-freight-yard-mascot{left:-28px!important;bottom:145px!important;width:clamp(92px,25vw,126px)!important;opacity:.94}}@media (max-width:390px){.ffy-hud{grid-template-columns:auto minmax(3.2rem,1fr) auto;padding-inline:.42rem}.ffy-console{top:170px}.ffy-route-controls{top:398px}.ffy-route-controls button{width:43vw}.ffy-formulas{top:458px}.ffy-formulas button{font-size:.7rem}}@media (max-height:820px) and (min-width:701px){.ffy-console{top:94px;width:min(830px,73cqw)}.ffy-route-controls{top:320px;width:min(700px,65cqw)}.ffy-route-controls button{min-height:64px}.ffy-formulas{top:400px}}@media (prefers-reduced-motion:reduce){.ffy-shell *,.ffy-shell :after,.ffy-shell :before{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}