: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;
}
.launch-area {
  margin-top: auto;
  padding-top: 14px;
}
.launch-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 19px;
  border: 2px solid var(--blue);
  border-bottom-width: 5px;
  border-radius: 7px;
  background: var(--orange);
  color: var(--paper);
  touch-action: none;
  user-select: none;
}
.launch-button > span {
  font:
    italic 800 34px/1 "Barlow Condensed",
    Impact,
    sans-serif;
  letter-spacing: 0.4px;
}
.launch-button > svg {
  width: 24px;
  height: 24px;
}
.launch-button:hover {
  background: #fa7a36;
}
.launch-button.charging {
  background: var(--yellow);
  color: var(--blue);
  transform: translateY(3px);
  border-bottom-width: 2px;
}
.launch-area > p {
  font-size: 8px;
  line-height: 1.5;
  color: #8b7c65;
  text-align: center;
  margin: 9px 0 0;
}
.air-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.air-actions button {
  border: 1px solid #607384;
  border-bottom-width: 3px;
  background: #dce7dd;
  font-size: 10px;
  border-radius: 5px;
  padding: 12px 4px;
  font-weight: 700;
}
.air-actions button:first-child {
  background: var(--yellow);
}
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;
}
.charge-meter {
  position: absolute;
  left: 50%;
  bottom: 58px;
  transform: translateX(-50%);
  background: var(--paper);
  padding: 14px 17px;
  border-radius: 8px;
  border: 2px solid var(--blue);
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 330px;
  box-shadow: 4px 4px 0 #203a5050;
}
.charge-meter > span {
  font-size: 10px;
  font-weight: 600;
}
.charge-meter > div {
  height: 14px;
  width: 150px;
  background: #d9d4c2;
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}
.charge-meter i {
  height: 100%;
  display: block;
  background: var(--orange);
  width: 0;
}
.charge-meter > strong {
  font-size: 13px;
}
.charge-meter b {
  position: absolute;
  left: 65%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--blue);
}
.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);
}
@media (min-height: 900px) and (min-width: 851px) {
  .build-panel {
    padding-top: 35px;
  }
  .panel-top h2 {
    font-size: 45px;
  }
  .course {
    padding: 15px 9px;
    margin-bottom: 12px;
  }
  .tuning {
    margin-top: 25px;
  }
  .launch-area {
    padding-top: 30px;
  }
  .launch-button {
    padding: 18px 19px;
  }
}
@media (max-width: 1100px) {
  .workshop {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
  .build-panel {
    padding-left: 17px;
    padding-right: 17px;
  }
  .scene-tools button {
    padding: 7px;
  }
  .scene-top {
    left: 17px;
    right: 17px;
  }
  .scene-tools #inspect {
    display: none;
  }
}
@media (max-width: 850px) {
  .topbar {
    height: 66px;
    padding: 0 18px;
    gap: 20px;
  }
  .brand > span {
    font-size: 33px;
  }
  .workshop {
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: none;
    min-height: 0;
  }
  .stage {
    height: 58dvh;
    min-height: 400px;
    max-height: 600px;
  }
  .scene-top {
    top: 15px;
    left: 15px;
    right: 15px;
  }
  .build-panel {
    padding: 18px;
    border-left: 0;
    border-top: 2px solid var(--blue);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 20px;
    overflow: visible;
  }
  .panel-top {
    display: none;
  }
  .course-picker {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .course-picker legend {
    font-size: 10px;
    margin-bottom: 0;
    padding-bottom: 10px;
  }
  .course {
    height: 75px;
    margin: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 7px;
    gap: 4px;
    position: relative;
  }
  .course-art {
    height: 27px;
    width: 48px;
  }
  .course-art svg {
    width: 43px;
    height: 25px;
  }
  .course > span:nth-child(2) {
    gap: 0;
  }
  .course b {
    font-size: 9px;
  }
  .course small {
    display: none;
  }
  .tuning {
    margin: 0;
  }
  .tune-label {
    font-size: 9px;
  }
  .launch-area {
    padding-top: 0;
    align-self: center;
    margin: 0;
  }
  .launch-button {
    padding: 14px 13px;
  }
  .launch-button > span {
    font-size: 31px;
  }
  .launch-button > svg {
    width: 20px;
  }
  .launch-area > p {
    font-size: 8px;
    line-height: 1.5;
    max-width: 165px;
    margin: 8px auto 0;
  }
  .air-actions {
    gap: 5px;
  }
  .air-actions button {
    font-size: 9px;
    padding: 10px 2px;
  }
  kbd {
    display: none;
  }
  .scene-bottom {
    bottom: 13px;
    left: 15px;
    right: 15px;
    font-size: 8px;
  }
  .scene-bottom #stage-hint {
    max-width: 220px;
  }
  .scene-bottom button {
    font-size: 8px;
  }
  .trick-label {
    top: 62px;
  }
  .trick-label strong {
    font-size: 40px;
  }
  .result {
    bottom: 50px;
    padding: 18px;
    max-width: calc(100% - 28px);
    width: 400px;
  }
  .result h2 {
    font-size: 32px;
  }
  .result > p {
    font-size: 9px;
  }
  .result-numbers {
    margin: 8px 0;
  }
  .result-numbers b {
    font-size: 30px;
  }
  .result-buttons {
    padding-top: 8px;
  }
  .result-buttons button {
    font-size: 8px;
  }
  .charge-meter {
    min-width: 280px;
    padding: 11px;
    gap: 9px;
    bottom: 46px;
  }
  .charge-meter > span {
    font-size: 9px;
  }
  .charge-meter > div {
    width: 115px;
  }
  footer {
    height: auto;
    min-height: 60px;
    flex-wrap: wrap;
    padding: 13px 18px;
    gap: 8px;
    font-size: 7px;
  }
  footer > span:first-child {
    display: none;
  }
  footer button {
    font-size: 8px;
  }
  .header-actions {
    gap: 12px;
  }
  .header-actions button {
    font-size: 9px;
  }
}
@media (max-width: 380px) {
  .build-panel {
    gap: 12px;
    padding: 14px;
  }
  .stage {
    height: 420px;
  }
  .scene-tools #camera-label {
    display: none;
  }
  .launch-button > span {
    font-size: 28px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 850px) {
  .scene-tools #inspect {
    display: flex;
    font-size: 8px;
  }
  .scene-tools #camera-label {
    display: none;
  }
  .header-actions button {
    white-space: nowrap;
  }
}
/* Release layout: the scene is the focus; copy is limited to controls. */
.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-size: 29px;
  margin: 0 0 24px;
  font-style: normal;
  letter-spacing: 0;
}
.build-panel {
  padding-top: 30px;
}
.course small {
  font-size: 10px;
}
.course b {
  font-size: 12px;
}
.course {
  min-height: 68px;
}
.tune-label {
  font-size: 12px;
}
.tuning {
  margin-top: 30px;
}
.trick-label {
  top: 70px;
}
.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 {
  display: none;
}
.result > p:empty {
  display: none;
}
.result-numbers {
  margin-top: 14px;
}
.result-buttons button {
  font-size: 11px;
}
.launch-area > p {
  font-size: 10px;
  min-height: 15px;
}
.scene-bottom {
  font-size: 10px;
}
footer {
  justify-content: space-between;
  font-size: 9px;
}
footer > span:first-child {
  display: block;
}
.scene-tools #inspect {
  display: flex;
}
.scene-tools button {
  font-size: 11px;
}
dialog h2 {
  font-size: 36px;
  font-style: normal;
}
@media (max-width: 850px) {
  .stage {
    height: 55dvh;
    min-height: 360px;
  }
  .build-panel {
    padding: 18px;
    gap: 20px;
  }
  .panel-top {
    display: none;
  }
  .tuning {
    margin: 0;
  }
  .course {
    min-height: 75px;
  }
  .course b {
    font-size: 11px;
  }
  .tune-label {
    font-size: 10px;
  }
  .launch-area > p {
    font-size: 9px;
  }
  .scene-bottom {
    font-size: 9px;
  }
  .result-buttons button {
    font-size: 10px;
  }
  .trick-label {
    top: 60px;
  }
  footer {
    min-height: 44px;
  }
  .topbar {
    height: 62px;
  }
  .scene-tools #inspect {
    font-size: 10px;
  }
}

.panel-top h2 {
  font:
    600 22px "DM Sans",
    sans-serif;
}
.air-actions {
  grid-template-columns: 1fr;
}
.air-actions button {
  background: #dce7dd !important;
  font-size: 12px;
}
.air-actions button:disabled {
  opacity: 0.45;
}
