/* Existing Google Fonts Latin subsets, served locally under SIL OFL 1.1.
   Copyright notices and licenses accompany the files in /src/fonts/. */
@font-face {
  font-family: 'Anton'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/src/fonts/anton-latin-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('/src/fonts/barlow-condensed-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('/src/fonts/barlow-condensed-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed'; font-style: normal; font-weight: 800; font-display: swap;
  src: url('/src/fonts/barlow-condensed-latin-800.woff2') format('woff2');
}
@font-face {
  font-family: 'Bungee'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/src/fonts/bungee-latin-400.woff2') format('woff2');
}

/* Layout: full-bleed night-street canvas; lander instrument cluster top-left, rap-sheet (stars/cash) top-right, touch pads bottom. Single committed night look. */
:root {
  --night: #140f24;
  --night-2: #1f1736;
  --ink: #f3ecdf;
  --dim: #a59cc0;
  --sodium: #ffae3d;
  --gold: #ffd54a;
  --cash: #7fe08a;
  --siren-r: #ff3b4e;
  --siren-b: #4d93ff;
  --panel: rgba(14, 10, 26, .74);
  --line: rgba(255, 174, 61, .28);
  --f-display: "Bungee", "Arial Black", Impact, sans-serif;
  --f-body: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --f-meme: "Anton", Impact, "Arial Black", sans-serif;
  color-scheme: dark;
}
[hidden] { display: none !important; }
html, body { height: 100%; background: var(--night); color: var(--ink); overflow: hidden; }
body { font-family: var(--f-body); -webkit-user-select: none; user-select: none; touch-action: none; }
#app { position: fixed; inset: 0; overflow: hidden; background: var(--night); }
#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transition: filter .6s; }
#game.gray { filter: grayscale(1) contrast(1.15) brightness(.9); }

/* ---------- HUD ---------- */
.hud { position: absolute; pointer-events: none; font-variant-numeric: tabular-nums; }
#inst {
  top: calc(10px + env(safe-area-inset-top, 0px)); left: calc(10px + env(safe-area-inset-left, 0px));
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  padding: 8px 10px; display: grid; grid-template-columns: auto auto auto; column-gap: 8px; row-gap: 1px;
  font-size: 15px; line-height: 1.15; min-width: 168px;
}
#inst .k { color: var(--sodium); font-weight: 800; letter-spacing: .08em; font-size: 12px; align-self: center; }
#inst .v { text-align: right; font-weight: 600; font-size: 17px; }
#inst .u { color: var(--dim); font-size: 12px; align-self: center; }
#inst .bar { grid-column: 1 / -1; height: 7px; background: rgba(255,255,255,.1); border-radius: 4px; overflow: hidden; margin-top: 3px; }
#inst .bar > i { display: block; height: 100%; width: 100%; background: var(--sodium); transition: background .3s; }
#inst .barlbl { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: 12px; color: var(--dim); margin-top: 4px; letter-spacing: .06em; }
.warn { color: var(--siren-r) !important; }
.good { color: var(--cash) !important; }

#sheet {
  top: calc(10px + env(safe-area-inset-top, 0px)); right: calc(10px + env(safe-area-inset-right, 0px));
  text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
}
#stars { font-size: 26px; letter-spacing: 2px; line-height: 1; color: rgba(255,255,255,.18); text-shadow: 0 2px 0 #000; }
#stars .on { color: var(--gold); }
#stars.flash .on { animation: starflash .5s steps(2) infinite; }
@keyframes starflash { 50% { color: var(--siren-b); } }
#bank { font-family: var(--f-display); font-size: 28px; color: var(--cash); text-shadow: 0 3px 0 #000, 0 0 12px rgba(0,0,0,.6); line-height: 1.05; }
#bag { font-family: var(--f-display); font-size: 16px; color: var(--gold); text-shadow: 0 2px 0 #000; }
#loot { font-size: 15px; font-weight: 800; letter-spacing: .06em; color: var(--ink); text-shadow: 0 2px 0 #000; }

#toast {
  top: 22%; left: 50%; transform: translateX(-50%); text-align: center; width: min(92vw, 720px);
}
.tst { font-family: var(--f-display); font-size: clamp(22px, 4.4vw, 44px); color: var(--gold); text-shadow: 0 4px 0 #000, 0 0 18px rgba(0,0,0,.7); animation: pop .35s cubic-bezier(.2,1.6,.4,1); line-height: 1.05; }
.tst small { display: block; font-family: var(--f-body); font-weight: 800; font-size: clamp(15px, 2.2vw, 22px); color: var(--ink); letter-spacing: .05em; margin-top: 4px; }
.tst.red { color: var(--siren-r); } .tst.blue { color: var(--siren-b); } .tst.green { color: var(--cash); } .tst.white { color: var(--ink); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

#panic {
  top: calc(64px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%) rotate(-3deg);
  font-family: var(--f-display); font-size: 22px; color: #111; background: var(--gold); padding: 4px 12px; border-radius: 3px;
  box-shadow: 0 3px 0 #000;
}
#bust { bottom: calc(66px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); width: min(60vw, 320px); text-align: center; }
#bust b { font-family: var(--f-display); font-size: 15px; color: var(--siren-b); text-shadow: 0 2px 0 #000; letter-spacing: .05em; }
#bust div { height: 9px; border-radius: 5px; background: rgba(255,255,255,.12); overflow: hidden; margin-top: 3px; }
#bust i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--siren-b), var(--siren-r)); }
#mini {
  bottom: calc(8px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%);
  width: min(70vw, 560px); height: 30px; border-radius: 4px; background: var(--panel); border: 1px solid var(--line);
}
#mission { top: calc(122px + env(safe-area-inset-top, 0px)); right: calc(10px + env(safe-area-inset-right, 0px)); width: min(280px, 44vw);
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 6px; padding: 7px 10px; display: flex; flex-direction: column; gap: 2px; }
#mission small { font-size: 11px; font-weight: 800; letter-spacing: .14em; color: var(--dim); }
#mission b { font-family: var(--f-display); font-size: 17px; font-weight: 400; color: var(--gold); line-height: 1.05; }
#mission span { font-size: 14px; font-weight: 600; line-height: 1.2; }
#mission div { height: 4px; border-radius: 2px; background: rgba(255,255,255,.12); overflow: hidden; margin-top: 3px; }
#mission i { display: block; height: 100%; width: 100%; background: var(--gold); }
#mission.new { animation: pop .35s cubic-bezier(.2,1.6,.4,1); }
#hint { top: calc(48px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); font-size: 14px; color: var(--dim); font-weight: 600; letter-spacing: .06em; white-space: nowrap; text-shadow: 0 1px 0 #000; }
#topbtns { position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.ibtn { pointer-events: auto; font: 800 13px var(--f-body); letter-spacing: .08em; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 6px 10px; cursor: pointer; }
.ibtn:hover { border-color: var(--sodium); }

/* ---------- touch ---------- */
#touch { position: absolute; inset: auto 0 0 0; display: none; justify-content: space-between; align-items: flex-end; pointer-events: none;
  padding: 0 calc(12px + env(safe-area-inset-right, 0px)) calc(48px + env(safe-area-inset-bottom, 0px)) calc(12px + env(safe-area-inset-left, 0px)); }
#touch .grp { display: flex; gap: 10px; align-items: flex-end; }
#touch .col { display: flex; flex-direction: column; gap: 8px; }
.tb { pointer-events: auto; width: 68px; height: 68px; border-radius: 50%; border: 2px solid rgba(255,174,61,.55); background: rgba(14,10,26,.55); color: var(--ink);
  font: 800 15px var(--f-body); letter-spacing: .06em; display: grid; place-items: center; touch-action: none; }
.tb.big { width: 92px; height: 92px; font-family: var(--f-display); font-size: 15px; }
.tb.yk { border-color: rgba(255,213,74,.8); color: var(--gold); }
.tb.fan { border-color: rgba(65,224,255,.8); color: #41e0ff; }
.tb.trick { border-color: #d6a0ff; color: #e3baff; }
.tb.trick:active { background: rgba(168,97,221,.35); }
#btnTrick { color: #e3baff; border-color: #ab73cc; }
#touch .col:last-child { align-items: center; }
.tb.down { background: rgba(255,174,61,.35); }
.tb small { display: block; font-size: 10px; letter-spacing: .04em; }
#tL, #tR { align-content: center; gap: 1px; }
@media (pointer: coarse) { #touch { display: flex; } #hint, #btnTrick { display: none; } }
@media (max-width: 720px) {
  #inst { font-size: 13px; min-width: 0; padding: 6px 8px; grid-template-columns: auto auto auto auto auto auto; column-gap: 5px; }
  #inst .v { font-size: 14px; } #inst .k, #inst .u { font-size: 10px; }
  #inst .opt { display: none; }
  #bank { font-size: 20px; } #stars { font-size: 19px; }
  #mission { top: calc(168px + env(safe-area-inset-top, 0px)); left: 10px; right: 10px; width: auto; } #mission b { font-size: 14px; } #mission span { font-size: 12px; }
  #topbtns { top: calc(124px + env(safe-area-inset-top, 0px)); left: calc(10px + env(safe-area-inset-left, 0px)); right: 10px; transform: none; flex-wrap: nowrap; }
  #topbtns button { flex: 1; min-width: 0; }
  #toast { top: 44%; } .tst { font-size: 22px; } .tst small { font-size: 14px; }
  .ibtn { padding: 5px 8px; font-size: 12px; }
}

/* ---------- screens ---------- */
.screen { position: absolute; inset: 0; overflow-y: auto; display: flex; align-items: flex-start; justify-content: center;
  padding-block: calc(20px + env(safe-area-inset-top, 0px)) calc(20px + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: radial-gradient(ellipse at 50% 30%, rgba(31,23,54,.55), rgba(10,7,18,.92)); touch-action: auto; -webkit-user-select: text; user-select: text; }
.card { width: min(100%, 760px); display: flex; flex-direction: column; gap: 16px; margin-block: auto; }   /* auto margins center it but still let tall cards scroll to the top */
.logo { font-family: var(--f-display); line-height: .9; font-size: clamp(40px, 9vw, 92px); color: var(--ink); text-shadow: 0 6px 0 #000, 0 0 40px rgba(255,174,61,.35); text-wrap: balance; }
.logo span { color: var(--sodium); display: block; }
.tag { font-size: clamp(18px, 2.6vw, 24px); font-weight: 600; color: var(--dim); max-width: 60ch; text-wrap: balance; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; font-size: 16px; line-height: 1.3; min-width: 0; }
.step b { display: block; font-family: var(--f-display); font-size: 14px; color: var(--sodium); margin-bottom: 4px; letter-spacing: .02em; }
.keys { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 16px; color: var(--dim); font-weight: 600; }
kbd { font: 800 13px var(--f-body); color: var(--ink); background: var(--night-2); border: 1px solid rgba(255,255,255,.18); border-bottom-width: 3px; border-radius: 4px; padding: 1px 6px; margin-right: 3px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn { font: 400 18px var(--f-display); color: #160f05; background: var(--sodium); border: 0; border-radius: 4px; padding: 12px 22px; cursor: pointer; box-shadow: 0 4px 0 #7a4a08; text-decoration: none; display: inline-block; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #7a4a08; }
.btn.alt { background: var(--night-2); color: var(--ink); box-shadow: 0 4px 0 #000; border: 1px solid rgba(255,255,255,.16); }
.btn.x { background: var(--ink); color: #000; box-shadow: 0 4px 0 #6b6577; }
.btn:focus-visible, .ibtn:focus-visible, .tb:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.fine { font-size: 13px; color: var(--dim); }
.physics { font-size: 14px; color: var(--dim); font-variant-numeric: tabular-nums; line-height: 1.4; }
.physics b { color: var(--ink); font-weight: 600; }
.verdict { font-family: var(--f-display); font-size: clamp(54px, 13vw, 120px); line-height: .9; text-shadow: 0 6px 0 #000; }
.verdict.wasted { color: var(--siren-r); } .verdict.busted { color: var(--siren-b); } .verdict.cam { color: var(--gold); font-size: clamp(36px, 8vw, 72px); }
.caption { font-family: var(--f-meme); font-size: clamp(22px, 4vw, 34px); letter-spacing: .01em; text-wrap: balance; }
#memeImg, #camImg { width: 100%; max-width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; border: 1px solid var(--line); background: #000; display: block; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; }
.stat b { display: block; font-family: var(--f-display); font-size: 20px; color: var(--gold); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat.wide { grid-column: span 2; }
.stat span { font-size: 13px; color: var(--dim); letter-spacing: .06em; font-weight: 600; }
#saveNote, #camNote { font-size: 14px; color: var(--dim); }
@media (prefers-reduced-motion: reduce) { .tst { animation: none; } #stars.flash .on { animation: none; } }

/* ---------- standalone page base ---------- */
html, body { margin: 0; }
*, *::before, *::after { box-sizing: border-box; }
img, video { max-width: 100%; }
/* ---------- replays ---------- */
.media { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.media video { width: 100%; border-radius: 6px; border: 1px solid var(--line); background: #000; display: block; max-height: 60vh; }
#clipVid { width: 100%; max-height: 62vh; border-radius: 6px; border: 1px solid var(--line); background: #000; display: block; }
#rankLine { font-family: var(--f-display); font-size: 18px; color: var(--gold); }
/* ---------- online ---------- */
.online { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.online > div { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.olbl { font-family: var(--f-display); font-size: 14px; color: var(--sodium); font-weight: 400; letter-spacing: .02em; }
#board { margin: 0; padding: 0 0 0 22px; display: flex; flex-direction: column; gap: 3px; font-size: 16px; font-variant-numeric: tabular-nums; }
#board li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: baseline; }
#board li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
#board li small { color: var(--dim); font-size: 13px; }
#board li b { color: var(--cash); font-weight: 800; }
#board li.me span { color: var(--gold); }
#board li.empty { display: block; color: var(--dim); }
.online label { font-size: 13px; color: var(--dim); font-weight: 600; letter-spacing: .04em; display: block; margin-bottom: 4px; }
.online input { font: 600 16px var(--f-body); color: var(--ink); background: var(--night-2); border: 1px solid rgba(255,255,255,.18); border-radius: 4px; padding: 8px 10px; min-width: 0; flex: 1 1 140px; }
.online input:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.btn.sm { font-size: 14px; padding: 9px 12px; }
#meLine { font-size: 16px; font-weight: 600; }

/* Campaign menus and compact controls share the original night-street palette. */
.screen { z-index: 10; overscroll-behavior: contain; }
.screen:focus { outline: none; }
h1, h2, h3, p { margin: 0; }
h1 { font: 24px var(--f-display); color: var(--gold); }
h2 { font: 18px var(--f-display); color: var(--sodium); }
.spread { justify-content: space-between; }
.settings { display: flex; flex-wrap: wrap; gap: 12px 24px; font-size: 16px; }
.settings label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--sodium); }
.chapter { display: flex; flex-direction: column; gap: 10px; margin-block: 20px; }
.chapter p { color: var(--dim); }
.level-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.level-button { min-height: 78px; padding: 10px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); font: 20px var(--f-display); cursor: pointer; }
.level-button small { display: block; margin-top: 5px; font: 600 12px var(--f-body); color: var(--dim); }
.level-button.done { border-color: var(--cash); color: var(--cash); }
.level-button.next { background: var(--sodium); color: #160f05; }
.level-button.next small { color: #3c260d; }
.level-button:disabled { opacity: .45; cursor: default; }
.level-button:focus-visible, input:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.chapter.hard h2 { color: var(--siren-r); }
#misProgress { color: var(--gold); font-variant-numeric: tabular-nums; }
#mission #misAdvice { color: var(--dim); font-size: 12px; }
#mission #misRules { color: var(--sodium); font-size: 12px; }
#mission #misGoal { color: var(--dim); font-size: 12px; font-weight: 800; letter-spacing: .04em; }
#levelVerdict.passed { color: var(--cash); }
#levelVerdict.failed { color: var(--siren-r); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
body.menu-open #app > .hud, body.menu-open #topbtns, body.menu-open #touch { visibility: hidden; }
body.reduced-motion *, body.reduced-motion *::before, body.reduced-motion *::after { animation: none !important; transition: none !important; }
/* The opening course teaches driving before introducing the flight controls. */
body.intro-driving #inst, body.intro-driving #sheet, body.intro-driving #btnClip, body.intro-driving #btnCam,
body.intro-driving #tY, body.intro-driving #tB, body.intro-driving #tF, body.intro-driving #tT { display: none; }
body.intro-driving #mission { top: calc(74px + env(safe-area-inset-top, 0px)); left: 10px; right: 10px; width: min(420px, calc(100% - 20px)); }
body.intro-driving #topbtns { top: calc(10px + env(safe-area-inset-top, 0px)); left: 50%; right: auto; transform: translateX(-50%); }
body.intro-driving #hint { top: calc(48px + env(safe-area-inset-top, 0px)); }
body.intro-driving #misTask { font-size: 18px; color: var(--cash); }
body.intro-driving #misAdvice { font-size: 15px; color: var(--ink); }
@media (max-width: 420px) {
  #touch { padding-left: 8px; padding-right: 8px; }
  #touch .grp { gap: 6px; }
  .tb { width: 54px; height: 54px; font-size: 12px; flex-shrink: 0; }
  .tb.big { width: 70px; height: 70px; font-size: 12px; }
  .level-grid { gap: 6px; }
  .level-button { min-height: 64px; font-size: 17px; }
  .btn { font-size: 15px; padding: 12px 16px; }
  .btn.sm { font-size: 12px; padding: 10px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  #inst { padding: 4px 6px; min-width: 0; grid-template-columns: repeat(6, auto); }
  #inst .opt, #inst .barlbl { display: none; }
  #inst .v { font-size: 12px; } #inst .k, #inst .u { font-size: 10px; }
  #sheet #loot, #sheet #bag { display: none; }
  #bank { font-size: 17px; } #stars { font-size: 16px; }
  #mission { top: 74px; right: 10px; left: auto; width: 210px; padding: 5px 8px; }
  #mission b { font-size: 12px; } #mission span { font-size: 11px; }
  #topbtns { top: 10px; left: 50%; right: auto; transform: translateX(-50%); }
  #touch { padding-bottom: 40px; }
  .tb { width: 48px; height: 48px; font-size: 11px; } .tb.big { width: 60px; height: 60px; font-size: 11px; }
  #toast { top: 35%; width: 60vw; }
  #hint { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Easy controls keep the same small set of actions throughout the game. */
#driveStatus, .simple-help { display: none; }
body.simple-controls #driveStatus { display: flex; flex-wrap: wrap; gap: 5px 12px; top: calc(10px + env(safe-area-inset-top, 0px)); left: calc(10px + env(safe-area-inset-left, 0px)); max-width: calc(100% - 125px); padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); font-size: 14px; font-weight: 600; }
body.simple-controls #simpleSpeed { color: var(--gold); }
body.simple-controls #simpleAir { color: #41e0ff; }
body.simple-controls #simpleAir.low { color: var(--gold); }
body.race-mode #sheet, body.race-mode #simpleBag { display: none; }
body.simple-controls .simple-help { display: inline; }
body.simple-controls #inst, body.simple-controls #sheet #bank, body.simple-controls #sheet #bag, body.simple-controls #sheet #loot,
body.simple-controls .advanced-control, body.simple-controls #tB, body.simple-controls #tF { display: none; }
body.simple-controls #touch .grp:last-child { display: flex; }
body.simple-controls #tT { width: 68px; height: 68px; }
body.simple-controls #mission { top: calc(82px + env(safe-area-inset-top, 0px)); right: 10px; left: auto; width: min(370px, 44vw); }
body.simple-controls #misTask { color: var(--cash); font-size: 17px; }
body.simple-controls #misAdvice { color: var(--ink); font-size: 15px; }
body.simple-controls #hint { letter-spacing: .02em; }
.level-name { display: block; margin-top: 5px; font: 600 14px var(--f-body); line-height: 1.15; overflow-wrap: anywhere; }
.course-preview { display: block; width: 100%; height: 36px; margin: 5px 0 2px; }
@media (max-width: 720px) {
  body.simple-controls #topbtns { top: calc(62px + env(safe-area-inset-top, 0px)); left: 10px; right: 10px; transform: none; }
  body.simple-controls #mission { top: calc(108px + env(safe-area-inset-top, 0px)); left: 10px; right: 10px; width: auto; }
  body.simple-controls #misTask { font-size: 16px; }
  body.simple-controls #misAdvice { font-size: 14px; }
}
@media (max-width: 420px) {
  body.simple-controls #driveStatus { font-size: 12px; gap: 4px 8px; padding: 6px 8px; }
  body.simple-controls #tT { width: 54px; height: 54px; }
  .level-name { font-size: 12px; }
  .level-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-height: 500px) and (orientation: landscape) {
  body.simple-controls #topbtns { top: 64px; left: 10px; right: 270px; transform: none; }
  body.simple-controls #mission { top: 64px; left: auto; width: 245px; }
  body.simple-controls #misTask { font-size: 13px; }
  body.simple-controls #misAdvice { font-size: 12px; }
  body.simple-controls #tT { width: 48px; height: 48px; }
}
