@font-face {
  font-family: Rush;
  src: local("Arial Black");
  font-weight: 900;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  overscroll-behavior: none;
}
body {
  background: #173830;
  color: #182522;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
}
button,
input {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #7a4bda;
  outline-offset: 4px;
}
button:disabled {
  cursor: default;
  opacity: 0.52;
}
[hidden] {
  display: none !important;
}
#game-shell {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 600px;
  overflow: hidden;
}
#game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 42px;
  z-index: 5;
  pointer-events: none;
}
.topbar > * {
  pointer-events: auto;
}
.wordmark {
  font-family: Rush, "Arial Black", sans-serif;
  font-style: italic;
  font-weight: 900;
  color: #182522;
  text-decoration: none;
  font-size: 20px;
  letter-spacing: -1px;
  line-height: 0.96;
  transform: rotate(-3deg);
}
.wordmark span {
  display: block;
  font-size: 39px;
  letter-spacing: -2px;
}
.wordmark i {
  font-style: normal;
  font-size: 29px;
  color: #f06735;
}
.top-actions {
  display: flex;
  gap: 10px;
}
.icon-button {
  width: 44px;
  height: 44px;
  border: 1px solid #182522;
  border-radius: 50%;
  background: #fff9e9;
  color: #182522;
  font-size: 25px;
  display: grid;
  place-items: center;
}
.screen {
  position: absolute;
  inset: 0;
  z-index: 3;
}
.home-screen {
  background: linear-gradient(
    90deg,
    #fbf4e6 0%,
    #fbf4e6 28%,
    #fbf4e6ed 38%,
    #fbf4e680 50%,
    transparent 65%
  );
  display: flex;
  align-items: center;
}
.home-content {
  width: 460px;
  margin-left: 6vw;
  margin-top: 74px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.35px;
  margin-bottom: 20px;
}
.sun-icon {
  color: #ed632d;
  font-size: 26px;
}
h1 {
  font-family: Rush, "Arial Black", sans-serif;
  font-weight: 900;
  font-size: clamp(50px, 5.4vw, 80px);
  line-height: 0.95;
  letter-spacing: -4px;
  margin: 0 0 20px;
}
h1 em {
  color: #e96534;
  font-style: italic;
}
.intro {
  font-size: 17px;
  line-height: 1.45;
  margin: 0 0 25px;
  color: #5a6359;
}
.start-card {
  width: 390px;
  background: #fffaf0;
  border: 1px solid #d5d7be;
  padding: 18px;
  box-shadow: 5px 6px 0 #1e443419;
}
.identity-fields {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 12px;
}
label {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
}
label span {
  font-size: 10px;
  color: #747969;
  font-weight: normal;
  letter-spacing: 0;
}
input {
  min-width: 0;
  width: 100%;
  height: 40px;
  border: 1px solid #aeb9a9;
  background: #fffdf7;
  padding: 8px 10px;
  color: #1a2922;
  font-weight: 700;
  border-radius: 0;
  font-size: 15px;
  letter-spacing: 0.4px;
}
.selected-kit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0;
}
.selected-kit small {
  display: block;
  font-size: 10px;
  letter-spacing: 1px;
  color: #6b7664;
  margin-bottom: 4px;
}
.selected-kit b {
  font-size: 14px;
}
.text-button {
  border: 0;
  background: none;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-size: 14px;
  color: #344b3e;
  padding: 7px 0;
  font-weight: 700;
}
.primary {
  width: 100%;
  border: 2px solid #172b21;
  color: #182522;
  background: #dcff48;
  box-shadow: 3px 4px 0 #172b21;
  padding: 15px 20px;
  text-align: left;
  font-family: Rush, "Arial Black", sans-serif;
  font-weight: 900;
  font-size: 24px;
  letter-spacing: -0.7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.primary:hover {
  background: #cfff28;
  transform: translateY(-1px);
}
.primary:active {
  transform: translate(2px, 3px);
  box-shadow: 1px 1px 0 #172b21;
}
.primary span {
  font:
    700 11px Arial,
    sans-serif;
  letter-spacing: 1px;
  border: 1px solid #192d2250;
  padding: 5px;
}
.home-links {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  gap: 14px;
}
.home-links button {
  background: transparent;
  border: 0;
  color: #243b2d;
  font-size: 11px;
  letter-spacing: 0.8px;
  font-weight: 800;
  padding: 4px 0;
}
.home-links button:hover {
  text-decoration: underline;
}
.home-footer {
  display: flex;
  justify-content: space-between;
  width: 390px;
  margin-top: 20px;
  font-size: 11px;
  letter-spacing: 0.8px;
  color: #58694e;
  font-weight: 700;
}
.world-label {
  position: absolute;
  right: 45px;
  bottom: 36px;
  color: #fff9e9;
  text-shadow: 0 2px 4px #16221e;
  line-height: 1.3;
  font-size: 12px;
  letter-spacing: 1.5px;
}
.world-label strong {
  font-size: 24px;
  letter-spacing: 0;
  font-weight: 900;
}
.world-label > span {
  color: #dcff48;
  float: left;
  margin: 7px 10px 0 0;
}
.live-stats {
  display: flex;
  gap: 2px;
  background: #162a22;
  border: 2px solid #162a22;
  box-shadow: 3px 4px 0 #14292040;
}
.live-stats > div {
  background: #fff9e9;
  padding: 9px 22px;
  min-width: 115px;
}
.live-stats small {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
}
.live-stats strong {
  font-family: Rush, "Arial Black", sans-serif;
  font-weight: 900;
  font-size: 32px;
  line-height: 1.1;
}
.live-stats .combo {
  background: #dcff48;
  min-width: 86px;
}
body.riding .wordmark {
  background: #fff9e9;
  padding: 10px 13px;
  box-shadow: 3px 4px 0 #182522;
}
.next-order {
  position: absolute;
  top: 125px;
  right: 32px;
  background: #fff9e9;
  border: 2px solid #162a22;
  box-shadow: 4px 4px 0 #162a2240;
  padding: 15px;
  min-width: 190px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.6px;
  font-weight: 800;
  color: #637357;
}
.next-order strong {
  display: block;
  font-size: 16px;
  margin: 7px 0;
}
.next-order > span:last-of-type {
  font-size: 13px;
  color: #5d6556;
}
#rival-line {
  font-size: 12px;
  color: #4d4e39;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #d5d7be;
  max-width: 200px;
}
.battery {
  position: absolute;
  bottom: 81px;
  left: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 2px solid #172b21;
  padding: 13px;
  background: #fff9e9;
  font-size: 12px;
  font-weight: 800;
}
.battery meter {
  width: 100px;
  height: 15px;
  accent-color: #b3e127;
}
.feedback {
  position: absolute;
  top: 26%;
  left: 50%;
  transform: translateX(-50%);
  font-family: Rush, "Arial Black", sans-serif;
  font-weight: 900;
  font-style: italic;
  font-size: 30px;
  color: #dcff48;
  text-shadow:
    2px 2px 0 #142a20,
    -1px -1px 0 #142a20;
  white-space: nowrap;
  pointer-events: none;
}
.aim-help {
  position: absolute;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%);
  background: #182b22e8;
  padding: 10px 16px;
  color: #fff8e7;
  font-size: 13px;
  border-radius: 4px;
  white-space: nowrap;
}
.ride-bottom {
  position: absolute;
  bottom: 23px;
  left: 32px;
  right: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff9e9;
  background: #172921e6;
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.8px;
}
#lives {
  font-size: 20px;
  color: #ff8a60;
  letter-spacing: 6px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: #0d251acf;
  display: grid;
  place-items: center;
  padding: 25px;
  backdrop-filter: blur(5px);
}
.modal-panel {
  width: min(780px, 100%);
  max-height: 90dvh;
  overflow: auto;
  background: #fff9e9;
  border: 2px solid #182d22;
  padding: 30px;
  box-shadow: 8px 8px 0 #0b1a1650;
}
.modal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
}
.modal-heading h2 {
  font-family: Rush, "Arial Black", sans-serif;
  font-weight: 900;
  letter-spacing: -1px;
  font-size: 34px;
  margin: 6px 0 0;
}
.team-tabs,
.board-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.team-tabs button,
.board-tabs button {
  background: #edeedc;
  border: 1px solid #bec5ae;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 15px;
}
.team-tabs button.active,
.board-tabs button.active {
  background: #172d22;
  color: #dcff48;
}
.kit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.kit-card {
  position: relative;
  padding: 12px;
  text-align: left;
  border: 2px solid #c7cdb8;
  background: #f1efdf;
  color: #25382a;
  min-height: 190px;
}
.kit-card.active {
  border-color: #243c27;
  background: #edffc2;
  box-shadow: 3px 3px 0 #203523;
}
.kit-preview {
  height: 112px;
  display: block;
  background-repeat: no-repeat;
  background-size: 400% 200%;
  margin: -7px -3px 6px;
}
.kit-card b {
  display: block;
  font-size: 14px;
}
.kit-card small {
  display: block;
  font-size: 11px;
  line-height: 1.5;
  margin-top: 5px;
  color: #596647;
}
.kit-card:disabled {
  opacity: 0.55;
}
.garage-progress {
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.5;
  color: #53614c;
}
.leader-table {
  width: 100%;
  border-collapse: collapse;
}
.leader-table th {
  text-align: left;
  font-size: 10px;
  letter-spacing: 1px;
  padding: 10px 8px;
  color: #68755a;
  border-bottom: 1px solid #b6c1a4;
}
.leader-table td {
  padding: 13px 8px;
  border-bottom: 1px solid #d8deca;
  font-weight: 700;
  font-size: 14px;
}
.leader-table td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.leader-table tr.me {
  background: #deff86;
}
.leader-table .race-button {
  border: 1px solid #a9b296;
  background: none;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 800;
}
.empty-state {
  text-align: center;
  padding: 40px 15px;
  background: #efefdc;
  color: #5a6851;
}
.board-note {
  font-size: 13px;
  line-height: 1.5;
  color: #586951;
  margin: 16px 0;
}
.status-pill {
  font-size: 11px;
  background: #e5ead5;
  padding: 5px 8px;
  font-weight: 700;
}
.help-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.help-grid div {
  border-top: 2px solid #bfd080;
  padding-top: 12px;
}
.help-grid b {
  display: block;
  margin-bottom: 8px;
}
.help-grid p {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  color: #59694f;
}
.help-grid kbd {
  display: inline-block;
  border: 1px solid #9ca78c;
  box-shadow: 0 2px 0 #9ca78c;
  padding: 2px 5px;
  font: 700 12px Arial;
  background: #fffef8;
}
.results-screen {
  display: grid;
  place-items: center;
  background: #142a1f99;
  backdrop-filter: blur(4px);
}
.result-panel {
  width: 470px;
  background: #fff9e9;
  border: 2px solid #172d22;
  padding: 25px 30px;
  box-shadow: 7px 8px 0 #192e2270;
}
.result-panel h2 {
  font-family: Rush, "Arial Black", sans-serif;
  font-size: 32px;
  letter-spacing: -1px;
  font-weight: 900;
  margin: 10px 0;
}
.result-score {
  font-family: Rush, "Arial Black", sans-serif;
  font-weight: 900;
  letter-spacing: -5px;
  font-size: 84px;
  line-height: 1.1;
  margin-bottom: 16px;
}
.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 17px 0;
  border-top: 1px solid #b6c5a3;
  border-bottom: 1px solid #b6c5a3;
  text-align: center;
}
.result-stats div + div {
  border-left: 1px solid #b6c5a3;
}
.result-stats b {
  display: block;
  font-size: 27px;
  font-weight: 900;
}
.result-stats span {
  font-size: 10px;
  letter-spacing: 0.8px;
  font-weight: 800;
  color: #637353;
}
.result-panel p {
  font-size: 13px;
  line-height: 1.5;
  color: #5b684e;
}
.xp-box {
  padding: 14px;
  background: #e9edd6;
  margin: 12px 0;
}
.xp-box > div {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  gap: 10px;
}
.xp-box progress {
  width: 100%;
  height: 8px;
  accent-color: #558945;
  margin: 9px 0;
}
.xp-box small {
  font-size: 11px;
  color: #59644f;
}
#submit-status {
  min-height: 20px;
  font-size: 12px;
}
.replay-button {
  display: block;
  margin: 12px auto 0;
}
.toast {
  position: absolute;
  z-index: 40;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #182c22;
  color: #fff9e9;
  border: 1px solid #dcff48;
  padding: 13px 22px;
  max-width: 90%;
  font-size: 14px;
  text-align: center;
  box-shadow: 0 4px 20px #0004;
}
.paused-actions {
  display: grid;
  gap: 15px;
}
.paused-actions > button:not(.primary) {
  background: none;
  border: 1px solid #b1bd9b;
  padding: 12px;
  font-weight: bold;
}
.touch-steering,
.touch-delivery {
  display: flex;
  gap: 9px;
  align-items: flex-end;
}
#touch-controls {
  position: absolute;
  z-index: 7;
  bottom: 78px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
#touch-controls button {
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  background: #fff9e9ed;
  border: 2px solid #173422;
  color: #173422;
  min-width: 48px;
  height: 54px;
  font-size: 17px;
  font-weight: 900;
  border-radius: 9px;
  box-shadow: 0 3px 0 #11281a66;
}
#touch-controls .touch-throw {
  background: #dcff48;
  height: 72px;
  width: 80px;
  font-size: 12px;
}
#touch-controls .touch-boost {
  font-size: 10px;
  width: 52px;
}
#touch-controls [data-input="4"] {
  font-size: 10px;
}
#touch-controls .pressed {
  background: #9bbd4f;
  transform: translateY(2px);
}
.replay-banner {
  font-size: 13px;
  text-align: center;
  color: #637353;
  margin-bottom: 15px;
}
@media (min-height: 900px) {
  .home-content {
    margin-top: 30px;
  }
  h1 {
    font-size: 88px;
  }
  .intro {
    margin-bottom: 32px;
  }
}
@media (max-width: 1050px) {
  .home-content {
    margin-left: 5vw;
    width: 410px;
  }
  h1 {
    font-size: 64px;
  }
  .home-screen {
    background: linear-gradient(
      90deg,
      #fbf4e6 0%,
      #fbf4e6f5 32%,
      #fbf4e6cc 46%,
      transparent 72%
    );
  }
  .topbar {
    padding: 20px 28px;
  }
  .live-stats > div {
    padding: 9px 14px;
    min-width: 100px;
  }
  .next-order {
    right: 25px;
  }
}
@media (max-width: 700px) {
  #game-shell {
    min-height: 650px;
  }
  .topbar {
    height: 87px;
    padding: 15px 20px;
  }
  .wordmark {
    font-size: 14px;
  }
  .wordmark span {
    font-size: 29px;
  }
  .wordmark i {
    font-size: 20px;
  }
  .home-screen {
    align-items: flex-end;
    background: linear-gradient(
      0deg,
      #fbf4e6 0%,
      #fbf4e6 37%,
      #fbf4e6ef 51%,
      #fbf4e655 70%,
      transparent 85%
    );
  }
  .home-content {
    width: calc(100% - 40px);
    margin: 0 20px 25px;
  }
  .pill {
    font-size: 10px;
    letter-spacing: 1px;
    margin-bottom: 10px;
  }
  .sun-icon {
    font-size: 21px;
  }
  h1 {
    font-size: 49px;
    letter-spacing: -2.8px;
    line-height: 0.98;
    margin-bottom: 13px;
  }
  h1 br:first-child {
    display: block;
  }
  .intro {
    font-size: 14px;
    margin-bottom: 14px;
  }
  .start-card {
    width: 100%;
    padding: 14px;
  }
  .home-footer {
    width: 100%;
    font-size: 10px;
    margin-top: 16px;
  }
  .world-label {
    display: none;
  }
  .primary {
    font-size: 23px;
    padding: 13px 16px;
  }
  .live-stats {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 91px;
    justify-content: stretch;
  }
  .live-stats > div {
    flex: 1;
    min-width: 0;
    padding: 7px 11px;
  }
  .live-stats strong {
    font-size: 24px;
  }
  .live-stats small {
    font-size: 9px;
  }
  .live-stats .combo {
    min-width: 75px;
    flex: 0;
  }
  .next-order {
    top: 158px;
    left: 16px;
    right: auto;
    padding: 9px 11px;
    min-width: 160px;
  }
  .next-order strong {
    font-size: 12px;
    margin: 5px 0;
  }
  .next-order .eyebrow {
    font-size: 9px;
  }
  .next-order > span:last-of-type {
    font-size: 11px;
  }
  #rival-line {
    font-size: 10px;
    margin-top: 6px;
    padding-top: 6px;
    max-width: 180px;
  }
  .battery {
    left: 16px;
    bottom: 163px;
    padding: 8px;
    font-size: 10px;
    gap: 8px;
  }
  .battery meter {
    width: 70px;
  }
  .ride-bottom {
    left: 15px;
    right: 15px;
    bottom: 16px;
    padding: 11px;
    font-size: 10px;
  }
  #lives {
    font-size: 16px;
    letter-spacing: 2px;
  }
  .aim-help {
    bottom: 225px;
    max-width: 90%;
    font-size: 11px;
    padding: 8px 10px;
  }
  .feedback {
    font-size: 23px;
    top: 40%;
  }
  .modal-backdrop {
    padding: 12px;
  }
  .modal-panel {
    padding: 21px;
    max-height: 94dvh;
  }
  .modal-heading h2 {
    font-size: 27px;
  }
  .kit-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .kit-preview {
    height: 95px;
  }
  .kit-card {
    min-height: 165px;
  }
  .team-tabs button,
  .board-tabs button {
    font-size: 11px;
    padding: 9px 10px;
  }
  .result-panel {
    width: calc(100% - 32px);
    padding: 20px;
  }
  .result-score {
    font-size: 65px;
  }
  .result-panel h2 {
    font-size: 28px;
  }
  .result-stats {
    padding: 12px 0;
  }
  .result-panel .home-links {
    font-size: 10px;
  }
  .help-grid {
    gap: 15px;
  }
  .help-grid p {
    font-size: 13px;
  }
  .leader-table td {
    font-size: 12px;
  }
  .top-actions .icon-button {
    height: 40px;
    width: 40px;
  }
  body.riding .wordmark {
    box-shadow: 2px 2px 0 #182522;
    padding: 7px 10px;
  }
  .home-links button {
    font-size: 10px;
  }
  .identity-fields label {
    font-size: 10px;
  }
  .selected-kit b {
    font-size: 13px;
  }
  .toast {
    bottom: 16px;
    font-size: 12px;
  }
  .replay-button {
    margin-top: 7px;
  }
}
@media (max-height: 700px) and (min-width: 701px) {
  #game-shell {
    min-height: 560px;
  }
  .home-content {
    margin-top: 90px;
  }
  .pill {
    margin-bottom: 7px;
  }
  h1 {
    font-size: 50px;
    margin-bottom: 12px;
  }
  .intro {
    font-size: 14px;
    margin-bottom: 14px;
  }
  .start-card {
    padding: 13px;
  }
  .selected-kit {
    margin: 10px 0;
  }
  .home-footer {
    margin-top: 12px;
  }
  .home-links {
    margin-top: 12px;
  }
  .topbar {
    height: 80px;
  }
  .result-panel {
    padding: 15px 25px;
  }
  .result-score {
    font-size: 58px;
    margin-bottom: 9px;
  }
  .result-stats {
    padding: 9px 0;
  }
  .result-panel h2 {
    font-size: 27px;
    margin: 5px 0;
  }
  .xp-box {
    padding: 9px;
    margin: 8px 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

/* Keep each headline phrase intact and make short phone screens playable. */
h1 {
  white-space: nowrap;
  font-size: clamp(48px, 4.7vw, 70px);
}
@media (min-height: 900px) and (min-width: 701px) {
  h1 {
    font-size: 70px;
  }
}
@media (max-width: 700px) {
  h1 {
    font-size: clamp(33px, 10.2vw, 49px);
    line-height: 1;
    letter-spacing: -2px;
  }
  .wordmark {
    background: #fff9e9ed;
    padding: 7px 10px;
  }
  .kit-preview {
    max-width: 100%;
    object-fit: contain;
  }
  body.riding #game-shell {
    min-height: 0;
  }
  .feedback {
    max-width: 95%;
    font-size: clamp(15px, 5.5vw, 23px);
  }
}
@media (max-height: 720px) and (max-width: 700px) {
  .home-content {
    margin-bottom: 17px;
  }
  .intro {
    font-size: 13px;
  }
  .pill {
    margin-bottom: 8px;
  }
  .start-card {
    padding: 12px;
  }
  .selected-kit {
    margin: 11px 0;
  }
  .home-footer {
    margin-top: 12px;
  }
  .next-order {
    top: 148px;
    padding: 7px 10px;
  }
  .next-order .eyebrow {
    display: none;
  }
  #rival-line {
    display: none;
  }
  .next-order strong {
    margin: 2px 0 4px;
  }
  .aim-help {
    bottom: 174px;
    font-size: 10px;
  }
  .battery {
    bottom: 145px;
    padding: 5px 8px;
  }
  #touch-controls {
    bottom: 70px;
    left: 12px;
    right: 12px;
    gap: 8px;
  }
  .touch-steering,
  .touch-delivery {
    gap: 5px;
  }
  #touch-controls button {
    min-width: 43px;
    height: 48px;
  }
  #touch-controls .touch-throw {
    width: 68px;
    height: 64px;
  }
  #touch-controls .touch-boost {
    width: 43px;
  }
  .result-panel {
    max-height: calc(100dvh - 24px);
    overflow: auto;
    padding: 15px 20px;
  }
  .result-score {
    font-size: 53px;
    margin-bottom: 10px;
  }
  .result-panel h2 {
    font-size: 25px;
  }
}
@media (max-height: 500px) and (min-width: 701px) {
  body.riding #game-shell {
    min-height: 0;
  }
  .next-order {
    top: 98px;
    padding: 10px;
  }
  .aim-help {
    bottom: 70px;
  }
  .battery {
    bottom: 70px;
    padding: 8px;
  }
  .ride-bottom {
    bottom: 12px;
    padding: 8px 16px;
  }
  .result-panel {
    max-height: 95dvh;
    overflow: auto;
  }
}

/* Halloween Havoc: warm lamps, purple night and clear, bright gameplay markers. */
body {
  background: #241b34;
}
.home-screen {
  color: #fff2dc;
  background: linear-gradient(
    90deg,
    #21172f 0%,
    #21172ffb 28%,
    #21172feb 38%,
    #21172f90 50%,
    transparent 68%
  );
}
.home-content {
  width: 530px;
}
h1 {
  font-size: clamp(47px, 4.6vw, 65px);
  letter-spacing: -3.4px;
}
h1 em {
  color: #ffa34d;
}
.home-screen .pill {
  color: #eac8ff;
  font-size: 11px;
  letter-spacing: 1.1px;
}
.home-screen .intro {
  color: #dccfdf;
  font-size: 15px;
  line-height: 1.6;
}
.home-screen .start-card {
  color: #241b34;
  background: #fff5e6;
  border-color: #a884ab;
  box-shadow: 5px 6px 0 #b274b02b;
}
.home-screen .home-footer {
  color: #d2bdd7;
}
.wordmark {
  background: #fff3e4;
  padding: 10px 13px;
  box-shadow: 3px 4px 0 #130d2040;
}
.wordmark i,
.sun-icon {
  color: #f58c3f;
}
.primary {
  background: #ffb25b;
  border-color: #2d1c37;
  box-shadow: 3px 4px 0 #2d1c37;
  color: #2d1c37;
  font-size: 22px;
}
.primary:hover {
  background: #ffc279;
}
.live-stats .combo {
  background: #d7ff74;
}
.rush-stage {
  position: absolute;
  top: 113px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 13px;
  background: #30203fe8;
  border: 1px solid #c9a4e1;
  color: #f8dfbc;
  font-size: 11px;
  letter-spacing: 1px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}
.rush-stage[data-stage="1"] {
  border-color: #ffbc64;
  color: #ffcb86;
}
.rush-stage[data-stage="2"] {
  background: #51293c;
  color: #ffcf99;
  border-color: #ff9f6d;
}
.challenge-panel {
  position: absolute;
  right: 32px;
  top: 310px;
  width: 200px;
  background: #281e37ed;
  color: #f8ecdd;
  border: 1px solid #7d638f;
  padding: 12px 13px;
  box-shadow: 3px 4px 0 #140d2040;
}
.challenge-panel > small {
  font-size: 9px;
  letter-spacing: 1px;
  color: #cfb4e0;
  font-weight: 800;
  display: block;
  margin-bottom: 9px;
}
.challenge-panel > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  line-height: 1.7;
  gap: 8px;
}
.challenge-panel b {
  color: #ffbc6e;
  font-size: 12px;
  white-space: nowrap;
}
.challenge-panel .complete b {
  color: #cfff83;
}
.challenge-panel .complete span {
  color: #c0d79a;
}
.order-timer {
  font-size: 11px;
  background: #ffe0b1;
  color: #6f371a;
  font-weight: 800;
  padding: 7px;
  margin-top: 8px;
  border-left: 3px solid #e67c36;
}
#miss-streak.danger {
  color: #ffc16d;
  text-decoration: underline;
  text-underline-offset: 3px;
}
#feedback {
  font-size: clamp(17px, 2.1vw, 30px);
  color: #ffd18c;
  max-width: 94%;
  text-align: center;
  white-space: normal;
}
.modal-backdrop {
  background: #150d24d9;
}
.modal-panel,
.result-panel {
  border-color: #392345;
  background: #fff3e4;
  color: #2d2235;
}
.results-screen {
  background: #160d239e;
}
.result-panel {
  max-height: calc(100dvh - 28px);
  overflow: auto;
}
.result-challenges {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin: 10px 0;
}
.result-challenges span {
  font-size: 10px;
  background: #e8dce9;
  color: #675471;
  padding: 6px 8px;
  border: 1px solid #d1bfd7;
}
.result-challenges .earned {
  background: #e5f3b2;
  color: #355329;
  border-color: #b7cc85;
}
.top-actions {
  gap: 8px;
}
body.bright-street .home-screen {
  background: linear-gradient(
    90deg,
    #2a2036 0%,
    #2a2036f8 28%,
    #2a2036d9 38%,
    #2a203660 50%,
    transparent 68%
  );
}
@media (min-height: 900px) and (min-width: 701px) {
  h1 {
    font-size: 65px;
  }
}
@media (max-width: 1050px) {
  .home-content {
    width: 480px;
  }
  h1 {
    font-size: 57px;
  }
  .challenge-panel {
    right: 25px;
  }
}
@media (max-width: 700px) {
  .home-screen,
  body.bright-street .home-screen {
    background: linear-gradient(
      0deg,
      #21172f 0%,
      #21172f 37%,
      #21172ff5 51%,
      #21172f80 70%,
      transparent 89%
    );
  }
  .home-content {
    width: calc(100% - 40px);
  }
  h1 {
    font-size: clamp(28px, 9.2vw, 47px);
    letter-spacing: -1.8px;
    line-height: 1.02;
  }
  .home-screen .intro {
    font-size: 12px;
  }
  .home-screen .pill {
    font-size: 9px;
    letter-spacing: 0.5px;
  }
  .primary {
    font-size: 21px;
  }
  .rush-stage {
    top: 160px;
    right: 16px;
    left: auto;
    transform: none;
    max-width: 145px;
    padding: 8px;
    font-size: 9px;
    letter-spacing: 0.3px;
    white-space: normal;
  }
  .next-order {
    min-width: 0;
    width: 180px;
    max-width: 49%;
  }
  .next-order strong {
    font-size: 11px;
  }
  .order-timer {
    font-size: 9px;
    padding: 5px;
  }
  .challenge-panel {
    top: auto;
    bottom: 163px;
    right: 16px;
    width: 153px;
    padding: 8px 10px;
  }
  .challenge-panel > small {
    font-size: 8px;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
  }
  .challenge-panel > div {
    font-size: 10px;
    line-height: 1.6;
  }
  .challenge-panel b {
    font-size: 10px;
  }
  .battery {
    max-width: calc(100% - 185px);
    gap: 5px;
  }
  .battery meter {
    width: 50px;
  }
  .wordmark {
    font-size: 13px;
  }
  .wordmark span {
    font-size: 27px;
  }
  .topbar {
    padding-left: 16px;
    padding-right: 16px;
  }
  .ride-bottom {
    font-size: 9px;
    gap: 5px;
    padding: 11px 9px;
  }
  #lives {
    font-size: 14px;
    white-space: nowrap;
  }
  #aim-help {
    bottom: 254px;
    font-size: 10px;
    white-space: normal;
    text-align: center;
    width: max-content;
    max-width: 90%;
  }
  #feedback {
    top: 43%;
    font-size: 18px;
    width: 92%;
  }
}
@media (max-width: 700px) and (max-height: 720px) {
  .rush-stage {
    top: 151px;
  }
  .challenge-panel {
    bottom: 145px;
    padding: 6px 9px;
  }
  .battery {
    bottom: 145px;
  }
  #aim-help {
    bottom: 224px;
  }
  .home-screen .intro {
    font-size: 11px;
  }
  .home-screen .pill {
    font-size: 8px;
  }
  .result-challenges {
    margin: 5px 0;
  }
  .result-challenges span {
    font-size: 9px;
    padding: 4px;
  }
}
@media (max-height: 500px) and (min-width: 701px) {
  .challenge-panel {
    top: 250px;
    padding: 8px;
  }
  .rush-stage {
    top: 94px;
  }
  .next-order {
    top: 125px;
  }
  #rival-line {
    display: none;
  }
}

.season-rule {
  font-size: 11px;
  color: #ffcd95;
  margin: -12px 0 20px;
  line-height: 1.5;
}
@media (max-width: 700px) {
  .season-rule {
    font-size: 10px;
    margin: -5px 0 12px;
  }
}
