#game{min-height:0}
.modal-card{max-height:calc(100dvh - 24px);overflow-y:auto}
#retry-route{font-size:10px;letter-spacing:.4px;min-height:40px}
#roll-keyhint{opacity:.5}#roll-keyhint.ready{opacity:1;color:#b6f5de}#roll-keyhint.ready kbd{border-color:#9fe1c9}
.touch-controls #touch-roll{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:1px;line-height:1}
.touch-controls #touch-roll small{font-size:9px;line-height:1.2;white-space:nowrap}
.run-objective{position:absolute;right:4%;top:92px;z-index:3;width:202px;padding:12px 15px;background:#09131bb8;border:1px solid #a9cbd52b;border-radius:5px;pointer-events:none;backdrop-filter:blur(5px)}
.run-objective small{display:block;color:#96b3be;font-size:10px;letter-spacing:2px;margin-bottom:9px}.run-objective strong{display:block;font-size:12px;font-weight:400;letter-spacing:1px}.contract-track{height:2px;background:#263b45;margin:12px 0 8px}.contract-track i{display:block;height:100%;background:#c0e7e6;width:0;transition:width .2s}.run-objective>span{font-size:10px;color:#96b3be}.run-objective>b{float:right;font-size:12px;color:#e7c78d;font-weight:500}.result-chain{font-size:11px;color:#b4cad0;margin:-16px 0 22px}
.credits-link{position:absolute;right:3%;bottom:30px;z-index:4;font-size:10px;text-decoration:none;color:#9cafb9;padding:10px}
body.playing .credits-link{display:none}
.crashed #modal{place-items:center start;background:linear-gradient(90deg,#030a12d9,transparent 70%);backdrop-filter:none}
.crashed .modal-card{margin-left:3%;background:#0a131bd9;border:1px solid #57717a44;border-radius:8px;width:min(410px,40vw);backdrop-filter:blur(5px)}
.crashed .modal-card h2{font-size:25px;line-height:1.5;letter-spacing:1px}
.crashed .modal-card>p{color:#b7c8d1}
.crashed .result-stats{gap:26px}
@media(max-width:650px){
  .run-objective{top:116px;right:4%;width:165px;padding:9px 11px}.run-objective small{font-size:8px;margin-bottom:5px}.run-objective strong{font-size:10px}.contract-track{margin:8px 0 5px}.run-objective>span{font-size:8px}.run-objective>b{font-size:9px}
  .icon-button{width:42px;height:42px}
  .top-actions{gap:3px}
  .topbar{height:58px}
  .credits-link{bottom:112px;right:3%}
  .crashed #modal{place-items:start center;background:linear-gradient(180deg,#071018c9,transparent 90%);padding-top:60px}
  .crashed .modal-card{width:90%;margin:0;padding:20px;gap:0;max-height:calc(100dvh - 80px)}
  .crashed .modal-card h2{font-size:22px;margin:14px 0 0}
  .crashed .modal-card>p{margin:10px 0 16px}
  .crashed .result-stats{margin-bottom:20px}
  .guide-card{max-height:88dvh}
}
@media(max-height:560px) and (min-width:651px){
  .run-objective{top:63px;width:178px;padding:9px 12px}.run-objective small{font-size:8px;margin-bottom:5px}.run-objective strong{font-size:10px}.contract-track{margin:8px 0 5px}
  .icon-button{width:40px;height:40px}
  .welcome{top:18%;left:4%}
  .welcome h1{font-size:29px;margin:9px 0}
  .welcome .intro-copy{font-size:10px;margin:4px 0 10px}
  .welcome .launch-buttons{display:flex;gap:14px}
  .welcome .launch-buttons .primary{width:162px;height:40px;font-size:10px}
  .welcome .welcome-controls{display:none}
  .callout{top:116px;max-width:42%;padding:8px 12px}
  .callout strong{font-size:15px}
  .callout>span{font-size:9px}
  .play-help{display:none}
  .crashed .modal-card{padding:18px;width:350px}
  .crashed .modal-card h2{font-size:22px;margin:10px 0}
  .crashed .modal-card>p{margin:4px 0 14px;font-size:11px}
  .crashed .result-stats{margin-bottom:14px}
  .crashed .modal-card .primary{padding:11px 20px}
  .credits-link{bottom:110px}
}
@media(max-height:560px) and (max-width:950px){
  .touch-controls:not(.hidden){display:flex;position:absolute;bottom:115px;left:3%;right:3%;gap:10px;justify-content:space-between;z-index:5}
  .touch-controls>div{display:flex;gap:8px}
  .touch-controls button{background:#1b2b36b8;border:1px solid #a5c8d653;border-radius:8px;min-width:54px!important;height:48px!important;touch-action:none;user-select:none}
  .touch-controls #touch-brake{margin-left:auto;font-size:11px}
}
@media(prefers-reduced-motion:reduce){button,.toast,#loading{transition:none}#loading>div{animation:none}}
