* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #221a2e;
  font-family: 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif; color: #fff3dd; }
#app { position: fixed; inset: 0; }
#game { display: block; }
#hud { position: fixed; top: 10px; left: 10px; right: 10px; display: flex;
  justify-content: space-between; pointer-events: none; z-index: 5; }
#hud-right { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
#hud-left { display: flex; flex-direction: column; gap: 6px; }
.chip { background: rgba(24, 16, 34, 0.65); border: 1px solid rgba(247, 233, 200, 0.35);
  border-radius: 8px; padding: 4px 10px; font-size: 14px; letter-spacing: 1px; }
.chip.big { font-size: 22px; font-weight: 700; color: #ffd166; }
#minimap { border-radius: 10px; border: 1px solid rgba(247,233,200,0.35); }
#toast { position: fixed; top: 18%; left: 50%; transform: translateX(-50%);
  font-size: clamp(22px, 5vw, 40px); font-weight: 800; color: #ffd166;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6); opacity: 0; transition: opacity 0.4s;
  pointer-events: none; z-index: 6; }
#overlay, #result { position: fixed; inset: 0; display: flex; align-items: center;
  justify-content: center; background: rgba(20, 12, 30, 0.72); z-index: 10; }
#result { display: none; }
.panel { max-width: 560px; width: calc(100% - 40px); padding: 28px 30px; text-align: center;
  background: linear-gradient(160deg, #2b1f3a, #3a2440);
  border: 1px solid rgba(255, 209, 102, 0.5); border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6); }
.panel h1 { font-size: clamp(28px, 7vw, 46px); letter-spacing: 3px; color: #fff3dd; }
.panel h1 span { color: #e4572e; }
.panel h2 { font-size: clamp(24px, 6vw, 38px); color: #ffd166; margin-bottom: 10px; }
.panel p { margin: 12px 0; line-height: 1.6; color: #e8d9bd; }
.panel ul { list-style: none; margin: 14px 0 20px; line-height: 1.9; font-size: 14px; color: #cdbfa9; }
.panel b { color: #ffd166; }
.count-in { min-height: 54px; font-size: clamp(38px, 9vw, 64px); font-weight: 900;
  letter-spacing: 4px; color: #ffd166; text-shadow: 0 2px 18px rgba(228,87,46,0.7); }
#overlay.counting #btn-start { opacity: 0.45; pointer-events: none; }
button { font: inherit; font-weight: 800; letter-spacing: 2px; cursor: pointer;
  padding: 14px 34px; border-radius: 999px; border: none; color: #2b1420;
  background: linear-gradient(180deg, #ffd166, #e4572e);
  box-shadow: 0 6px 20px rgba(228, 87, 46, 0.5); }
button:active { transform: translateY(2px); }
#touch { position: fixed; inset: auto 0 0 0; display: none; z-index: 9;
  padding: 14px 18px 26px; justify-content: space-between; align-items: flex-end; }
@media (pointer: coarse) { #touch { display: flex; } }
.tbtn { width: 74px; height: 74px; border-radius: 18px; font-size: 26px;
  color: #fff3dd; background: rgba(30, 20, 44, 0.65); border: 1px solid rgba(255,209,102,0.5);
  box-shadow: none; padding: 0; touch-action: none; -webkit-user-select: none; user-select: none; }
.tbtn.on { background: rgba(228, 87, 46, 0.75); }
#t-left { margin-right: 12px; }
.tpedals { display: flex; flex-direction: column; gap: 12px; }
.tbtn.pedal.gas { background: rgba(64, 140, 106, 0.55); }
