.drive-page { height: 100dvh; min-height: 0; display: flex; flex-direction: column; overflow: hidden; overscroll-behavior: none; }
.drive-page .account-header, .drive-page .arcade-header { flex-shrink: 0; }
.drive-page .arcade-header { padding-top: .35rem; padding-bottom: .35rem; }
.drive-page .arcade-header .eyebrow { margin: .15rem 0; font-size: .65rem; }
.drive-page .arcade-main { width: min(100% - 1rem, 1600px); max-width: none; margin: 0 auto; padding: 0 0 .4rem; flex: 1; min-height: 0; }
.drive-page #arcade-content { height: 100%; }
.drive-screen { height: 100%; min-height: 0; display: flex; flex-direction: column; background: #19272a; border: 1px solid #49635c; border-radius: 14px; overflow: hidden; color: #fff; }
.drive-toolbar { display: flex; align-items: center; gap: .35rem; padding: .3rem .5rem; flex-shrink: 0; background: #142523; }
.drive-toolbar strong { font-size: .72rem; letter-spacing: .08em; margin-right: auto; }
.drive-toolbar strong span { color: #bed4bd; }
.drive-page button, .drive-page select { font: inherit; }
.drive-page button { cursor: pointer; min-height: 44px; border: 1px solid #6f8c7c; border-radius: 8px; background: #253e35; color: #fff; padding: .4rem .65rem; font-size: .8rem; }
.drive-page button:disabled { opacity: .5; cursor: default; }
.drive-page button:focus-visible, .drive-page select:focus-visible { outline: 3px solid #f4d36a; outline-offset: -3px; }
.drive-stage { position: relative; flex: 1; min-height: 0; isolation: isolate; overflow: hidden; }
#drive-canvas { display: block; width: 100%; height: 100%; touch-action: none; outline-offset: -4px; }
.drive-hud { pointer-events: none; position: absolute; top: .65rem; left: .65rem; display: flex; gap: .5rem; }
.drive-hud > div { background: #132723e8; border: 1px solid #c5d4be55; padding: .4rem .8rem; border-radius: 9px; min-width: 64px; }
.drive-hud small { display: block; color: #c8d7c7; font-size: .6rem; letter-spacing: .14em; }
.drive-hud b { font-size: clamp(1.05rem, 3vw, 1.65rem); font-variant-numeric: tabular-nums; }
.drive-message { position: absolute; top: 5rem; left: 50%; transform: translateX(-50%); margin: 0; padding: .3rem .65rem; max-width: 90%; width: max-content; text-align: center; border-radius: 6px; background: #142523e0; color: #fff3ae; font-size: .85rem; pointer-events: none; }
.drive-message:empty { display: none; }
.drive-keyboard-help { position: absolute; bottom: 6.4rem; left: 50%; transform: translateX(-50%); margin: 0; padding: .5rem .75rem; max-width: 90%; width: max-content; border-radius: 8px; background: #142523e8; color: #fff3ae; font-size: .75rem; text-align: center; pointer-events: none; }
@media (pointer: coarse), (max-width: 900px) { .drive-keyboard-help { display: none; } }
.drive-controls { position: absolute; inset: auto 0 0; display: flex; justify-content: space-between; align-items: end; padding: .6rem max(.6rem, env(safe-area-inset-right, 0px)) max(.6rem, env(safe-area-inset-bottom, 0px)) max(.6rem, env(safe-area-inset-left, 0px)); pointer-events: none; background: linear-gradient(transparent, #15272466); }
.drive-control-pair { display: flex; gap: .45rem; }
.drive-controls button { pointer-events: auto; touch-action: none; user-select: none; -webkit-user-select: none; min-width: clamp(46px, 12vw, 84px); min-height: clamp(56px, 13vw, 84px); background: #172f2be8; border: 2px solid #bfd2b9a6; font-weight: 800; font-size: 1rem; }
.drive-controls button small { font-size: .5rem; }
.drive-controls button[data-drive-control="throttle"] { background: #2f6846ed; }
.drive-controls button[data-drive-control="brake"] { background: #70463aed; font-size: .72rem; }
.drive-controls button.held { background: #e8c65c; color: #142523; }
#drive-reset { font-size: .6rem; min-width: 44px; min-height: 44px; padding: .25rem; }
.drive-overlay { position: absolute; z-index: 3; inset: 0; display: grid; place-items: center; background: #101f27a6; padding: .65rem; }
.drive-panel { color: #f3f5ec; background: #142822f5; border: 1px solid #a3bc8d; box-shadow: 0 12px 60px #0007; border-radius: 14px; padding: clamp(.8rem, 2vw, 1.5rem); max-width: 620px; width: 100%; max-height: 100%; overflow-y: auto; overscroll-behavior: contain; }
.drive-panel h1 { font-size: clamp(1.3rem, 4vw, 2rem); margin: .25rem 0; }
.drive-panel p { margin: .6rem 0; font-size: .82rem; line-height: 1.4; }
.drive-panel .eyebrow { font-size: .6rem; color: #e9cd75; }
.drive-panel label { display: block; font-size: .8rem; font-weight: bold; margin: .75rem 0 .25rem; }
.drive-panel select { width: 100%; min-height: 44px; color: #fff; background: #223f34; border: 1px solid #90ab82; border-radius: 6px; font-size: .85rem; padding: .4rem; }
.drive-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.drive-row a { color: #f4db84; font-size: .8rem; }
.drive-help { color: #c6d6c4; }
#drive-start, #drive-resume { background: #d7bb5c; color: #15241b; font-weight: bold; }
#drive-error { color: #ffbaaa; }
.drive-page [hidden] { display: none !important; }
.game-focused .drive-screen { min-height: 0; }
@media (max-width: 600px) {
  .drive-toolbar strong span { display: none; }
  .drive-toolbar { gap: .2rem; padding: .2rem; }
  .drive-toolbar button { font-size: .65rem; padding: .25rem .4rem; }
  .drive-toolbar strong { font-size: .6rem; letter-spacing: .03em; }
  .drive-hud { top: .4rem; left: .4rem; gap: .3rem; }
  .drive-hud > div { padding: .3rem .6rem; min-width: 50px; }
  .drive-message { top: 4.1rem; font-size: .75rem; }
}
@media (orientation: landscape) and (max-height: 540px) {
  .drive-page .arcade-header .eyebrow { display: none; }
  .drive-toolbar { padding: .1rem .35rem; }
  .drive-toolbar button { min-height: 36px; }
  .drive-controls button { min-height: 48px; min-width: 58px; }
  .drive-message { top: .5rem; left: auto; right: .5rem; transform: none; max-width: 50%; }
}
