:root {
  --blue: #203a50;
  --yellow: #f7d64b;
  --paper: #fff5db;
  --orange: #f06c2b;
  --muted: #69736d;
  font-family: "DM Sans", Arial, sans-serif;
  color: var(--blue);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
}
button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid #ce5725;
  outline-offset: 4px;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
}
button {
  touch-action: manipulation;
}
[hidden] {
  display: none !important;
}
.topbar {
  height: 78px;
  background: var(--blue);
  color: var(--paper);
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 0 34px;
  border-bottom: 4px solid #132c40;
}
.brand {
  display: flex;
  text-decoration: none;
  align-items: center;
  gap: 8px;
  transform: rotate(-3deg);
}
.brand > span {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-style: italic;
  font-weight: 800;
  font-size: 38px;
  letter-spacing: -1px;
  line-height: 1;
}
.brand .box {
  color: var(--yellow);
}
.brand b {
  background: var(--yellow);
  color: var(--blue);
  padding: 3px 5px;
  font-size: 13px;
  align-self: flex-start;
  transform: rotate(7deg);
  border-radius: 3px;
}
.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}
.header-actions button {
  background: none;
  color: var(--paper);
  border: 0;
  font-size: 10px;
}
.header-actions .about-button {
  width: 28px;
  height: 28px;
  border: 1px solid #fff4;
  border-radius: 50%;
  font-size: 15px;
}
.workshop {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  min-height: 650px;
  height: calc(100dvh - 117px);
  max-height: 1100px;
}
.stage {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #d0b28c;
  touch-action: none;
  isolation: isolate;
}
.stage > canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.scene-top {
  position: absolute;
  top: 24px;
  left: 27px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}
.scene-tools {
  display: flex;
  gap: 7px;
  pointer-events: auto;
}
.scene-tools button {
  border: 1px solid #85674f40;
  border-radius: 5px;
  background: #fff7e1df;
  padding: 8px 10px;
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 10px;
}
.scene-tools svg {
  width: 14px;
  height: 14px;
  stroke-width: 1.5;
}
.scene-bottom {
  position: absolute;
  bottom: 20px;
  left: 25px;
  right: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  color: #554735;
  pointer-events: none;
}
.scene-bottom button {
  border: 0;
  background: #fff5dbcf;
  padding: 7px 10px;
  border-radius: 3px;
  font-size: 9px;
  pointer-events: auto;
}
.build-panel {
  background: var(--paper);
  border-left: 1px solid #b3a78a;
  padding: 25px 23px 18px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  gap: 0;
  z-index: 2;
}
.panel-top h2 {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-style: italic;
  font-weight: 800;
  font-size: 37px;
  line-height: 0.96;
  letter-spacing: -0.4px;
  margin: 10px 0 10px;
}
.course-picker {
  padding: 0;
  margin: 0;
  border: 0;
}
.course-picker legend {
  padding: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
}
.course {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fffaf0;
  border: 1px solid #c4bfa9;
  border-bottom-width: 3px;
  border-radius: 6px;
  padding: 10px 9px;
  text-align: left;
  margin-bottom: 9px;
  transition: transform 0.15s;
}
.course:hover:not(:disabled) {
  transform: translateY(-2px);
}
.course.selected {
  background: #f9de77;
  border-color: #aa8b42;
}
.course > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.course b {
  font-size: 11px;
}
.course small {
  font-size: 8px;
  line-height: 1.4;
  color: #6d6d5d;
}
.course-art {
  width: 58px;
  height: 34px;
  flex-shrink: 0;
  background: #f7a9614d;
  border-radius: 3px;
  display: grid;
  place-items: center;
}
.course-art svg {
  width: 54px;
  height: 30px;
  stroke: #a54b25;
  stroke-width: 2;
  fill: none;
}
.course-art .flight-path {
  stroke-dasharray: 3 3;
  stroke-width: 1;
  stroke: #617b7c;
}
.wall-art {
  background: #add2b158;
}
.wall-art svg {
  stroke: #3f7862;
}
.book-art {
  background: #bbc3e366;
}
.book-art svg {
  stroke: #566999;
}
.tuning {
  margin-top: 14px;
}
.tune-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 600;
}
.tune-label output {
  font-size: 13px;
  font-weight: 800;
}
.tuning input {
  width: 100%;
  margin: 13px 0 6px;
  accent-color: var(--orange);
  cursor: pointer;
  height: 15px;
}
kbd {
  display: inline-block;
  font:
    8px "DM Sans",
    sans-serif;
  border: 1px solid #71816d70;
  padding: 2px 3px;
  border-radius: 3px;
  margin-left: 3px;
}
footer {
  height: 39px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 26px;
  border-top: 1px solid #d5cab0;
  color: #8a806c;
  font-size: 8px;
}
footer button {
  font-size: 9px;
  border: 0;
  background: none;
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.trick-label {
  position: absolute;
  left: 0;
  right: 0;
  top: 70px;
  display: flex;
  align-items: center;
  flex-direction: column;
  pointer-events: none;
  text-align: center;
}
.trick-label strong {
  font:
    italic 800 clamp(35px, 4vw, 64px)/1 "Barlow Condensed",
    Impact,
    sans-serif;
  color: #fff7dd;
  text-shadow: 2px 3px 0 #203a50b0;
  letter-spacing: 0.3px;
  margin: 12px 0 8px;
}
.result {
  position: absolute;
  bottom: 61px;
  left: 50%;
  transform: translateX(-50%) rotate(-1deg);
  width: 430px;
  max-width: calc(100% - 35px);
  padding: 21px 24px 17px;
  background: var(--paper);
  border: 2px solid var(--blue);
  border-radius: 10px;
  box-shadow: 6px 7px 0 #203a5060;
}
.result h2 {
  font:
    italic 800 36px/0.95 "Barlow Condensed",
    Impact,
    sans-serif;
  margin: 0 0 9px;
}
.result > p {
  font-size: 10px;
  line-height: 1.5;
  margin: 0;
  color: #697263;
}
.result-numbers {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 11px 0;
}
.result-numbers b {
  font:
    italic 800 36px/1 "Barlow Condensed",
    Impact,
    sans-serif;
}
.result-numbers span {
  font-size: 9px;
}
.result-numbers span:last-child {
  margin-left: auto;
  color: #9a6b31;
}
.result-buttons {
  display: flex;
  gap: 6px;
  border-top: 1px solid #d0c5a7;
  padding-top: 12px;
}
.result-buttons button {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 5px 0;
  font-size: 9px;
  font-weight: 600;
}
.result-buttons button:last-child {
  background: var(--yellow);
  padding: 8px 5px;
  border: 1px solid #ba9e48;
  border-radius: 4px;
}
.loading {
  position: absolute;
  inset: 0;
  background: #ded0b5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 15px;
  z-index: 5;
}
.loading strong {
  font-size: 14px;
}
.webgl-error {
  position: absolute;
  inset: 0;
  z-index: 7;
  background: var(--paper);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 30px;
  text-align: center;
}
.webgl-error h1 {
  font-size: 28px;
  max-width: 450px;
}
.webgl-error p {
  font-size: 13px;
  max-width: 400px;
}
dialog {
  width: 570px;
  max-width: calc(100vw - 28px);
  max-height: 90dvh;
  background: var(--paper);
  color: var(--blue);
  border: 2px solid var(--blue);
  border-radius: 12px;
  padding: 35px;
  box-shadow: 7px 8px 0 #142c4090;
}
dialog::backdrop {
  background: #1a304f90;
  backdrop-filter: blur(5px);
}
dialog .close {
  position: absolute;
  right: 12px;
  top: 10px;
  font-size: 27px;
  background: none;
  border: 0;
}
dialog h2 {
  font:
    italic 800 48px/0.95 "Barlow Condensed",
    Impact,
    sans-serif;
  margin: 20px 0;
}
dialog p {
  font-size: 12px;
  line-height: 1.8;
}
dialog .fine-print {
  font-size: 9px;
  color: #6f786b;
  margin-top: 25px;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 12px);
  background: var(--blue);
  color: var(--paper);
  padding: 14px 20px;
  font-size: 11px;
  border-radius: 6px;
  opacity: 0;
  transition: 0.2s;
  pointer-events: none;
  z-index: 20;
  max-width: 90vw;
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.scene-top {
  justify-content: flex-end;
}
.panel-top h2 {
  font:
    600 22px "DM Sans",
    sans-serif;
}
.trick-label strong {
  font:
    600 13px "DM Sans",
    sans-serif;
  background: #fff5dbe6;
  color: var(--blue);
  padding: 8px 12px;
  border-radius: 5px;
  text-shadow: none;
  margin: 0;
}
.trick-label strong:empty,
.result > p:empty {
  display: none;
}
footer {
  font-size: 9px;
}
dialog h2 {
  font-size: 36px;
  font-style: normal;
}
/* Manual driving: the stage owns the controls, so touch players never scroll to steer. */
.workshop {
  grid-template-columns: minmax(0, 1fr) 300px;
  min-height: 680px;
}
.build-panel {
  padding: 20px;
  gap: 0;
}
.panel-top h2 {
  font-size: 32px;
  margin: 0 0 14px;
}
.course {
  padding: 9px;
  margin-bottom: 7px;
}
.course b {
  font-size: 13px;
}
.course small {
  font-size: 10px;
}
.course-art {
  width: 47px;
}
.course-goal {
  font-size: 12px;
  line-height: 1.5;
  margin: 12px 0;
  color: #425a61;
}
.control-note {
  font-size: 11px;
  line-height: 1.6;
  margin: 14px 0;
  color: #53656b;
}
.tune-label {
  font-size: 12px;
}
.tuning {
  margin: 0 0 7px;
}
.tuning input {
  margin: 9px 0;
}
.run-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 7px 0 16px;
}
.run-actions > button {
  background: var(--blue);
  color: var(--paper);
  border: 0;
  border-bottom: 3px solid #122b3d;
  border-radius: 5px;
  padding: 10px 12px;
  font-weight: 700;
  font-size: 12px;
}
.run-actions > span {
  font-size: 11px;
  text-align: right;
}
.run-actions b {
  font-size: 17px;
}
.run-actions small {
  display: block;
  font-size: 9px;
  color: #768075;
}
.wall-actions {
  display: flex;
  gap: 7px;
  margin-top: 4px;
}
.wall-actions button {
  font-size: 11px;
  padding: 10px 8px;
  border: 1px solid #a9ad94;
  border-radius: 4px;
  background: #dfebd3;
  flex: 1;
}
.wall-actions button[aria-pressed="true"] {
  background: var(--yellow);
  border-color: #8c762f;
}
.scene-top {
  top: 16px;
  left: 18px;
  right: 18px;
  z-index: 3;
}
.scene-top > button {
  pointer-events: auto;
  border: 1px solid #85674f40;
  border-radius: 5px;
  background: #fff7e1df;
  padding: 8px 10px;
  font-size: 11px;
}
.scene-tools button {
  font-size: 11px;
}
.telemetry {
  position: absolute;
  top: 65px;
  left: 18px;
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: 11px;
  color: var(--blue);
  padding: 8px 12px;
  border-radius: 4px;
  background: #fff5dbe0;
  pointer-events: none;
}
.telemetry span > b {
  font-size: 19px;
}
.telemetry label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.telemetry meter {
  width: 65px;
  height: 13px;
  accent-color: var(--orange);
}
.telemetry label > b {
  font-size: 10px;
  min-width: 31px;
}
.drive-deck {
  position: absolute;
  bottom: 43px;
  left: 18px;
  right: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
  z-index: 2;
}
.drive-deck button {
  pointer-events: auto;
  background: #fff5dbef;
  color: var(--blue);
  border: 1px solid #7c7c6990;
  border-bottom: 4px solid #66766a;
  border-radius: 7px;
  min-width: 55px;
  min-height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  padding: 7px 9px;
}
.drive-deck button.pressed,
.drive-deck button:active {
  transform: translateY(3px);
  border-bottom-width: 1px;
  background: #f7d64b;
}
.drive-deck kbd {
  border: 0;
  font-size: 17px;
  padding: 0;
  margin: 0;
  line-height: 1.1;
}
.drive-deck button span {
  font-size: 10px;
  font-weight: 700;
}
.direction-pad {
  display: flex;
  align-items: flex-end;
  gap: 5px;
}
.direction-pad > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.drive-deck .gas {
  background: #dfebd3;
}
.stunt-pad {
  display: flex;
  gap: 6px;
}
.stunt-pad button {
  min-width: 69px;
  min-height: 69px;
  background: var(--yellow);
}
.stunt-pad .jet {
  background: var(--orange);
  color: var(--paper);
}
.stunt-pad button span {
  font:
    italic 800 24px/1 "Barlow Condensed",
    Impact,
    sans-serif;
}
.stunt-pad kbd {
  font-size: 9px;
}
.scene-bottom {
  bottom: 13px;
  left: 18px;
  right: 18px;
  font-size: 10px;
}
.scene-bottom button {
  font-size: 10px;
}
.trick-label {
  top: 112px;
}
.trick-label strong {
  font-size: 32px;
}
.result {
  bottom: 188px;
  padding: 17px 20px 14px;
  width: 430px;
  z-index: 3;
}
.result h2 {
  font-size: 34px;
}
.result > p {
  font-size: 11px;
}
.result-numbers {
  margin: 8px 0;
}
.result-numbers b {
  font-size: 33px;
}
.result-numbers span {
  font-size: 10px;
}
.result-buttons {
  padding-top: 8px;
  margin-top: 9px;
}
.result-buttons button {
  font-size: 10px;
  min-height: 32px;
}
.result #score-breakdown {
  font-size: 10px;
  color: #66756e;
}
#score-form {
  display: flex;
  gap: 7px;
  margin-top: 12px;
}
#score-form input {
  min-width: 0;
  width: 100%;
  border: 1px solid #a9ad94;
  border-radius: 4px;
  background: #fffaf0;
  font-size: 12px;
  padding: 8px;
}
#score-form button {
  white-space: nowrap;
  border: 1px solid #627769;
  background: #dfebd3;
  border-radius: 4px;
  font-size: 11px;
  padding: 8px;
}
#post-status {
  margin-top: 7px;
  font-size: 10px;
}
.inspecting #result,
.inspecting #telemetry,
.inspecting #trick-label,
.inspecting #drive-deck {
  display: none !important;
}
.exporting #drive-deck,
.exporting #telemetry {
  display: none !important;
}
.exporting canvas {
  object-fit: contain;
  background: var(--blue);
}
.leaderboard {
  margin-top: auto;
  border-top: 1px solid #cfc7aa;
  padding-top: 14px;
}
.leaderboard > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.leaderboard h2 {
  font:
    italic 800 25px/1 "Barlow Condensed",
    Impact,
    sans-serif;
  margin: 0;
}
.leaderboard button {
  background: none;
  border: 0;
  font-size: 20px;
  padding: 0 5px;
}
.leaderboard > p {
  font-size: 11px;
  line-height: 1.4;
  color: #65756e;
  margin: 7px 0;
}
.leaderboard ol {
  margin: 8px 0;
  padding-left: 22px;
  font-size: 12px;
}
.leaderboard li {
  padding: 4px 0;
}
.leaderboard li > span {
  display: inline-block;
  width: calc(100% - 58px);
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}
.leaderboard li > b {
  display: inline-block;
  width: 53px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.leaderboard #personal-best {
  color: var(--blue);
  font-weight: 700;
}
.header-actions button {
  font-size: 12px;
}
kbd {
  font-size: 10px;
}
dialog {
  max-height: 85dvh;
  overflow: auto;
}
dialog p {
  font-size: 13px;
  line-height: 1.6;
}
@media (max-width: 900px) and (min-width: 701px) {
  .workshop {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
  .build-panel {
    padding: 16px;
  }
  .drive-deck {
    left: 10px;
    right: 10px;
    gap: 5px;
  }
  .drive-deck button {
    min-width: 44px;
    padding: 6px;
  }
  .stunt-pad button {
    min-width: 58px;
  }
  .telemetry {
    gap: 10px;
    left: 10px;
  }
}
@media (max-width: 700px) {
  .topbar {
    height: 60px;
    padding: 0 18px;
  }
  .brand > span {
    font-size: 30px;
  }
  .workshop {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    max-height: none;
  }
  .stage {
    height: 62dvh;
    min-height: 460px;
    max-height: 740px;
    flex: none;
  }
  .build-panel {
    padding: 16px;
    border-left: 0;
    border-top: 1px solid #b3a78a;
    display: block;
    overflow: visible;
  }
  .panel-top h2 {
    font-size: 27px;
    margin: 0 0 10px;
  }
  .course-picker {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .course {
    flex-direction: row;
    justify-content: center;
    padding: 9px 4px;
    margin: 0;
    gap: 4px;
    min-height: 54px;
  }
  .course-art {
    display: none;
  }
  .course b {
    font-size: 12px;
  }
  .course small {
    display: none;
  }
  .course-goal {
    margin: 10px 0 7px;
    font-size: 12px;
  }
  .control-note {
    font-size: 11px;
    margin: 8px 0;
    line-height: 1.5;
  }
  .control-note br {
    display: none;
  }
  .run-actions {
    margin: 9px 0 14px;
  }
  .leaderboard {
    padding-top: 12px;
  }
  .leaderboard ol {
    columns: 2;
    column-gap: 35px;
  }
  .leaderboard li {
    break-inside: avoid;
  }
  .scene-top {
    left: 12px;
    right: 12px;
    top: 12px;
  }
  .telemetry {
    left: 12px;
    top: 56px;
    gap: 12px;
    padding: 6px 9px;
    font-size: 10px;
  }
  .telemetry meter {
    width: 49px;
  }
  .telemetry span > b {
    font-size: 17px;
  }
  .drive-deck {
    left: 10px;
    right: 10px;
    bottom: 39px;
    gap: 5px;
  }
  .drive-deck button {
    min-width: 45px;
    min-height: 45px;
    padding: 5px 6px;
  }
  .drive-deck button span {
    font-size: 8px;
  }
  .drive-deck kbd {
    font-size: 16px;
  }
  .stunt-pad button {
    min-width: 62px;
    min-height: 62px;
  }
  .stunt-pad button span {
    font-size: 22px;
  }
  .stunt-pad kbd {
    font-size: 8px;
  }
  .scene-bottom {
    left: 10px;
    right: 10px;
    bottom: 10px;
    font-size: 8px;
  }
  .scene-bottom button {
    font-size: 9px;
  }
  .trick-label {
    top: 94px;
  }
  .trick-label strong {
    font-size: 27px;
  }
  .result {
    bottom: 157px;
    max-width: calc(100% - 24px);
    padding: 13px 16px 10px;
  }
  .result h2 {
    font-size: 29px;
  }
  .result-numbers b {
    font-size: 29px;
  }
  .result-numbers span {
    font-size: 9px;
  }
  .result-buttons button {
    font-size: 9px;
  }
  footer {
    font-size: 8px;
    padding: 0 16px;
    height: 36px;
  }
  .tuning {
    margin-top: 10px;
  }
  .tuning input {
    height: 20px;
  }
  .wall-actions {
    margin-top: 10px;
  }
  .leaderboard #board-status {
    font-size: 11px;
  }
}
@media (max-width: 360px) {
  .drive-deck button {
    min-width: 39px;
    padding: 5px 3px;
  }
  .stunt-pad button {
    min-width: 56px;
  }
  .telemetry {
    gap: 7px;
  }
  .telemetry meter {
    width: 40px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.drive-deck kbd {
  display: block !important;
}
.direction-pad > button kbd,
.direction-pad > div > button kbd {
  font-size: 18px !important;
}
@media (max-width: 700px) {
  .course {
    min-height: 54px;
    height: auto;
  }
  .stunt-pad kbd {
    font-size: 8px !important;
  }
}

@media (max-width: 700px) {
  .panel-top {
    display: none;
  }
}

/* Result card: retry is the primary action */
.result-buttons {
  align-items: center;
  gap: 8px;
}
.result-buttons button:last-child {
  background: transparent;
  border: 0;
  padding: 5px 0;
}
.result-buttons .primary-retry {
  flex: 1.5;
  padding: 11px 8px;
  background: var(--blue);
  color: var(--paper);
  border: 0;
  border-bottom: 3px solid #122b3d;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
}
.primary-retry kbd {
  margin-left: 4px;
  opacity: 0.75;
}
.primary-retry:disabled {
  opacity: 0.5;
}

/* Wall actions sit beside telemetry, away from the car, track and drive deck. */
.stage .wall-actions {
  position: absolute;
  top: 65px;
  right: 18px;
  margin: 0;
  gap: 6px;
  z-index: 3;
  pointer-events: none;
}
.stage .wall-actions[hidden] {
  display: none;
}
.stage .wall-actions button {
  pointer-events: auto;
  width: 104px;
  min-height: 42px;
  padding: 7px 10px;
  border-bottom: 3px solid #66766a;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  background: #dfebd3f2;
  touch-action: manipulation;
}
.stage .wall-actions kbd {
  border: 0;
  margin: 0;
  padding: 0;
  font-size: 15px;
  line-height: 1.1;
}
.stage .wall-actions button:active {
  transform: translateY(3px);
  border-bottom-width: 1px;
}
.stage .wall-actions button[aria-pressed="true"] {
  background: var(--yellow);
}
.stage .wall-actions button:disabled {
  opacity: 0.55;
}
.inspecting .wall-actions,
.exporting .wall-actions {
  display: none;
}
@media (max-width: 900px) {
  .stage .wall-actions {
    top: 56px;
    right: 12px;
    gap: 4px;
  }
  .stage .wall-actions button {
    width: 44px;
    min-height: 45px;
    padding: 5px 3px;
    flex-direction: column;
    gap: 2px;
    font-size: 9px;
  }
}
@media (max-width: 360px) {
  .stage .wall-actions {
    gap: 3px;
  }
  .stage .wall-actions button {
    width: 40px;
    padding-inline: 2px;
  }
}

/* Mobile leaderboard: one vertical ranked list */
@media (max-width: 700px) {
  .leaderboard ol {
    columns: 1;
    list-style: none;
    padding: 0;
    margin: 8px 0;
    counter-reset: rank;
    border: 1px solid #cfc7aa;
    border-radius: 6px;
    background: #fff7e1;
    font-size: 14px;
  }
  .leaderboard ol:empty {
    display: none;
  }
  .leaderboard li {
    counter-increment: rank;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-top: 1px solid #e3dcc4;
  }
  .leaderboard li:first-child {
    border-top: 0;
  }
  .leaderboard li::before {
    content: counter(rank);
    flex: none;
    width: 24px;
    text-align: center;
    font-weight: 800;
    color: #768075;
    font-variant-numeric: tabular-nums;
  }
  .leaderboard li:nth-child(-n + 3)::before {
    color: var(--blue);
  }
  .leaderboard li:first-child {
    background: #f7e9a8;
  }
  .leaderboard li > span {
    flex: 1;
    width: auto;
    min-width: 0;
  }
  .leaderboard li > b {
    flex: none;
    width: auto;
  }
}
