#modal[open]:has(.crash-lab){display:flex;flex-direction:column;width:min(1500px,calc(100vw - 12px));height:calc(100dvh - 12px);max-height:calc(100dvh - 12px);overflow:hidden;padding:0;border-radius:20px;border:1px solid #c5bfdc;background:#182337;color:#e7e2f5;box-shadow:0 28px 100px #17203388}
#modal:has(.crash-lab) .modal-head{flex:none;min-height:36px;margin:0;padding:4px 12px;border-bottom:1px solid #c4b1e733;background:linear-gradient(100deg,#2c2943,#1e2d40);color:#d1bedf;font-size:11px}#modal:has(.crash-lab) .modal-head button{width:29px;height:29px;min-height:29px;padding:0;border:1px solid #cbb5df55;border-radius:9px;background:#c4b0dd16;color:#e3d2ee;font-size:18px}#modal:has(.crash-lab) #modalBody{display:flex;flex:1;min-height:0;padding:0;overflow:hidden}#modal:has(.crash-lab) #instantTools,#modal:has(.crash-lab) #gameTools,#modal:has(.crash-lab) #playTools{display:none!important}
html:has(#modal[open] .crash-lab),body:has(#modal[open] .crash-lab){overflow:hidden;overscroll-behavior:none}
#modal .crash-lab{display:flex;flex-direction:column;width:100%;height:100%;min-height:0;gap:0;padding:0;margin:0;font-family:inherit}.crash-world{position:relative;flex:1;min-height:0;overflow:hidden;isolation:isolate;touch-action:none;background:#a6b9ce}.crash-world>canvas{position:absolute!important;inset:0;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;aspect-ratio:auto!important;display:block}.crash-world.has-webgl>#crashFallback{display:none}.crash-webgl{z-index:0}.crash-world:after{content:'';position:absolute;inset:0;pointer-events:none;z-index:1;box-shadow:inset 0 0 80px #10203933;background:linear-gradient(#111c3722,transparent 22%,transparent 80%,#14213d44)}
.crash-lab button{font:inherit;cursor:pointer;color:#e8e1f7;border:1px solid #c9bdd455;background:linear-gradient(145deg,#414c65e8,#27394ce8);box-shadow:inset 0 1px #ffffff25,0 3px 0 #15233555;border-radius:11px;transition:transform .15s,filter .15s,border-color .15s;min-width:0;margin:0}.crash-lab button:disabled{opacity:.4;cursor:default}.crash-lab button:active,.crash-lab button.held{transform:translateY(2px);filter:brightness(1.2);box-shadow:inset 0 2px 5px #1118}.crash-lab :focus-visible{outline:3px solid #e2c287;outline-offset:3px}@media(hover:hover){.crash-lab button:not(:disabled):hover{transform:translateY(-2px);filter:brightness(1.12);border-color:#e1cded99}}
.crash-top{position:absolute;z-index:3;left:18px;right:18px;top:14px;display:flex;justify-content:space-between;align-items:center;gap:12px;pointer-events:none}.crash-top>*{pointer-events:auto}.crash-logo{display:flex;align-items:center;gap:10px;color:#eff1ff;text-shadow:0 2px 9px #1119}.crash-logo>span{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;border:1px solid #ecd8b966;background:linear-gradient(135deg,#b99c6f,#6c6588);box-shadow:inset 0 2px #fff5,0 4px 0 #25374a;font-weight:850;font-size:16px;transform:skewY(-4deg)}.crash-logo b{font-size:17px;letter-spacing:1px}.crash-logo i{color:#ead09a;font-size:11px;font-style:normal}.crash-logo small{display:block;font-size:8px;margin-top:4px;letter-spacing:.5px;color:#e3e7ef}.crash-top-buttons{display:flex;gap:7px}.crash-top-buttons button{padding:8px 12px;min-height:37px;font-size:11px;backdrop-filter:blur(12px)}.crash-top-buttons button:last-child{min-width:37px;font-size:17px;padding:5px}
.crash-mission{position:absolute;z-index:3;top:77px;left:18px;width:355px;max-width:calc(100% - 200px);display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:12px 14px;border:1px solid #e3d8f044;border-radius:15px;background:linear-gradient(135deg,#27344ee8,#1c3045cf);backdrop-filter:blur(12px);box-shadow:0 6px 25px #14223b22;color:#f0e9fc;pointer-events:none}.crash-mission small{display:block;font-size:8px;color:#c0b1d5;letter-spacing:.6px;margin-bottom:5px}.crash-mission b{display:block;font-size:11px;line-height:1.6;font-weight:550}.crash-mission strong{font-size:11px;color:#ebd19c;font-variant-numeric:tabular-nums;align-self:start;white-space:nowrap}.crash-mission progress{grid-column:1/-1;width:100%;height:4px;appearance:none;background:#121f36;border:0;border-radius:7px;overflow:hidden}.crash-lab progress::-webkit-progress-bar{background:#172238;border-radius:6px}.crash-lab progress::-webkit-progress-value{background:linear-gradient(90deg,#ab94d2,#e6ce99);border-radius:6px;transition:width .1s}.crash-lab progress::-moz-progress-bar{background:#baa1d9}
.crash-telemetry{position:absolute;z-index:3;right:18px;top:77px;width:145px;border:1px solid #d2cce84d;border-radius:18px;padding:12px;background:linear-gradient(150deg,#293750db,#192d42d9);backdrop-filter:blur(12px);box-shadow:0 8px 20px #14223b22;pointer-events:none}.crash-speed{position:relative;text-align:center;padding-bottom:12px;border-bottom:1px solid #e0d8ee33}.crash-speed strong{font-size:46px;line-height:1;font-weight:750;color:#f7f1ff;letter-spacing:-2px;font-variant-numeric:tabular-nums}.crash-speed span{display:block;margin-top:4px;font-size:7px;letter-spacing:1px;color:#bfb9d2}.crash-speed i{position:absolute;right:0;bottom:13px;font-size:12px;font-style:normal;background:#c9b6e126;border:1px solid #dcc7e13a;padding:4px 6px;border-radius:6px;color:#e4d19f}.crash-condition{margin-top:10px}.crash-condition label{display:flex;justify-content:space-between;align-items:center;font-size:7px;letter-spacing:.6px;color:#c0b6d2;margin-top:8px}.crash-condition label b{font-size:9px;font-weight:600;color:#e4dced}.crash-condition progress{display:block;width:100%;height:5px;border:0;appearance:none;border-radius:5px;overflow:hidden;margin-top:5px}.crash-condition #crashHealthBar::-webkit-progress-value{background:linear-gradient(90deg,#76ab9a,#a6dfb5)}.crash-condition #crashEnergyBar::-webkit-progress-value{background:linear-gradient(90deg,#9b8ed2,#d6b8ea)}
.crash-map{position:absolute;z-index:3;left:18px;bottom:142px;padding:5px;border-radius:15px;border:1px solid #c1c5db66;background:#1f3049b9;backdrop-filter:blur(8px);width:126px;pointer-events:none;box-shadow:0 6px 20px #11253a33}.crash-map canvas{display:block;width:114px;height:114px;max-width:100%;border-radius:10px;opacity:.86}.crash-map small{display:block;font-size:7px;text-align:center;color:#d3cadf;margin:5px 0 2px}.crash-records{position:absolute;z-index:3;left:18px;bottom:81px;display:flex;gap:6px;pointer-events:none}.crash-records>div{padding:8px 12px;border-radius:10px;border:1px solid #d3cadb33;background:#22334ce0;min-width:76px;backdrop-filter:blur(8px)}.crash-records small{display:block;font-size:6px;letter-spacing:.8px;color:#bdb1cd}.crash-records b{display:block;margin-top:4px;font-size:16px;color:#e5d4ad;font-variant-numeric:tabular-nums}.crash-status{position:absolute;z-index:3;bottom:114px;left:50%;transform:translateX(-50%);max-width:48%;width:400px;padding:8px 12px;border:1px solid #d5c7e23a;border-radius:10px;background:#29334bbd;backdrop-filter:blur(10px);text-align:center;color:#e7dfef;font-size:10px;line-height:1.5;pointer-events:none;box-shadow:0 4px 18px #21314833}
.crash-utilities{position:absolute;z-index:4;right:18px;bottom:97px;display:flex;gap:6px}.crash-utilities button{min-height:35px;padding:7px 10px;font-size:11px;backdrop-filter:blur(10px)}.crash-utilities button.active{color:#f3ca7c;border-color:#f1c16b88}.crash-touch{position:absolute;z-index:4;left:18px;right:18px;bottom:18px;display:flex;justify-content:space-between;gap:15px;pointer-events:none}.crash-touch>div{display:flex;gap:9px;pointer-events:auto}.crash-touch button{width:58px;height:55px;min-height:55px;padding:0;font-size:26px;touch-action:none;user-select:none;-webkit-user-select:none;backdrop-filter:blur(10px);border-radius:15px}.crash-touch .crash-gas{color:#e8ffe9;border-color:#b9dfb166;background:linear-gradient(145deg,#69947ce0,#3d685be8)}.crash-touch .crash-boost{font-size:17px;color:#ede1ff;border-color:#d7c2f577;background:linear-gradient(145deg,#a189bded,#665987e8)}#modal .crash-lab>.crash-instruction{flex:none;display:flex;justify-content:space-between;gap:10px;margin:0;padding:7px 16px;width:100%;max-width:none;border:0;border-top:1px solid #d6c4ec22;background:#1e2c42;color:#a8a0bc;line-height:1.4;font-size:8px;border-radius:0;box-shadow:none}
.crash-paused,.crash-garage{position:absolute;inset:0;z-index:10;background:#15263bd4;backdrop-filter:blur(12px)}.crash-paused[hidden],.crash-garage[hidden]{display:none!important}.crash-paused{display:grid;place-items:center}.crash-paused>div{display:grid;gap:12px;width:min(320px,90%);padding:28px;border:1px solid #c9badb55;border-radius:22px;text-align:center;background:linear-gradient(135deg,#40405be8,#26394e)}.crash-paused h3{font-size:23px;color:#e7def2;margin:0 0 6px}.crash-paused>div>span{font-size:40px;color:#d0b5e1}.crash-paused button{padding:12px;color:#f1e9f8;font-size:13px}.crash-garage{overflow:auto;padding:24px;background:linear-gradient(150deg,#242d43f7,#37415df5);color:#e8e0f2}.crash-garage-head{display:flex;justify-content:space-between;align-items:center;gap:20px;max-width:1000px;margin:auto}.crash-garage-head small{font-size:8px;letter-spacing:2px;color:#c4afda}.crash-garage-head h2{font-size:30px;letter-spacing:-.6px;margin:5px 0;color:#f0e7f6}.crash-garage-head button{width:38px;height:38px;flex:none;font-size:19px}.crash-garage-note{max-width:1000px;margin:10px auto 18px;color:#b7acc9;font-size:11px;line-height:1.6}.crash-garage h3{max-width:1000px;margin:22px auto 10px;font-size:14px;letter-spacing:.2px;color:#dfd2e9}.crash-cars{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;max-width:1000px;margin:auto}.crash-cars label{position:relative;min-width:0}.crash-cars input{position:absolute;opacity:0;width:1px;height:1px}.crash-cars label>span{display:flex;flex-direction:column;padding:14px;border:1px solid #a89bb540;border-radius:16px;background:linear-gradient(135deg,#b4aacd19,#132a4022);height:100%;transition:transform .18s,background .18s;cursor:pointer;box-shadow:inset 0 1px #ffffff11,0 4px 0 #14233844}.crash-cars input:checked+span{border-color:#d6b789;background:linear-gradient(140deg,#bda4c33d,#a38c6a22);box-shadow:inset 0 1px #ffffff33,0 4px 0 #172b40}.crash-cars input:focus-visible+span{outline:3px solid #d7b883;outline-offset:3px}.crash-cars i{font-style:normal;display:block;height:80px;filter:drop-shadow(0 10px 5px #1118)}.crash-cars svg{width:100%;height:100%}.crash-cars b{font-size:17px;color:#ede3f6}.crash-cars small{margin-top:5px;font-size:9px;color:#beaeca}.crash-cars em{font-style:normal;font-size:9px;color:#d5bd98;line-height:1.6;margin-top:9px}.crash-map-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;max-width:1000px;margin:auto}.crash-map-choices button{display:grid;gap:8px;justify-items:start;padding:18px;text-align:left;background:linear-gradient(135deg,#3d5266,#283650);border-radius:14px}.crash-map-choices button:nth-child(2){background:linear-gradient(135deg,#766652,#3f4156)}.crash-map-choices button:nth-child(3){background:linear-gradient(135deg,#5b497b,#343b60)}.crash-map-choices b{font-size:15px;color:#e7dcf2}.crash-map-choices span{font-size:10px;color:#c9bfcd;line-height:1.6}.crash-map-choices i{font-size:10px;font-style:normal;color:#e1c591}.crash-missions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-width:1000px;margin:auto}.crash-missions button{display:flex;gap:12px;align-items:center;padding:13px;text-align:left;border-radius:13px}.crash-missions button>b{display:grid;place-items:center;width:34px;height:34px;border:1px solid #bca6d055;border-radius:10px;flex:none;font-size:16px;color:#d8bc8f;background:#c7a3db19}.crash-missions button>span{font-size:12px;color:#ded0e9;line-height:1.5}.crash-missions small{display:block;color:#aa9dbb;font-size:9px;margin-top:3px}.crash-result{padding:24px;border:1px solid #d8c7e7;border-radius:20px;background:linear-gradient(140deg,#fff8e6,#eee8f8);text-align:center;color:#9575aa}.crash-result small{font-size:9px;letter-spacing:1px}.crash-result h2{font-size:30px;color:#8a689f}.crash-result p{font-size:13px}.crash-result>div{display:flex;justify-content:center;gap:24px;margin:20px 0}.crash-result>div>b{font-size:23px;color:#9b7c4c}.crash-result>div small{display:block;font-size:9px;margin-top:6px;color:#aa8bb8;letter-spacing:0}.crash-result button{margin:5px;padding:12px 18px}
.crash-cover{position:relative;background:radial-gradient(ellipse at 50% 0,#8b749d,#283a53 80%)!important;overflow:hidden}.crash-cover>div{position:absolute;inset:30px 25px 38px;transform:perspective(400px) rotateY(-12deg) rotateX(8deg);filter:drop-shadow(0 14px 8px #1119)}.crash-cover svg{width:100%;height:100%}.crash-cover>i{position:absolute;left:15px;bottom:27px;font-size:18px;font-style:normal;font-weight:800;letter-spacing:2px;color:#f0e9f5}.crash-cover>i>b{color:#e6c48d}.crash-cover>small{position:absolute;bottom:12px;left:15px;font-size:6px;letter-spacing:1px;color:#d0c4da}
@media(max-width:650px){#modal[open]:has(.crash-lab){width:calc(100vw - 4px);height:calc(100dvh - 4px);max-height:calc(100dvh - 4px);border-radius:13px}#modal:has(.crash-lab) .modal-head{font-size:9px;padding:3px 9px;min-height:32px}.crash-top{top:10px;left:10px;right:10px;gap:7px}.crash-logo{gap:7px}.crash-logo>span{width:30px;height:30px;font-size:12px;border-radius:9px}.crash-logo b{font-size:12px;letter-spacing:.5px}.crash-logo small{font-size:6px;letter-spacing:0;margin-top:3px}.crash-top-buttons{gap:5px}.crash-top-buttons button{padding:5px 8px;min-height:30px;font-size:12px}.crash-top-buttons button span{display:none}.crash-top-buttons button:last-child{min-width:30px}.crash-mission{left:10px;right:10px;top:58px;max-width:none;width:auto;padding:9px 10px;border-radius:12px;gap:6px}.crash-mission small{font-size:6px;margin-bottom:3px}.crash-mission b{font-size:9px;line-height:1.5}.crash-mission strong{font-size:8px}.crash-telemetry{right:10px;top:150px;width:100px;padding:9px;border-radius:14px}.crash-speed{padding-bottom:8px}.crash-speed strong{font-size:31px}.crash-speed span{font-size:5px;letter-spacing:.8px}.crash-speed i{font-size:8px;padding:3px;bottom:8px}.crash-condition{margin-top:7px}.crash-condition label{font-size:5px;margin-top:6px}.crash-condition label b{font-size:7px}.crash-condition progress{height:4px}.crash-map{left:10px;bottom:123px;width:84px;padding:4px;border-radius:11px}.crash-map canvas{width:74px;height:74px;border-radius:7px}.crash-map small{font-size:5px}.crash-records{left:10px;top:150px;bottom:auto;flex-direction:column;gap:5px}.crash-records>div{min-width:71px;padding:7px 9px;border-radius:8px}.crash-records small{font-size:5px;letter-spacing:.5px}.crash-records b{font-size:13px;margin-top:3px}.crash-status{bottom:218px;width:calc(100% - 24px);max-width:none;padding:6px 8px;font-size:8px;line-height:1.4}.crash-utilities{bottom:122px;right:10px;gap:4px;max-width:calc(100% - 115px);flex-wrap:wrap;justify-content:end}.crash-utilities button{padding:7px;min-height:30px;font-size:12px}.crash-utilities button span{font-size:7px}.crash-touch{left:10px;right:10px;bottom:24px;gap:9px}.crash-touch>div{gap:5px}.crash-touch button{width:40px;height:49px;min-height:49px;border-radius:12px;font-size:23px}.crash-touch .crash-boost{font-size:12px}.crash-cars{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.crash-garage{padding:16px}.crash-garage-head h2{font-size:23px}.crash-cars label>span{padding:11px;border-radius:13px}.crash-cars i{height:65px}.crash-cars b{font-size:14px}.crash-cars small,.crash-cars em{font-size:8px}.crash-map-choices{grid-template-columns:1fr;gap:8px}.crash-map-choices button{padding:12px;gap:5px}.crash-map-choices b{font-size:13px}.crash-missions{grid-template-columns:1fr}.crash-garage-note{font-size:9px}#modal .crash-lab>.crash-instruction{justify-content:center;padding:5px 8px;font-size:6px}#modal .crash-instruction>span:last-child{display:none}}
@media(max-height:470px){#modal[open]:has(.crash-lab){height:calc(100dvh - 4px);max-height:calc(100dvh - 4px)}#modal:has(.crash-lab) .modal-head{min-height:28px;padding:2px 9px}#modal:has(.crash-lab) .modal-head button{width:24px;height:24px;min-height:24px;font-size:14px}.crash-top{top:8px;left:10px;right:10px}.crash-logo>span{width:27px;height:27px;font-size:11px}.crash-logo b{font-size:12px}.crash-logo small{font-size:6px}.crash-top-buttons button{min-height:28px;padding:5px 8px;font-size:9px}.crash-top-buttons button span{display:none}.crash-top-buttons button:last-child{min-width:28px}.crash-mission{top:49px;left:10px;width:275px;max-width:calc(100% - 145px);padding:7px 9px;border-radius:10px;gap:4px}.crash-mission small{font-size:6px;margin-bottom:2px}.crash-mission b{font-size:8px;line-height:1.4}.crash-mission strong{font-size:8px}.crash-telemetry{top:48px;right:10px;width:92px;padding:7px;border-radius:12px}.crash-speed strong{font-size:27px}.crash-speed span{font-size:5px}.crash-speed{padding-bottom:5px}.crash-speed i{font-size:8px;bottom:5px;padding:2px}.crash-condition{margin-top:4px}.crash-condition label{font-size:5px;margin-top:4px}.crash-condition label b{font-size:6px}.crash-condition progress{height:3px;margin-top:3px}.crash-records,.crash-status{display:none}.crash-map{left:10px;bottom:66px;width:65px;padding:3px;border-radius:9px}.crash-map canvas{width:57px;height:57px}.crash-map small{font-size:4px;margin:3px 0 1px}.crash-utilities{right:10px;bottom:67px;gap:4px;max-width:none}.crash-utilities button{padding:5px 7px;min-height:27px;font-size:9px}.crash-utilities button span{font-size:7px}.crash-touch{left:10px;right:10px;bottom:10px}.crash-touch>div{gap:5px}.crash-touch button{width:42px;height:40px;min-height:40px;border-radius:10px;font-size:21px}.crash-touch .crash-boost{font-size:12px}#modal .crash-lab>.crash-instruction{display:none}.crash-garage{padding:15px}.crash-garage-head h2{font-size:20px}.crash-cars i{height:55px}}
@media(prefers-reduced-motion:reduce){.crash-lab *{transition:none!important;scroll-behavior:auto!important}}

.crash-top-buttons button.active{border-color:#e8c99899;color:#f4d7a4;background:linear-gradient(145deg,#74617d,#4c4561)}
