.tm47{--navy:#03102a;--blue:#1d78db;--gold:#f5c84a;--red:#d92b39;box-sizing:border-box;width:100%;max-width:1040px;margin:20px auto;color:#fff;font-family:Arial,Helvetica,sans-serif}
.tm47 *{box-sizing:border-box}
.tm47-stage{position:relative;overflow:hidden;border:5px solid var(--gold);border-radius:18px;background:#06132a;box-shadow:0 24px 70px #000b,0 0 0 1px #fff2 inset}
.tm47-canvas{display:block;width:100%;height:auto;aspect-ratio:48/31;touch-action:none}
.tm47-topbar{position:absolute;inset:10px 13px auto;z-index:4;display:grid;grid-template-columns:1fr auto 1fr;align-items:start;pointer-events:none}
.tm47-brand{justify-self:start;padding:8px 12px;border:2px solid var(--gold);border-radius:9px;background:#030712e8;box-shadow:0 4px 14px #000a}
.tm47-brand b{display:block;color:var(--gold);font:18px/1 Impact,"Arial Black",sans-serif;letter-spacing:1.2px}
.tm47-brand span{display:block;margin-top:3px;color:#fff;font-size:7px;font-weight:900;letter-spacing:2.2px}
.tm47-region{padding:9px 18px;border:2px solid var(--gold);border-radius:9px;background:#030712e8;color:#fff;font-size:10px;font-weight:900;letter-spacing:1.7px}
.tm47-sound{justify-self:end;pointer-events:auto;padding:8px 10px;border:2px solid var(--gold);border-radius:9px;background:#030712e8;color:#fff;cursor:pointer}
.tm47-card{position:absolute;left:50%;top:51%;z-index:5;width:min(760px,94%);padding:22px 30px;text-align:center;transform:translate(-50%,-50%);border:3px solid var(--gold);border-radius:17px;background:linear-gradient(145deg,#07122af2,#113c68f2);backdrop-filter:blur(12px);box-shadow:0 26px 85px #000e,0 0 44px #1c6edf33 inset}
.tm47 [hidden]{display:none!important}
.tm47-stars{color:var(--gold);font-size:20px;letter-spacing:12px}
.tm47-card h2{margin:7px 0;color:#fff;font:44px/.92 Impact,"Arial Black",sans-serif;letter-spacing:1px;text-shadow:3px 3px 0 #174f9b}
.tm47-card h2 span{display:block;margin-top:10px;color:var(--gold);font-size:20px;letter-spacing:3.5px;text-shadow:none}
.tm47-card p{margin:11px auto;max-width:620px;color:#dce9ff;font:14px/1.4 Georgia,serif}
.tm47-card button{display:block;width:min(360px,100%);margin:10px auto;padding:13px 17px;border:0;border-radius:9px;color:#fff;font-size:12px;font-weight:900;letter-spacing:1.3px;cursor:pointer}
.tm47-route-title{margin:10px 0 7px;color:#f7d259;font-size:9px;font-weight:900;letter-spacing:2px}
.tm47-routes{display:grid;grid-template-columns:1fr 1fr;gap:7px;max-width:650px;margin:0 auto 9px}
.tm47-routes button{width:100%;min-height:50px;margin:0;padding:8px 10px;text-align:left;border:2px solid #4b72a1;background:linear-gradient(145deg,#102d55,#091a34);box-shadow:inset 0 -3px 0 #0005;letter-spacing:.5px}
.tm47-routes button b{display:block;color:#fff;font:16px/1 Impact,"Arial Black",sans-serif;letter-spacing:1px}
.tm47-routes button span{display:block;margin-top:4px;color:#a9bad2;font-size:7px;font-weight:800;letter-spacing:.4px}
.tm47-routes button.is-selected{border-color:#ffdc62;background:linear-gradient(145deg,#c93240,#7f111d);box-shadow:0 0 18px #f2c84b55,inset 0 -3px 0 #0005}
.tm47-routes button.is-selected span{color:#fff2be}
.tm47-how{margin:8px auto;color:#b9cbe3;font-size:8px;font-weight:800;letter-spacing:.6px}
.tm47-how b{color:#fff}.tm47-how span{padding:0 5px;color:#efca4e}
.tm47-primary{background:linear-gradient(145deg,#e13947,#9c111f);box-shadow:4px 4px 0 var(--gold)}
.tm47-secondary{background:linear-gradient(145deg,#2677ca,#0c3e79);box-shadow:4px 4px 0 #dceaff}
.tm47-card small{display:block;margin-top:18px;color:#97afd0;font-size:8px;letter-spacing:1px}
.tm47-final-score{margin:8px auto 18px;color:var(--gold);font:68px/.9 Impact,"Arial Black",sans-serif;text-shadow:3px 3px 0 #174b9c}
.tm47-controls{display:grid;grid-template-columns:1fr 1.15fr 1.15fr 1fr;gap:9px;margin-top:12px}
.tm47-controls button{min-height:60px;border:3px solid;border-radius:11px;color:#fff;font-weight:900;cursor:pointer;touch-action:manipulation;box-shadow:inset 0 -5px 0 #0006}
.tm47-controls button b{display:block;font-size:17px}
.tm47-controls button span{display:block;margin-top:4px;font-size:7px;letter-spacing:1px}
.tm47-steer{border-color:#8fa9c8!important;background:linear-gradient(#435e82,#1b2c45)}
.tm47-brake{border-color:#ff6b75!important;background:linear-gradient(#b82836,#64101a)}
.tm47-gas{border-color:#ffe36c!important;background:linear-gradient(#d4a51d,#765301)}
.tm47-controls button.is-active{filter:brightness(1.35);transform:translateY(2px);box-shadow:inset 0 -2px 0 #0007,0 0 16px currentColor}
.tm47-controls button:active{transform:translateY(2px);box-shadow:inset 0 -2px 0 #0007}
.tm47-keyboard,.tm47-disclaimer{text-align:center;color:#7185a4;font-size:8px;line-height:1.4;letter-spacing:.45px}
.tm47-keyboard{margin:9px auto 0}
.tm47-disclaimer{margin:5px auto 0}
@media(max-width:700px){
  .tm47{margin:10px 0}
  .tm47-stage{border-width:3px;border-radius:11px}
  .tm47-topbar{inset:5px 6px auto}
  .tm47-brand{padding:5px 7px}
  .tm47-brand b{font-size:11px}
  .tm47-brand span{font-size:5px;letter-spacing:1px}
  .tm47-region{padding:6px 8px;font-size:7px}
  .tm47-sound{padding:5px 7px}
  .tm47-card{padding:20px 15px}
  .tm47-card h2{font-size:31px}
  .tm47-card h2 span{font-size:14px}
  .tm47-card p{font-size:12px;margin:12px auto}
  .tm47-route-title{font-size:7px;margin-top:8px}
  .tm47-routes{gap:5px}
  .tm47-routes button{min-height:44px;padding:7px}
  .tm47-routes button b{font-size:12px}
  .tm47-routes button span{font-size:6px}
  .tm47-how{display:none}
  .tm47-controls{grid-template-columns:1fr 1fr}
  .tm47-controls button{min-height:52px}
  .tm47-keyboard{display:none}
  .tm47-disclaimer{padding:0 8px}
}
