:root {
  color-scheme: light;
  --cream: #f7f5ed;
  --ink: #163f40;
  --muted: #748380;
  --line: #dfe3d9;
  --green: #dbe9df;
  --coral: #ff765b;
  --gold: #e7b54d;
  --water: #8ed5cf;
  font-family: ui-rounded,"SF Pro Rounded",-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Noto Sans KR","Malgun Gothic",sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: var(--cream);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  cursor: pointer;
}
button:focus-visible,a:focus-visible {
  outline: 3px solid #e8b143;
  outline-offset: 4px;
}
button:disabled {
  cursor: default;
}
button,svg {
  flex-shrink: 0;
}
svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
button {
  touch-action: manipulation;
}
[hidden] {
  display: none!important;
}
.icon-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.app-shell {
  max-width: 1100px;
  margin: auto;
  padding: 0 38px;
}
.site-header {
  height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.home-link {
  display: flex;
  gap: 11px;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.025em;
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
}
.brand-mark svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.5;
}
.home-arrow {
  margin-left: 3px;
  color: #84918a;
}
.coin-wallet {
  display: flex;
  align-items: center;
  gap: 7px;
}
.coin-wallet svg {
  width: 22px;
  height: 22px;
  color: #c29130;
  fill: #f6dfa0;
  stroke-width: 1.45;
}
.coin-wallet #coinCount {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.04em;
}
.wallet-label {
  font: 10px/1 ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing: .11em;
  color: var(--muted);
  padding-left: 2px;
}
.intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 40px 0 28px;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 13px;
  font: 600 10px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing: .17em;
}
.eyebrow>span:first-child {
  width: 5px;
  height: 5px;
  background: #4d8379;
  border-radius: 50%;
}
.eyebrow .edition {
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  color: #98a29a;
  margin-left: 5px;
}
.intro h1 {
  margin: 0;
  font-size: 46px;
  letter-spacing: -.065em;
  line-height: 1.12;
  font-weight: 800;
}
.title-dot {
  color: var(--coral);
  margin-left: 2px;
}
.intro-copy {
  margin: 0 0 3px;
  font-size: 13px;
  line-height: 1.7;
  color: #77847b;
  letter-spacing: -.025em;
}
.game-layout {
  display: grid;
  grid-template-columns: minmax(0,1.32fr) minmax(0,1fr);
  gap: 36px;
  align-items: stretch;
}
.scene-wrap {
  position: relative;
  min-width: 0;
  height: 480px;
  min-height: 460px;
  border-radius: 10px;
  overflow: hidden;
  background: #9cd7c9;
  isolation: isolate;
}
#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.scene-label {
  position: absolute;
  left: 22px;
  top: 21px;
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(249,248,235,.9);
  padding: 8px 11px;
  border-radius: 5px;
  font-size: 10px;
  letter-spacing: -.025em;
  font-weight: 650;
  box-shadow: 0 2px 7px #254f3820;
}
.live-dot {
  height: 5px;
  width: 5px;
  background: #4d8e6e;
  border-radius: 50%;
}
.scene-bottom {
  position: absolute;
  left: 23px;
  right: 23px;
  bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #1b5b517d;
}
.scene-bottom span {
  font: 8px/1 ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing: .18em;
}
.scene-bottom svg {
  width: 19px;
  height: 19px;
}
.base-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 3px 0 0;
}
.course-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--line);
}
.course-number {
  display: grid;
  place-items: center;
  width: 40px;
  height: 43px;
  border: 1px solid #d8ded2;
  border-radius: 6px;
  font-size: 20px;
  letter-spacing: -.08em;
  font-weight: 500;
  color: #8b9b8e;
}
.small-label {
  margin: 0 0 5px;
  color: #7d8b81;
  font-size: 10px;
  letter-spacing: -.01em;
}
.course-summary h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -.05em;
  font-weight: 750;
}
.course-tag {
  margin-left: auto;
  white-space: nowrap;
  padding: 6px 8px;
  background: #e8ebe1;
  font-size: 9px;
  border-radius: 4px;
  color: #6f8074;
  letter-spacing: -.02em;
}
.workshop {
  padding-top: 27px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}
.section-heading h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -.045em;
}
.section-heading>span {
  font-size: 10px;
  color: #8a948a;
  white-space: nowrap;
}
.upgrade-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 9px;
}
.upgrade-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid #dce1d5;
  border-radius: 7px;
  padding: 14px 8px 9px;
  background: #ffffff37;
}
.upgrade-icon {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 50%;
  color: #4e7869;
  background: #e5ecdf;
}
.upgrade-icon svg {
  width: 29px;
  height: 29px;
  stroke-width: 1.5;
}
.handling-card .upgrade-icon {
  color: #6d7e9b;
  background: #e4e7ee;
}
.booster-card .upgrade-icon {
  color: #b68741;
  background: #f3e8cb;
}
.upgrade-card h3 {
  margin: 12px 0 4px;
  font-size: 15px;
  letter-spacing: -.04em;
}
.upgrade-description {
  font-size: 10px;
  color: #8b958b;
  margin: 0;
}
.upgrade-level {
  font: 9px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;
  color: #72907b;
  letter-spacing: -.03em;
  margin: 12px 0 10px;
}
.upgrade-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: #e8eee2;
  color: #355d47;
  border: 1px solid #cedbc7;
  border-radius: 4px;
  width: 100%;
  min-height: 33px;
  padding: 5px 4px;
  font-size: 12px;
  font-weight: 700;
}
.upgrade-button svg {
  width: 14px;
  height: 14px;
  stroke-width: 1.4;
}
.upgrade-plus {
  font-size: 15px;
  font-weight: 400;
  margin-left: auto;
  padding-right: 3px;
}
.upgrade-button:hover:enabled {
  background: #d8e5d1;
  border-color: #aabb9f;
}
.upgrade-button:active:enabled {
  transform: translateY(1px);
}
.upgrade-button:disabled {
  background: #eeeee5;
  color: #9baca0;
  border-color: #e2e5da;
}
.upgrade-button:disabled .upgrade-plus {
  opacity: .45;
}
.launch-section {
  margin-top: 0;
  padding-top: 27px;
}
.primary-button {
  border: 0;
  background: var(--ink);
  color: #fffefa;
  min-height: 56px;
  border-radius: 6px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 21px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.035em;
  box-shadow: 0 4px 0 #0b2e2e;
}
.primary-button svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.6;
}
.primary-button:hover {
  background: #245455;
}
.primary-button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #0b2e2e;
}
.race-promise {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  line-height: 1.6;
  color: #829183;
  margin: 13px 0 0;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.promise-dot {
  width: 4px;
  height: 4px;
  display: inline-block;
  background: #a4b691;
  border-radius: 50%;
  flex-shrink: 0;
}
.save-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 15px 0 0;
  color: #a1a99e;
  font-size: 9px;
  letter-spacing: -.02em;
}
.save-note svg {
  width: 11px;
  height: 11px;
  stroke-width: 1.5;
}
.base-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 23px 0 28px;
  font-size: 9px;
  color: #929e91;
  letter-spacing: -.02em;
}
.base-footer>span:last-child {
  font: 7px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing: .14em;
}
.desktop-note {
  font-size: 9px;
  color: #9ca99b;
}
.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: max(28px,env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 36px);
  padding: 13px 19px;
  background: var(--ink);
  border: 1px solid #ffffff20;
  border-radius: 7px;
  box-shadow: 0 8px 30px #062a3220;
  color: #fffefa;
  font-size: 13px;
  text-align: center;
  line-height: 1.5;
  pointer-events: none;
}
body.race-mode {
  overflow: hidden;
  overscroll-behavior: none;
  background: #94d6cb;
}
.race-mode .base-only,.race-mode #baseScreen {
  display: none!important;
}
.race-mode .app-shell,.race-mode .game-layout {
  display: contents;
}
.race-mode #scene {
  position: fixed;
  inset: 0;
  height: auto;
  border-radius: 0;
  min-height: 0;
  z-index: 0;
}
.race-screen {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.race-topbar {
  position: absolute;
  top: max(21px,env(safe-area-inset-top));
  left: 22px;
  right: 22px;
  display: flex;
  align-items: stretch;
  gap: 9px;
  max-width: 680px;
  margin: 0 auto;
}
.race-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 11px 15px;
  background: #fffdf0ed;
  box-shadow: 0 3px 0 #215d4920;
  border: 1px solid #ffffff60;
  border-radius: 9px;
  color: var(--ink);
  min-width: 91px;
}
.stat-caption {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: #6e8c7c;
}
.race-stat strong {
  font-size: 23px;
  letter-spacing: -.055em;
  font-weight: 800;
  line-height: 1.25;
  margin-top: 2px;
}
.progress-stat {
  flex: 1;
  position: relative;
  max-width: 200px;
  overflow: hidden;
}
.progress-stat strong {
  font-size: 20px;
}
.progress-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: #c1d7b7;
}
.pause-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  background: #fffdf0ed;
  border: 1px solid #ffffff60;
  box-shadow: 0 3px 0 #215d4920;
  border-radius: 50%;
  margin-left: auto;
  color: var(--ink);
  pointer-events: auto;
}
.pause-button span {
  width: 3px;
  height: 15px;
  background: currentColor;
  border-radius: 1px;
}
.minimap-wrap {
  position: absolute;
  top: max(126px,calc(env(safe-area-inset-top) + 105px));
  right: 21px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fffdf0b5;
  padding: 10px 7px 5px;
  border-radius: 8px;
  border: 1px solid #fffdf040;
  color: #62867b;
}
.minimap-wrap>span {
  font: 6px/1 ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing: .08em;
  margin-bottom: 6px;
}
#minimap {
  display: block;
  width: 54px;
  height: 103px;
}
.map-flag {
  width: 13px;
  height: 13px;
  margin-top: 3px;
  stroke-width: 1.5;
}
.race-countdown {
  position: absolute;
  top: 44%;
  left: 50%;
  transform: translate(-50%,-50%);
  height: 125px;
  min-width: 125px;
  padding: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fffdf0e8;
  border: 1px solid #ffffff;
  color: var(--ink);
  font-weight: 850;
  font-size: 70px;
  line-height: 1;
  letter-spacing: -.08em;
  box-shadow: 0 8px 0 #1b625020;
}
.race-hint {
  position: absolute;
  bottom: calc(112px + env(safe-area-inset-bottom));
  left: 14px;
  right: 14px;
  text-align: center;
  font-size: 11px;
  font-weight: 650;
  color: #285d53;
  text-shadow: 0 1px 5px #edfff380;
  letter-spacing: -.02em;
}
.race-controls {
  position: absolute;
  bottom: max(23px,calc(env(safe-area-inset-bottom) + 12px));
  left: 21px;
  right: 21px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  max-width: 680px;
  margin: 0 auto;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.steering-group {
  display: flex;
  gap: 10px;
}
.steer-button {
  display: grid;
  place-items: center;
  width: 69px;
  height: 67px;
  color: var(--ink);
  background: #fffdf0ed;
  border: 1px solid #ffffffa0;
  border-radius: 14px;
  box-shadow: 0 5px 0 #21624e30;
  touch-action: none;
}
.steer-button svg {
  width: 31px;
  height: 31px;
  stroke-width: 2.8;
}
.steer-button:active,.steer-button.pressed,.steer-button.is-pressed {
  background: #e9f2d8;
  transform: translateY(3px);
  box-shadow: 0 2px 0 #21624e30;
}
.boost-button {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 115px;
  height: 67px;
  padding: 14px 15px;
  background: var(--coral);
  color: #fffaf0;
  border: 1px solid #ffad83;
  box-shadow: 0 5px 0 #a64f393b;
  border-radius: 14px;
  overflow: hidden;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -.03em;
  touch-action: none;
}
.boost-button>svg {
  width: 25px;
  height: 25px;
  fill: #fff4e62b;
  stroke-width: 2;
}
.boost-meter {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: #fff6ce80;
  transform-origin: left;
}
.boost-button:active:enabled {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #a64f393b;
}
.boost-button:disabled {
  background: #5d8f82;
  border-color: #b4d2b7;
  color: #e4f0e0;
  box-shadow: 0 5px 0 #33654b30;
}
.boost-button.boost-active,.boost-button.is-active,.boost-button.active {
  background: #e9b74a;
  border-color: #fff2b2;
  color: #fffdf1;
}
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: max(22px,env(safe-area-inset-top)) 22px max(22px,env(safe-area-inset-bottom));
  background: #123f3c70;
  backdrop-filter: blur(6px);
  overflow-y: auto;
}
.modal-card {
  width: 100%;
  max-width: 390px;
  background: var(--cream);
  border-radius: 14px;
  padding: 31px 27px 23px;
  box-shadow: 0 18px 80px #123f3c40;
  text-align: center;
  border: 1px solid #ffffffb0;
}
.modal-card>.eyebrow {
  justify-content: center;
  color: #8a9c89;
  font-size: 9px;
  letter-spacing: .15em;
  margin: 0 0 13px;
}
.result-art {
  height: 106px;
  position: relative;
  display: grid;
  place-items: center;
  margin: 0 auto 7px;
  width: 150px;
}
.result-art>svg {
  width: 65px;
  height: 65px;
  stroke-width: 1.2;
  color: var(--ink);
  transform: rotate(-10deg);
  z-index: 1;
}
.result-rays {
  position: absolute;
  width: 91px;
  height: 91px;
  left: 30px;
  top: 4px;
  border-radius: 50%;
  background: #ece4be;
}
.result-spark {
  position: absolute;
  z-index: 1;
  color: #c49d4c;
}
.spark-one {
  font-size: 27px;
  left: 5px;
  top: 17px;
}
.spark-two {
  font-size: 20px;
  right: 9px;
  bottom: 12px;
}
.modal-card h2 {
  font-size: 26px;
  letter-spacing: -.06em;
  margin: 0;
  font-weight: 800;
  line-height: 1.3;
}
.result-copy {
  font-size: 12px;
  color: #879282;
  letter-spacing: -.025em;
  line-height: 1.65;
  margin: 10px 0 21px;
}
.result-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.result-stats>div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}
.result-stats>div:first-child {
  border-right: 1px solid var(--line);
}
.result-stats>div>span {
  color: #879282;
  font-size: 10px;
}
.result-stats strong {
  font-size: 28px;
  line-height: 1;
  letter-spacing: -.05em;
}
.reward-value {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #bc8e31;
}
.reward-value svg {
  width: 23px;
  height: 23px;
  stroke-width: 1.4;
}
.winner-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 10px;
  color: #839382;
  margin: 17px 0 22px;
}
.winner-line svg {
  width: 14px;
  height: 14px;
}
.winner-line strong {
  font-weight: 750;
  color: #51745a;
}
.result-footnote {
  font-size: 9px;
  color: #96a08e;
  line-height: 1.6;
  margin: 16px 0 0;
  letter-spacing: -.02em;
}
.pause-card {
  padding-top: 35px;
}
.pause-illustration {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  background: #e1e9d8;
  border-radius: 50%;
  margin: 0 auto 22px;
  color: #5e7961;
  font-weight: 800;
  font-size: 28px;
}
.pause-card .primary-button {
  margin-top: 25px;
}
.secondary-button {
  width: 100%;
  min-height: 48px;
  margin-top: 13px;
  color: #6d826d;
  background: transparent;
  border: 1px solid #d7dfd0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 650;
}
.secondary-button:hover {
  background: #e9eee2;
}
.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;
}
@media(min-width:1200px) {
  .app-shell {
    padding-top: 13px;
  }
  .intro {
    padding-top: 48px;
    padding-bottom: 35px;
  }
  .scene-wrap {
    min-height: 480px;
  }
  .base-panel {
    padding-top: 8px;
  }
  .course-summary {
    padding-bottom: 30px;
  }
  .workshop {
    padding-top: 30px;
  }
  .upgrade-card {
    padding-top: 18px;
    padding-bottom: 12px;
  }
  .launch-section {
    padding-top: 34px;
  }
  .base-footer {
    padding-top: 26px;
  }
}
@media(max-width:760px) {
  .app-shell {
    max-width: 520px;
    padding: 0 24px;
  }
  .site-header {
    height: 70px;
  }
  .brand-mark {
    width: 29px;
    height: 29px;
  }
  .brand-mark svg {
    width: 19px;
    height: 19px;
  }
  .home-link {
    gap: 8px;
    font-size: 11px;
  }
  .coin-wallet #coinCount {
    font-size: 19px;
  }
  .coin-wallet svg {
    width: 20px;
    height: 20px;
  }
  .wallet-label {
    font-size: 8px;
  }
  .intro {
    padding: 25px 0 21px;
  }
  .intro h1 {
    font-size: 36px;
  }
  .intro .eyebrow {
    font-size: 8px;
    margin-bottom: 9px;
  }
  .intro-copy {
    font-size: 10px;
    line-height: 1.65;
  }
  .game-layout {
    grid-template-columns: minmax(0,1fr);
    gap: 24px;
  }
  .scene-wrap {
    height: 280px;
    min-height: 0;
  }
  .scene-label {
    left: 17px;
    top: 16px;
    font-size: 9px;
    padding: 7px 9px;
  }
  .scene-bottom {
    left: 17px;
    right: 17px;
    bottom: 13px;
  }
  .scene-bottom span {
    font-size: 7px;
  }
  .base-panel {
    padding: 0;
  }
  .course-summary {
    padding-bottom: 20px;
    gap: 11px;
  }
  .course-number {
    width: 35px;
    height: 38px;
    font-size: 18px;
  }
  .course-summary h2 {
    font-size: 17px;
  }
  .small-label {
    font-size: 9px;
  }
  .course-tag {
    font-size: 9px;
    padding: 6px 8px;
  }
  .workshop {
    padding-top: 23px;
  }
  .section-heading {
    margin-bottom: 13px;
  }
  .section-heading h2 {
    font-size: 15px;
  }
  .upgrade-grid {
    gap: 10px;
  }
  .upgrade-card {
    padding: 13px 9px 9px;
  }
  .upgrade-card h3 {
    margin-top: 10px;
    font-size: 15px;
  }
  .upgrade-icon {
    width: 39px;
    height: 39px;
  }
  .upgrade-icon svg {
    width: 27px;
    height: 27px;
  }
  .upgrade-level {
    margin: 10px 0 9px;
  }
  .upgrade-button {
    min-height: 34px;
  }
  .launch-section {
    padding-top: 23px;
  }
  .primary-button {
    min-height: 55px;
  }
  .save-note {
    margin-top: 13px;
  }
  .base-footer {
    padding-top: 22px;
    padding-bottom: max(23px,env(safe-area-inset-bottom));
  }
  .base-footer>span:last-child {
    font-size: 6px;
    letter-spacing: .06em;
  }
  .desktop-note {
    display: none;
  }
}
@media(max-width:390px) {
  .app-shell {
    padding: 0 20px;
  }
  .site-header {
    height: 64px;
  }
  .intro {
    padding-top: 21px;
    padding-bottom: 18px;
  }
  .intro h1 {
    font-size: 32px;
  }
  .intro-copy {
    font-size: 9px;
  }
  .scene-wrap {
    height: 244px;
  }
  .game-layout {
    gap: 21px;
  }
  .section-heading>span {
    font-size: 9px;
  }
  .upgrade-grid {
    gap: 8px;
  }
  .upgrade-card {
    padding-left: 7px;
    padding-right: 7px;
  }
  .upgrade-description {
    font-size: 9px;
  }
  .upgrade-icon {
    width: 35px;
    height: 35px;
  }
  .upgrade-icon svg {
    width: 25px;
    height: 25px;
  }
  .upgrade-card h3 {
    margin-top: 9px;
    font-size: 14px;
  }
  .workshop {
    padding-top: 20px;
  }
  .launch-section {
    padding-top: 20px;
  }
  .race-promise {
    font-size: 9px;
  }
  .base-footer>span:last-child {
    display: none;
  }
  .race-topbar {
    left: 16px;
    right: 16px;
    top: max(16px,env(safe-area-inset-top));
  }
  .race-controls {
    left: 16px;
    right: 16px;
    gap: 12px;
  }
  .steering-group {
    gap: 8px;
  }
  .steer-button {
    width: 62px;
    height: 63px;
    border-radius: 12px;
  }
  .boost-button {
    min-width: 105px;
    height: 63px;
    padding: 12px;
    font-size: 13px;
    border-radius: 12px;
  }
  .boost-button>svg {
    width: 22px;
    height: 22px;
  }
  .minimap-wrap {
    right: 16px;
  }
  .modal-card {
    padding-left: 21px;
    padding-right: 21px;
  }
  .modal-card h2 {
    font-size: 24px;
  }
}
@media(max-width:340px) {
  .app-shell {
    padding: 0 16px;
  }
  .intro-copy {
    font-size: 8px;
  }
  .intro h1 {
    font-size: 29px;
  }
  .scene-wrap {
    height: 220px;
  }
  .course-summary {
    gap: 8px;
  }
  .course-summary h2 {
    font-size: 15px;
  }
  .course-tag {
    font-size: 8px;
    padding: 6px;
  }
  .section-heading>span {
    font-size: 8px;
  }
  .upgrade-grid {
    gap: 6px;
  }
  .upgrade-card {
    padding-left: 5px;
    padding-right: 5px;
  }
  .race-controls {
    left: 13px;
    right: 13px;
  }
  .steer-button {
    width: 57px;
    height: 60px;
  }
  .boost-button {
    min-width: 97px;
    height: 60px;
    gap: 3px;
  }
  .race-stat {
    padding: 10px 12px;
    min-width: 78px;
  }
  .race-stat strong {
    font-size: 21px;
  }
  .progress-stat strong {
    font-size: 19px;
  }
  .stat-caption {
    font-size: 8px;
  }
}
@media(max-height:540px) and (orientation:landscape) {
  .race-topbar {
    top: max(13px,env(safe-area-inset-top));
    left: 18px;
    right: 18px;
    margin: 0;
    max-width: none;
  }
  .race-stat {
    padding: 7px 12px;
    min-width: 85px;
  }
  .race-stat strong {
    font-size: 20px;
  }
  .progress-stat {
    max-width: 145px;
  }
  .pause-button {
    height: 39px;
    width: 39px;
  }
  .minimap-wrap {
    top: 92px;
    right: 18px;
    padding: 7px 6px 3px;
  }
  #minimap {
    width: 40px;
    height: 77px;
  }
  .map-flag {
    display: none;
  }
  .race-controls {
    bottom: max(14px,env(safe-area-inset-bottom));
    left: max(24px,env(safe-area-inset-left));
    right: max(24px,env(safe-area-inset-right));
    max-width: none;
  }
  .steer-button {
    width: 61px;
    height: 56px;
  }
  .boost-button {
    height: 56px;
    min-width: 115px;
  }
  .race-hint {
    bottom: 83px;
  }
  .race-countdown {
    height: 95px;
    min-width: 95px;
    font-size: 50px;
    top: 47%;
  }
  .modal-card {
    padding: 18px 25px;
    max-width: 390px;
  }
  .modal-card>.eyebrow {
    margin-bottom: 8px;
  }
  .result-art {
    height: 60px;
    width: 120px;
    margin-bottom: 3px;
  }
  .result-rays {
    height: 58px;
    width: 58px;
    left: 31px;
    top: 0;
  }
  .result-art>svg {
    width: 44px;
    height: 44px;
  }
  .spark-one {
    font-size: 20px;
    left: 7px;
    top: 6px;
  }
  .spark-two {
    font-size: 16px;
    right: 6px;
    bottom: 0;
  }
  .modal-card h2 {
    font-size: 22px;
  }
  .result-copy {
    margin: 7px 0 12px;
    font-size: 11px;
  }
  .result-stats {
    padding: 12px 0;
  }
  .result-stats strong {
    font-size: 24px;
  }
  .winner-line {
    margin: 11px 0 14px;
  }
  .modal-card .primary-button {
    min-height: 45px;
    padding: 11px 16px;
    font-size: 13px;
  }
  .result-footnote {
    margin-top: 11px;
    font-size: 8px;
  }
  .pause-illustration {
    width: 44px;
    height: 44px;
    margin-bottom: 12px;
    font-size: 22px;
  }
  .pause-card .primary-button {
    margin-top: 15px;
  }
  .secondary-button {
    min-height: 40px;
    margin-top: 10px;
  }
  .pause-card .result-copy {
    margin-bottom: 8px;
  }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    animation-duration: .01ms!important;
    transition-duration: .01ms!important;
    scroll-behavior: auto!important;
  }
}

.base-mode #gameCanvas { touch-action: pan-y; }
