#car-crash{padding:0;overflow:hidden;background:#101c29;color:#edf3f8;border-radius:18px;border:1px solid #2a4051;--cc-cyan:#74e8d7}
#car-crash[hidden]{display:none}
#car-crash .cc-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;background:#142333;flex-wrap:wrap}
#car-crash .cc-head h2{font-size:24px;margin:0;color:#edf3f8}
#car-crash .cc-head small{color:var(--cc-cyan);font-size:11px;letter-spacing:2px}
#car-crash button{min-height:44px;color:#eef4fa;background:#233c50;border:1px solid #41617a;border-radius:10px;padding:9px 14px;font:inherit;font-weight:700;cursor:pointer}
#car-crash button:hover{background:#33536b}
#car-crash button:disabled{opacity:.5;cursor:default}
#car-crash .cc-top-actions{display:flex;gap:8px}
#car-crash .cc-stage{position:relative;height:clamp(330px,57vh,580px);isolation:isolate;background:#55734c}
#car-crash canvas{display:block;width:100%;height:100%;touch-action:none}
#car-crash .cc-hud{position:absolute;top:12px;left:12px;right:12px;display:flex;justify-content:space-between;gap:8px;pointer-events:none}
#car-crash .cc-hud span{background:#112230e8;padding:8px 12px;border-radius:9px;font-size:13px;color:#eaf2f8;box-shadow:0 2px 8px #0003}
#car-crash .cc-hud b{color:#74e8d7}
#car-crash .cc-bubble{position:absolute;left:50%;top:50%;bottom:auto;transform:translate(-50%,-100%);background:#fff3d6;color:#23303b;border-radius:15px;padding:10px 16px;font-size:14px;font-weight:700;max-width:min(260px,calc(100% - 24px));width:max-content;pointer-events:none;box-shadow:0 3px 12px #0003}
#car-crash .cc-bubble:empty{display:none}
#car-crash .cc-overlay{position:absolute;inset:0;background:#07131ec9;display:grid;place-items:center;padding:18px;overflow:auto;z-index:3}
#car-crash .cc-overlay[hidden]{display:none}
#car-crash .cc-card{max-width:390px;text-align:center;background:#152b3b;padding:24px;border-radius:18px;border:1px solid #3c5e73}
#car-crash .cc-card h3{font-size:32px;color:#fff0bd;margin:4px 0 12px}
#car-crash .cc-card p{color:#d3e1ec;line-height:1.5;margin:10px 0 18px}
#car-crash .cc-card img{height:68px;max-width:90px;object-fit:contain;image-rendering:pixelated}
#car-crash .cc-card .cc-start{background:#f4cf69;color:#1d2c39;border-color:#f4cf69;width:100%}
#car-crash .cc-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;flex-wrap:wrap}
#car-crash .cc-controls p{font-size:13px;margin:0;color:#bed1df;flex:1;min-width:140px}
#car-crash .cc-powers{display:flex;gap:8px;flex-wrap:wrap}
#car-crash .cc-powers button{min-width:86px}
#car-crash .cc-powers .cc-boost{background:#af4b22;border-color:#e59155}
#car-crash .cc-powers .cc-jump{background:#345983;border-color:#7ba4d6}
#car-crash .cc-driver{color:#74e8d7}
#car-crash:fullscreen{border-radius:0;border:0;display:flex;flex-direction:column;width:100%;height:100dvh;overflow:auto}
#car-crash:fullscreen .cc-stage{flex:1;height:auto;min-height:180px}
#car-crash:fullscreen .cc-head,#car-crash:fullscreen .cc-controls{flex-shrink:0}
@media(max-width:600px){#car-crash .cc-head{padding:10px 12px}#car-crash .cc-head h2{font-size:20px}#car-crash .cc-stage{height:390px}#car-crash .cc-hud{left:8px;right:8px;top:8px}#car-crash .cc-hud span{font-size:12px;padding:7px 8px}#car-crash .cc-controls{padding:10px;gap:8px}#car-crash .cc-powers{width:100%}#car-crash .cc-powers button{flex:1;min-width:70px}#car-crash .cc-card{padding:18px}}
@media(orientation:landscape) and (max-height:600px){#car-crash .cc-stage{height:300px}#car-crash:fullscreen .cc-head{padding:6px 12px}#car-crash:fullscreen .cc-controls{padding:6px 12px}#car-crash:fullscreen .cc-powers{width:auto}#car-crash .cc-card h3{font-size:24px}#car-crash .cc-card{padding:12px}#car-crash .cc-card img{height:40px}}

#car-crash .cc-damage{position:absolute;top:57px;left:12px;max-width:calc(100% - 24px);padding:6px 9px;border-radius:8px;background:#112230df;pointer-events:none;font-size:12px;color:#c8eddf}
#car-crash .cc-damage small{display:block;font-size:10px;margin-top:3px;color:#e7e4d1}
#car-crash.cc-full-play{position:fixed;inset:0;z-index:10000;display:flex;flex-direction:column;width:100vw;height:100dvh;border:0;border-radius:0;overflow:hidden}
body.cc-page-open{overflow:hidden}
#car-crash.cc-full-play .cc-stage{flex:1;min-height:140px;height:auto}
#car-crash.cc-full-play .cc-head,#car-crash.cc-full-play .cc-controls{flex-shrink:0}
#car-crash .cc-card{width:min(740px,100%);max-width:740px;box-sizing:border-box;max-height:100%;overflow:auto}
#car-crash .cc-card select{max-width:100%;padding:8px;border-radius:7px;background:#233c50;color:#edf9ff}
#car-crash .cc-card>button{margin:5px;min-height:44px}
#car-crash .cc-garage{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin:12px 0}
#car-crash .cc-garage button{display:flex;flex-direction:column;align-items:center;gap:5px;padding:7px 3px;min-width:0;font-size:12px}
#car-crash .cc-garage [aria-pressed=true]{border-color:#a6eac5;background:#284c47}
#car-crash .cc-garage canvas{width:78px;max-width:100%;height:85px;touch-action:auto}
#car-crash .cc-garage small{font-size:10px;min-height:27px}
#car-crash .cc-audio{display:flex;justify-content:center;gap:16px;flex-wrap:wrap;margin:10px 0}
#car-crash .cc-audio label{display:flex;align-items:center;gap:6px;font-size:12px}
#car-crash .cc-jump-warning{animation:cc-jump-call .4s alternate infinite;outline:3px solid #fff1a6}
#car-crash .cc-damage strong{font-size:11px;display:inline-block;max-width:45vw}
#car-crash .cc-hud i{font-style:normal}
@keyframes cc-jump-call{to{background:#b88b36;box-shadow:0 0 18px #ffdf70}}
@media(max-width:600px){#car-crash .cc-garage{grid-template-columns:repeat(3,minmax(0,1fr))}#car-crash .cc-top-actions{gap:4px}#car-crash .cc-head button{padding:5px 8px;font-size:11px}#car-crash .cc-hud{flex-wrap:wrap}#car-crash .cc-damage{top:75px}}
@media(orientation:landscape) and (max-height:600px){#car-crash.cc-full-play .cc-head{padding:4px 10px}#car-crash.cc-full-play .cc-controls{padding:4px 10px}#car-crash.cc-full-play .cc-powers{width:auto}#car-crash .cc-garage canvas{height:65px}#car-crash .cc-garage small{display:none}}
@media(prefers-reduced-motion:reduce){#car-crash .cc-jump-warning{animation:none}}
/* Single-card selectors and in-play audio controls. */
#car-crash .cc-menu-tabs{display:flex;justify-content:center;gap:8px}#car-crash .cc-menu-tabs [aria-pressed=true]{color:#173033;background:#a5e6cd}#car-crash .cc-selector{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:10px;align-items:center;margin:12px 0}#car-crash .cc-selector>button{font-size:30px;padding:4px}#car-crash .cc-selector h4{font-size:25px;color:#fff1bb;margin:10px 0}#car-crash .cc-selector p{margin:6px 0;font-size:13px}#car-crash .cc-selector small{color:#b9d5d6;font-size:11px}#car-crash .cc-car-selector canvas{width:180px;height:150px;max-width:100%;margin:auto}#car-crash .cc-card{max-width:600px}#car-crash .cc-menu-note{font-size:11px;margin-bottom:0}#car-crash .cc-buy-confirm:not(:empty){position:absolute;inset:0;z-index:5;background:#0e202ff5;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:25px;border-radius:15px}#car-crash .cc-buy-confirm button{margin:5px;min-width:180px}#car-crash .cc-buy-confirm h4{font-size:27px;color:#fff0bd;margin:10px}#car-crash .cc-card{position:relative}#car-crash .cc-music-panel{width:100%;display:flex;gap:12px;align-items:center;justify-content:flex-end;flex-wrap:wrap}#car-crash .cc-music-panel label{display:flex;gap:6px;align-items:center;font-size:12px}#car-crash .cc-music-panel input{width:100px}#car-crash [data-repair]{background:#285d4a;border-color:#8bcbae}
@media(max-width:600px){#car-crash .cc-powers button{min-width:60px;font-size:12px;padding:7px}#car-crash .cc-controls p{font-size:11px}#car-crash .cc-selector h4{font-size:22px}}
@media(orientation:landscape) and (max-height:600px){#car-crash .cc-card>h3{font-size:22px}#car-crash .cc-card>p{margin:6px}#car-crash .cc-selector{margin:6px 0}#car-crash .cc-car-selector canvas{height:85px;width:105px}#car-crash .cc-menu-note{display:none}#car-crash .cc-selector h4{margin:4px}}
#car-crash .cc-music-panel[hidden]{display:none!important}
#car-crash .cc-wrench{display:flex;align-items:center;gap:9px;padding:5px 10px 5px 5px;border:1px solid #618e83;border-radius:12px;background:#183e3b;min-width:185px;max-width:245px;flex:1}#car-crash .cc-wrench button{position:relative;width:48px;height:48px;min-height:48px;flex-shrink:0;padding:7px;border-radius:50%;background:#2c5756;border:2px dashed #98d5c6;touch-action:none}#car-crash .cc-wrench svg{width:100%;height:100%;transition:transform .16s ease-out;filter:drop-shadow(0 2px 2px #072c36)}#car-crash .cc-wrench strong{display:block;color:#e0ffe4;font-size:12px}#car-crash .cc-wrench small{display:block;color:#b5d8d3;font-size:10px;margin-top:2px}#car-crash .cc-wrench-done{border-color:#d1ec8f;background:#294a35}#car-crash .cc-wrench-done button{opacity:.75}#car-crash .cc-wrench[hidden]{display:none!important}
@media(max-width:600px){#car-crash .cc-wrench{max-width:none}#car-crash .cc-controls>[data-choose]{font-size:11px;padding:7px}}
@media(orientation:landscape) and (max-height:600px){#car-crash .cc-wrench{min-width:160px;max-width:200px;padding:3px 6px 3px 3px;gap:6px}#car-crash .cc-wrench button{height:42px;width:42px;min-height:42px}#car-crash .cc-controls>p{min-width:100px;flex:0 1 120px;font-size:11px}#car-crash .cc-controls>p small{display:none}#car-crash .cc-powers button{min-width:65px;font-size:12px;padding:6px}#car-crash .cc-controls>[data-choose]{font-size:11px;padding:6px}}
@media(prefers-reduced-motion:reduce){#car-crash .cc-wrench svg{transition:none}}

.cc-lock-badge{display:flex;flex-direction:column;align-items:center;gap:5px;color:#ffe9a8;padding:10px;margin:6px auto 12px;border:2px solid #d5b571;border-radius:12px;background:#19283ae8;max-width:260px}.cc-lock-badge>span{font-size:56px;line-height:1.1;filter:drop-shadow(0 3px 3px #0008)}.cc-lock-badge>strong{font-size:17px;letter-spacing:2px}.cc-lock-badge>small{font-size:12px;color:#e5d8bc}.cc-car-lock{padding:8px;margin-bottom:4px}.cc-car-lock>span{font-size:40px}.cc-car-lock>strong{font-size:13px}@media(max-height:600px) and (orientation:landscape){.cc-lock-badge{padding:6px;gap:2px;margin:4px auto}.cc-lock-badge>span{font-size:34px}.cc-lock-badge>strong{font-size:12px}.cc-lock-badge>small{font-size:10px}}

.cc-car-ready{border-color:#9cdea7;color:#c8f1af;background:#173832}.cc-car-ready>span{font-size:40px}.cc-car-ready>small{color:#dbefca}

.cc-victory-reward{padding:16px;border:2px solid #d6fa72;border-radius:12px;color:#e9ffb1;background:#203f3a;font-size:20px}.cc-victory-reward strong{font-size:32px}
.cc-stage.cc-next-wave:after{content:'GO, GO, GO!  NEXT BOSS AHEAD';position:absolute;left:5%;right:5%;top:35%;padding:18px;background:#173b36dd;border-block:3px solid #ffe38b;color:#fff0a8;text-align:center;font-size:clamp(18px,4vw,42px);font-weight:900;pointer-events:none;animation:cc-wave-in .35s ease-out}@keyframes cc-wave-in{from{translate:0 -30px;opacity:0}to{translate:0 0;opacity:1}}


.cc-special-weapons{display:flex;gap:3px;align-items:stretch;max-width:220px}.cc-special-weapons[hidden]{display:none}.cc-special-weapons>button{min-width:30px;padding:4px 6px}.cc-special-weapons [data-special-fire]{display:grid;grid-template-columns:24px 1fr;align-items:center;max-width:156px;min-width:110px}.cc-special-weapons small{font-size:10px;line-height:1.1;white-space:normal}.cc-special-weapons [data-special-count]{grid-column:1/-1;font-size:11px}.cc-controls{flex-wrap:wrap}.cc-dashboard .cc-special-weapons{display:none}@media(max-height:450px){.cc-special-weapons [data-special-fire]{min-width:86px;max-width:110px}.cc-special-weapons small{font-size:9px}.cc-special-weapons>button{min-height:36px}}

/* The full car fits the existing artwork area at every landscape size. */
.cc-car-artwork{position:relative;min-height:0;overflow:hidden}
#car-crash.cc-dashboard .cc-car-artwork .cc-car-showcase{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;padding:2px 3% 8px;box-sizing:border-box}
#car-crash.cc-dashboard .cc-car-artwork .cc-showcase-echo{position:absolute;width:19%;height:27%;max-width:none;object-fit:contain;left:39%;bottom:2%;filter:drop-shadow(0 3px 2px #10232acc)}
.cc-car-unavailable{margin:auto;text-align:center;font-size:12px}

[data-special-icon] img{width:26px;height:26px;object-fit:contain;image-rendering:pixelated;vertical-align:middle}

/* Keep the complete control dock within short landscape screens. */
@media(orientation:landscape) and (max-height:360px){
 #car-crash.cc-full-play .cc-stage{min-height:100px}
 #car-crash.cc-full-play .cc-controls{gap:5px;padding:3px 8px}
 #car-crash.cc-full-play .cc-controls>p{display:none}
 #car-crash.cc-full-play .cc-controls>.cc-wrench{min-width:145px;max-width:160px}
}

#car-crash .cc-bubble::after{content:'';position:absolute;left:var(--cc-tail-x,50%);bottom:-16px;transform:translateX(-50%);border:8px solid transparent;border-top-color:#fff3d6}
#car-crash .cc-bubble.cc-bubble-below{transform:translateX(-50%)}
#car-crash .cc-bubble.cc-bubble-below::after{bottom:auto;top:-16px;border-top-color:transparent;border-bottom-color:#fff3d6}
