:root {
  --cream:#fbf1d8;
  --paper:#f3e3bb;
  --wood:#7a4a2a;
  --wood-dark:#4e2e18;
  --ink:#3a2414;
  --blue:#2a74b8;
  --blue-dark:#173f66;
  --gold:#f0b43c;
  --gold-dark:#b97f12;
  --red:#c8402f;
  --side:clamp(150px,27vw,300px);
  --fs:clamp(.82rem,1.05rem + .15vmin,1.15rem);
  font:
    16px/1.3 "Avenir Next",
    "Trebuchet MS",
    system-ui,
    sans-serif;
  color: var(--ink);
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #abc876;
  overscroll-behavior: none;
}
#stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  background: #abc876;
  user-select: none;
  -webkit-user-select: none;
}
.panorama {
  position: absolute;
  inset: 0 0 20%;
  background: #bfdedf;
  overflow: hidden;
  pointer-events: none;
}
.pan-img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: url(assets/bavaria-panorama-graded.jpg) 0 0 / 100% 100% no-repeat;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}
.panorama::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      rgba(199, 213, 222, .04) 0%,
      rgba(199, 213, 222, .26) 22%,
      rgba(199, 213, 222, .58) 40%,
      rgba(199, 213, 222, .8) 60%,
      rgba(199, 213, 222, .92) 100%);
}
canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  touch-action: none;
  overscroll-behavior: none;
}
.sr-only {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
#ui {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
#ui > * {
  pointer-events: auto;
}
.rauten {
  background-color: #fff;
  background-image:
    linear-gradient(
      135deg,
      var(--blue) 25%,
      transparent 25%),
    linear-gradient(
      225deg,
      var(--blue) 25%,
      transparent 25%),
    linear-gradient(
      315deg,
      var(--blue) 25%,
      transparent 25%),
    linear-gradient(
      45deg,
      var(--blue) 25%,
      transparent 25%);
  background-size: 16px 16px;
  background-position:
    -8px 0,
    -8px 0,
    0 0,
    0 0;
}
.plank {
  position: relative;
  background: linear-gradient(#fff6dc, var(--cream));
  color: var(--ink);
  border: 3px solid var(--wood);
  border-radius: 14px;
  box-shadow: 0 3px 0 var(--wood-dark), 0 8px 18px rgba(30, 20, 10, .3);
}
.plank::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: -1.5px;
  height: 2px;
  border-radius: 2px;
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(255, 244, 214, .95) 14%,
      rgba(255, 244, 214, .95) 86%,
      transparent);
}
.plank::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -1.5px;
  width: .62em;
  height: .62em;
  transform: translate(-50%, -50%) rotate(45deg);
  background:
    linear-gradient(
      135deg,
      #fff 50%,
      var(--blue) 50%);
  border: 2px solid #fff6d8;
  box-shadow: 0 0 0 2.5px rgba(18, 32, 52, .7);
  pointer-events: none;
}
#hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  font-size: var(--fs);
  transition: opacity .3s;
}
#hud > * {
  pointer-events: none;
}
#hud.off {
  opacity: 0;
  visibility: hidden;
}
body.bored #hud,
body.idle-anim #hud {
  opacity: 0 !important;
  transition: opacity .7s ease, visibility 0s .7s;
  visibility: hidden;
}
body:not(.bored):not(.idle-anim) #hud {
  transition: opacity .35s ease;
}
body.bored #lesson,
body.bored #motion,
body.bored #status,
body.bored #hint,
body.bored #charge,
body.bored #charge-status,
body.idle-anim #lesson,
body.idle-anim #motion,
body.idle-anim #status,
body.idle-anim #hint,
body.idle-anim #charge,
body.idle-anim #charge-status {
  opacity: 0 !important;
}
.hud-progress {
  display: none;
}
body.show-progress .hud-progress {
  display: block;
}
.hud-progress {
  position: absolute;
  left: clamp(8px, 2vmin, 22px);
  top: clamp(8px, 2vmin, 22px);
  width: var(--side);
  padding: .65em 1.1em .85em 1em;
}
.hud-progress .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .5em;
  flex-wrap: wrap;
  font-weight: 800;
  letter-spacing: .03em;
}
.hud-progress .row small {
  font-weight: 700;
  font-size: .78em;
  color: var(--wood);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.hud-progress .meters {
  font-variant-numeric: tabular-nums;
  font-family: Georgia, serif;
  font-size: 1.05em;
}
.hud-broken {
  position: absolute;
  left: clamp(8px, 2vmin, 22px);
  top: calc(clamp(8px, 2vmin, 22px) + var(--prog-b,5.8em) + 1.45em);
  display: flex;
  align-items: baseline;
  gap: .6em;
  padding: .45em 1em .5em;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .35s ease, transform .35s ease;
  white-space: nowrap;
}
body:not(.show-progress) .hud-broken {
  top: calc(clamp(8px, 2vmin, 22px) + .9em);
}
.hud-broken.on {
  opacity: .92;
  transform: none;
}
.hud-broken small {
  font-weight: 700;
  font-size: .74em;
  color: var(--wood);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.hud-broken .n {
  font-variant-numeric: tabular-nums;
  font-family: Georgia, serif;
  font-size: 1.05em;
  font-weight: 800;
}
.hud-broken.bump .n {
  animation: brokenBump .45s ease;
}
@keyframes brokenBump {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.28);
  }
  100% {
    transform: scale(1);
  }
}
.trackrow {
  display: flex;
  align-items: center;
  gap: .9em;
  margin: .85em 0 .1em .6em;
}
.track {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: .7em;
  border-radius: 99px;
  background: #d9c394;
  border: 2px solid var(--wood);
}
.track i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 99px;
  width: 0;
  background:
    linear-gradient(
      #ffd98a,
      #f0a52a 55%,
      #d9811a);
  box-shadow: 0 0 .5em rgba(255, 176, 60, .65);
}
.track .ball {
  position: absolute;
  top: 50%;
  left: 0;
  z-index: 3;
  width: 1.5em;
  height: 1.5em;
  margin: -.75em 0 0 -.75em;
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 34% 28%,
      #bfe0ff 0 10%,
      #4f9be0 28%,
      #2a74b8 60%,
      #173f66);
  border: 2px solid #fff6d8;
  box-shadow: 0 .12em .25em rgba(20, 10, 0, .45);
}
.track .acc {
  position: absolute;
  left: 50%;
  bottom: 78%;
  width: 1.6em;
  height: 1.2em;
  transform: translateX(-50%);
  pointer-events: none;
}
.track .spark {
  position: absolute;
  top: 50%;
  left: 0;
  z-index: 2;
  width: 2.6em;
  height: 2.6em;
  margin: -1.3em 0 0 -1.3em;
  pointer-events: none;
  background:
    radial-gradient(
      circle,
      rgba(255, 236, 170, .95) 0 14%,
      rgba(255, 190, 70, .5) 32%,
      transparent 66%);
  animation: spark 1.1s ease-in-out infinite;
}
.track .spark::before,
.track .spark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: #fff6d8;
  border-radius: 2px;
  transform: translate(-50%, -50%);
}
.track .spark::before {
  width: 2.4em;
  height: 2px;
}
.track .spark::after {
  width: 2px;
  height: 2.4em;
}
@keyframes spark {
  0%, 100% {
    opacity: .55;
    transform: scale(.8) rotate(0);
  }
  50% {
    opacity: 1;
    transform: scale(1.1) rotate(25deg);
  }
}
.track .ms {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: .9em;
  height: .9em;
  margin: -.45em 0 0 -.45em;
  transform: rotate(45deg);
  background: #efe3c4;
  border: 2px solid var(--wood);
  border-radius: 2px;
  transition:
    background .25s,
    box-shadow .25s,
    transform .25s;
}
.track .ms.lit {
  background:
    linear-gradient(
      135deg,
      #fff 50%,
      #ffd24a 50%);
  border-color: #b97f12;
  box-shadow: 0 0 .6em #ffd24a;
  transform: rotate(45deg) scale(1.15);
}
.goalflag {
  position: relative;
  flex: none;
  width: 2.3em;
  height: 1.9em;
  margin: -.35em .15em -.35em 0;
}
.goalflag .pole {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: .2em;
  border-radius: 2px;
  background:
    linear-gradient(
      90deg,
      var(--wood-dark),
      var(--wood));
}
.goalflag .flag {
  position: absolute;
  left: .2em;
  top: .05em;
  width: 1.9em;
  height: 1.2em;
  transform-origin: left center;
  animation: wave 2.4s ease-in-out infinite;
  background:
    conic-gradient(
      #1c1a18 25%,
      #fff 0 50%,
      #1c1a18 0 75%,
      #fff 0) 0 0/.475em .4em;
  border: 1.5px solid #1c1a18;
  border-left: 0;
  box-shadow: 0 .1em .2em rgba(0, 0, 0, .3);
}
.goalflag .flag::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      100deg,
      rgba(255, 255, 255, .28),
      transparent 35%,
      rgba(0, 0, 0, .22) 60%,
      transparent 85%);
  background-size: 200% 100%;
  animation: wave-shade 2.4s ease-in-out infinite;
}
@keyframes wave {
  0%, 100% {
    transform: skewY(-5deg) scaleX(1);
  }
  25% {
    transform: skewY(0) scaleX(.94);
  }
  50% {
    transform: skewY(5deg) scaleX(1);
  }
  75% {
    transform: skewY(0) scaleX(.94);
  }
}
@keyframes wave-shade {
  0%, 100% {
    background-position: 0 0;
  }
  50% {
    background-position: 60% 0;
  }
}
body.reduce-flash .goalflag .flag,
body.reduce-flash .goalflag .flag::after,
body.reduce-flash .track .spark {
  animation: none;
}
.hud-buttons {
  position: absolute;
  right: clamp(8px, 2vmin, 22px);
  top: clamp(8px, 2vmin, 22px);
  display: flex;
  gap: .5em;
}
.icon-btn {
  pointer-events: auto;
  width: 2.7em;
  height: 2.7em;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--ink);
  border-radius: 50%;
  font-size: 1em;
  background:
    radial-gradient(
      circle at 35% 28%,
      #fffaf0,
      var(--cream) 70%);
  border: 2.5px solid var(--wood);
  box-shadow: 0 2px 0 var(--wood-dark), 0 6px 14px rgba(30, 20, 10, .28);
  transition:
    transform .18s cubic-bezier(.3, .7, .4, 1),
    box-shadow .18s,
    filter .18s,
    background .18s;
}
.icon-btn::before,
.icon-btn::after {
  content: none !important;
  display: none !important;
}
#hud .icon-btn {
  pointer-events: auto;
}
.icon-btn svg {
  width: 52%;
  height: 52%;
  fill: currentColor;
  display: block;
  transition: transform .18s;
}
.icon-btn svg.stroke {
  fill: none;
  stroke: currentColor;
}
.icon-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 3px 0 var(--wood-dark), 0 8px 16px rgba(30, 20, 10, .3);
}
.icon-btn:active {
  transform: translateY(1px) scale(.96);
  box-shadow: 0 1px 0 var(--wood-dark), 0 3px 8px rgba(30, 20, 10, .25);
  transition-duration: .07s;
}
.icon-btn:focus-visible {
  outline: none;
  box-shadow: 0 2px 0 var(--wood-dark), 0 0 0 3px var(--gold);
}
.hud-top {
  position: absolute;
  left: 50%;
  top: clamp(8px, 2vmin, 22px);
  transform: translateX(-50%);
  width: calc(100vw - 2*(var(--side) + clamp(8px, 2vmin, 22px) + 1em));
  max-width: 36em;
  min-width: 9em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5em;
}
.tip {
  padding: .55em .9em .65em;
  text-align: center;
  font-weight: 700;
  max-width: 100%;
  overflow-wrap: anywhere;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5em .7em;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(-.6em);
  transition: opacity .35s, transform .35s;
}
.tip.on {
  opacity: 1;
  transform: none;
}
.tip span.txt {
  flex: 1 1 9em;
  min-width: 0;
  line-height: 1.25;
}
.keys {
  display: flex;
  align-items: center;
  gap: .35em;
  flex-wrap: wrap;
  justify-content: center;
}
.keys em {
  font-style: normal;
  font-size: .8em;
  color: var(--wood);
}
.key {
  display: inline-grid;
  place-items: center;
  min-width: 2.1em;
  height: 2.1em;
  padding: 0 .55em;
  text-align: center;
  font:
    800 .95em/1 "Avenir Next",
    "Trebuchet MS",
    system-ui,
    sans-serif;
  background: linear-gradient(#fff, #ecdcb4);
  color: var(--ink);
  border: 2px solid var(--wood);
  border-radius: .45em;
  box-shadow: 0 .22em 0 var(--wood-dark);
  animation: keypress 1.2s ease-in-out infinite;
  transition:
    background .06s,
    box-shadow .06s,
    transform .06s;
}
.key .cap {
  display: block;
  line-height: 1;
  transform: translateY(.02em);
}
@keyframes keypress {
  0%, 60%, 100% {
    transform: none;
  }
  30% {
    transform: translateY(.15em);
    box-shadow: 0 .07em 0 var(--wood-dark);
  }
}
.key.down {
  animation: none;
  transform: translateY(.17em);
  box-shadow: 0 .05em 0 var(--wood-dark), 0 0 .9em rgba(255, 200, 70, .95);
  background: linear-gradient(#ffe9a0, #f6bd3c);
  border-color: var(--gold-dark);
}
.toast {
  padding: .35em .9em;
  font-weight: 800;
  color: #fff;
  background: var(--blue-dark);
  border: 2px solid #fff;
  border-radius: 99px;
  text-align: center;
  max-width: 100%;
  overflow-wrap: anywhere;
  opacity: 0;
  transition: opacity .3s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
}
.toast.on {
  opacity: 1;
}
body.reduce-flash .key {
  animation: none;
}
body.reduce-flash .key.down {
  transition: none;
}
body.reduce-flash * {
  transition-duration: .01s !important;
}
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(.6rem, 2.5vmin, 1.4rem);
  padding: clamp(10px, 3vmin, 32px);
  overflow: auto;
  text-align: center;
  font-size: var(--fs);
  isolation: isolate;
  background: #16324f;
  animation: fadein .25s;
}
.screen:not(.dim):not(.finish)::before {
  content: "";
  position: fixed;
  inset: -24px;
  z-index: -2;
  background: url(assets/menu-bg.jpg) center 40% / cover no-repeat;
  filter: blur(7px) saturate(.9);
  transform: scale(1.04);
}
.screen:not(.dim):not(.finish)::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(255, 236, 190, .55) 20%,
      rgba(255, 236, 190, .55) 80%,
      transparent) top 14px left 0/100% 2px no-repeat,
    linear-gradient(
      90deg,
      transparent,
      rgba(255, 236, 190, .55) 20%,
      rgba(255, 236, 190, .55) 80%,
      transparent) bottom 14px left 0/100% 2px no-repeat,
    radial-gradient(
      ellipse at 50% 42%,
      rgba(255, 244, 214, .18),
      rgba(14, 38, 64, .72));
}
.screen.dim {
  background: rgba(23, 40, 63, .55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.screen.finish {
  background: rgba(23, 40, 63, .62);
}
@keyframes fadein {
  from {
    opacity: 0;
  }
}
.logo {
  font:
    italic 800 clamp(2rem, 9vmin, 5.2rem)/1 Georgia,
    "Palatino Linotype",
    serif;
  color: #fff8e4;
  margin: 0;
  letter-spacing: .01em;
  text-shadow:
    0 0 3px #1a0f06,
    0 0 3px #1a0f06,
    0 3px 0 var(--wood-dark),
    0 6px 14px rgba(0, 0, 0, .55);
  -webkit-text-stroke: 1.5px rgba(40, 22, 8, .85);
  paint-order: stroke fill;
  overflow-wrap: anywhere;
}
.logo small {
  display: block;
  width: max-content;
  max-width: 100%;
  margin: .7em auto 0;
  padding: .35em 1em .4em;
  font:
    800 .3em/1.2 "Avenir Next",
    system-ui,
    sans-serif;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: #fff6d8;
  background: rgba(18, 32, 52, .78);
  border: 1.5px solid rgba(255, 214, 120, .85);
  border-radius: 99px;
  -webkit-text-stroke: 0;
  text-shadow: 0 1px 2px #000;
}
.ribbon {
  position: relative;
  width: min(20em, 64vw);
  height: 1.1em;
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(255, 236, 190, .8) 18%,
      rgba(255, 236, 190, .8) 82%,
      transparent) center/100% 2px no-repeat;
  border: 0;
  box-shadow: none;
}
.ribbon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: .7em;
  height: .7em;
  transform: translate(-50%, -50%) rotate(45deg);
  background:
    linear-gradient(
      135deg,
      #fff 50%,
      var(--blue) 50%);
  border: 2px solid #fff6d8;
  box-shadow: 0 0 0 3px rgba(18, 32, 52, .7);
}
.press {
  font-weight: 800;
  color: #fff;
  font-size: 1.15em;
  text-shadow: 0 2px 0 var(--wood-dark);
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink {
  50% {
    opacity: .45;
  }
}
body.reduce-flash .press {
  animation: none;
}
.loadline {
  position: absolute;
  bottom: 1.2em;
  left: 0;
  right: 0;
  text-align: center;
  color: #fff;
  font-size: .8em;
  text-shadow: 0 1px 3px #000;
  padding: 0 1em;
}
h2.heading {
  margin: 0;
  font: italic 800 clamp(1.5rem, 5.5vmin, 2.8rem)/1.1 Georgia, serif;
  color: #fff8e4;
  text-shadow: 0 3px 0 var(--wood-dark);
  overflow-wrap: anywhere;
}
.menu {
  display: flex;
  flex-direction: column;
  gap: clamp(.45rem, 1.6vmin, .9rem);
  width: min(21em, 92%);
}
.btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  min-height: 2.7em;
  padding: .5em 1.1em;
  cursor: pointer;
  font:
    800 1.12em/1.15 "Avenir Next",
    "Trebuchet MS",
    system-ui,
    sans-serif;
  letter-spacing: .02em;
  color: var(--ink);
  text-align: center;
  background: linear-gradient(#fff3cf, #f0d58f);
  border: 3px solid var(--wood);
  border-radius: 14px;
  box-shadow: 0 .22em 0 var(--wood-dark), 0 .6em 1.1em rgba(30, 20, 10, .3);
  transition: transform .08s, filter .15s;
}
.btn:hover:not(:disabled),
.btn:focus-visible {
  filter: brightness(1.07);
  transform: translateY(-1px);
  outline: none;
}
.btn:focus-visible {
  box-shadow:
    0 .22em 0 var(--wood-dark),
    0 0 0 4px var(--gold),
    0 .6em 1.1em rgba(30, 20, 10, .3);
}
.btn:active:not(:disabled) {
  transform: translateY(.15em);
  box-shadow: 0 .07em 0 var(--wood-dark);
}
.btn.primary {
  background: linear-gradient(#ffe08a, var(--gold));
  border-color: var(--gold-dark);
}
.btn.blue {
  background: linear-gradient(#5aa0dc, var(--blue));
  color: #fff;
  border-color: var(--blue-dark);
  box-shadow: 0 .22em 0 var(--blue-dark), 0 .6em 1.1em rgba(0, 0, 0, .3);
}
.btn:disabled {
  cursor: not-allowed;
  color: #6d5a44;
  background: linear-gradient(#d9ccae, #c0b08a);
  border-color: #8a7a5c;
  box-shadow: 0 .15em 0 #7a6c52;
  filter: none;
}
.btn svg.lock {
  width: 1.1em;
  height: 1.1em;
  fill: currentColor;
  flex: none;
}
.cards {
  display: flex;
  gap: clamp(.6rem, 2.5vmin, 1.4rem);
  flex-wrap: wrap;
  justify-content: center;
  width: min(60em, 100%);
}
.card {
  flex: 1 1 11em;
  max-width: 16em;
  min-height: 9em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .4em;
  padding: 1em .8em;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
}
.card.locked {
  cursor: not-allowed;
  opacity: .92;
  background: linear-gradient(#e3d8bd, #cbbd9a);
}
.card .big {
  font: 800 2.6em/1 Georgia, serif;
  color: var(--blue-dark);
}
.card .name {
  font-size: 1.3em;
  font-family: Georgia, serif;
}
.card small {
  font-weight: 700;
  color: var(--wood);
  font-size: .82em;
  overflow-wrap: anywhere;
}
.panel {
  width: min(28em, 94%);
  padding: 1.1em 1.2em 1.2em;
  display: flex;
  flex-direction: column;
  gap: .8em;
  text-align: left;
}
.panel h3 {
  margin: 0;
  font: italic 800 1.45em/1.1 Georgia, serif;
  text-align: center;
}
.panel p {
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.panel.center {
  text-align: center;
  align-items: center;
}
.setting {
  display: flex;
  flex-direction: column;
  gap: .25em;
  font-weight: 800;
}
.setting .top {
  display: flex;
  justify-content: space-between;
  gap: .5em;
}
.setting output {
  font-variant-numeric: tabular-nums;
  color: var(--wood);
}
input[type=range] {
  width: 100%;
  accent-color: var(--blue);
  height: 1.6em;
  cursor: pointer;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: .6em;
  font-weight: 800;
  cursor: pointer;
}
.check input {
  width: 1.3em;
  height: 1.3em;
  accent-color: var(--blue);
  margin-top: .1em;
  flex: none;
}
.check small {
  display: block;
  font-weight: 600;
  color: var(--wood);
  font-size: .82em;
}
.row-btns {
  display: flex;
  gap: .7em;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}
.row-btns .btn {
  flex: 1 1 8em;
}
.finish-star {
  font: 800 3em/1 Georgia, serif;
  color: var(--gold);
  text-shadow: 0 2px 0 var(--wood-dark);
}
.note {
  font-size: .84em;
  color: var(--wood);
  font-weight: 700;
}
.modal {
  z-index: 5;
  background: rgba(18, 30, 48, .62);
}
@media (max-height: 520px) {
  .logo {
    font-size: 2rem;
  }
  .btn {
    min-height: 2.3em;
  }
  .card {
    min-height: 6em;
  }
  .finish-star {
    font-size: 2em;
  }
}
.screen[data-screen=settings] {
  overflow: hidden;
  gap: clamp(.4rem, 1.6vmin, 1rem);
}
.screen[data-screen=settings] .panel {
  flex: 0 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.screen[data-screen=settings] > .btn {
  flex: none;
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
  }
}
.seg {
  display: flex;
  gap: .5em;
}
.seg .swatch {
  flex: 1;
  min-height: 2.6em;
  padding: .2em;
  background: var(--sw) center/auto 1.9em no-repeat, linear-gradient(#f4ead0, #dccfa8);
}
.seg .swatch.on {
  box-shadow: 0 .15em 0 var(--wood-dark), 0 0 0 3px var(--gold);
  filter: brightness(1.06);
}
.seg .seg-btn {
  flex: 1;
  min-height: 2.2em;
  padding: .3em .8em;
  font-size: 1em;
}
.setting .sub {
  font-weight: 600;
  color: var(--wood);
  font-size: .82em;
}
.seg.grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.seg.grid3 .seg-btn,
.seg.mini .seg-btn {
  min-width: 0;
  padding: .3em .35em;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
  line-height: 1.1;
}
.seg.mini .seg-btn {
  min-height: 1.95em;
  font-size: .88em;
}
.gfx-detail {
  font-size: .94em;
}
.bench-row {
  display: flex;
  align-items: center;
  gap: .6em;
  flex-wrap: wrap;
}
.bench-row .sub {
  flex: 1 1 11em;
  min-width: 0;
  overflow-wrap: anywhere;
}
.btn.small-btn {
  flex: none;
  min-height: 2em;
  padding: .25em .8em;
  font-size: .86em;
}
.btn:focus-visible,
.btn:focus {
  filter: brightness(1.08);
  transform: translateY(-1px) scale(1.025);
  outline: none;
  box-shadow:
    0 .22em 0 var(--wood-dark),
    0 0 0 4px var(--gold),
    0 0 1.1em rgba(255, 200, 70, .7),
    0 .6em 1.1em rgba(30, 20, 10, .3);
}
.btn.blue:focus {
  box-shadow:
    0 .22em 0 var(--blue-dark),
    0 0 0 4px var(--gold),
    0 0 1.1em rgba(255, 200, 70, .7),
    0 .6em 1.1em rgba(0, 0, 0, .3);
}
.btn:disabled:focus {
  box-shadow: 0 .15em 0 #7a6c52;
  transform: none;
}
input[type=range]:focus-visible,
.check input:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}
html,
body,
#stage,
.screen,
.btn,
.check,
input {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%235aaef0'/%3E%3Cstop offset='1' stop-color='%232760b0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M5 4 5 30 12 23.6 17 34.2 22.4 31.8 17.4 21.4 27.4 21.4Z' transform='translate(1.6 2.2)' fill='%231a2a1c' fill-opacity='.28' stroke='%231a2a1c' stroke-opacity='.28' stroke-width='3' stroke-linejoin='round'/%3E%3Cpath d='M5 4 5 30 12 23.6 17 34.2 22.4 31.8 17.4 21.4 27.4 21.4Z' fill='url(%23g)' stroke='%23fff6d8' stroke-width='3' stroke-linejoin='round'/%3E%3Cpath d='M5 4 5 30 12 23.6 17 34.2 22.4 31.8 17.4 21.4 27.4 21.4Z' fill='none' stroke='%233b2a1a' stroke-width='.9' stroke-linejoin='round'/%3E%3Cpath d='M5 4 5 14 Q7.2 11.2 8.8 13.4 Q10.4 9.4 13.2 11 L13.8 11Z' fill='%23fff' stroke='%23dfe9f2' stroke-width='.5' stroke-linejoin='round'/%3E%3Cpath d='M7.4 17.5 7.4 25 9.6 23' fill='none' stroke='%23fff' stroke-opacity='.45' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 5 4, auto;
}
.btn:not(:disabled),
.check,
.icon-btn,
.fps-rec,
.card:not(.locked),
input[type=range] {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23ffd56a'/%3E%3Cstop offset='1' stop-color='%23e0932a'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M5 4 5 30 12 23.6 17 34.2 22.4 31.8 17.4 21.4 27.4 21.4Z' transform='translate(1.6 2.2)' fill='%231a2a1c' fill-opacity='.28' stroke='%231a2a1c' stroke-opacity='.28' stroke-width='3' stroke-linejoin='round'/%3E%3Cpath d='M5 4 5 30 12 23.6 17 34.2 22.4 31.8 17.4 21.4 27.4 21.4Z' fill='url(%23g)' stroke='%23fff6d8' stroke-width='3' stroke-linejoin='round'/%3E%3Cpath d='M5 4 5 30 12 23.6 17 34.2 22.4 31.8 17.4 21.4 27.4 21.4Z' fill='none' stroke='%233b2a1a' stroke-width='.9' stroke-linejoin='round'/%3E%3Cpath d='M5 4 5 14 Q7.2 11.2 8.8 13.4 Q10.4 9.4 13.2 11 L13.8 11Z' fill='%23fff' stroke='%23dfe9f2' stroke-width='.5' stroke-linejoin='round'/%3E%3Cpath d='M7.4 17.5 7.4 25 9.6 23' fill='none' stroke='%23fff' stroke-opacity='.45' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 5 4, pointer;
}
.btn:disabled,
.card.locked {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23c7bb9c'/%3E%3Cstop offset='1' stop-color='%238f8264'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M5 4 5 30 12 23.6 17 34.2 22.4 31.8 17.4 21.4 27.4 21.4Z' transform='translate(1.6 2.2)' fill='%231a2a1c' fill-opacity='.28' stroke='%231a2a1c' stroke-opacity='.28' stroke-width='3' stroke-linejoin='round'/%3E%3Cpath d='M5 4 5 30 12 23.6 17 34.2 22.4 31.8 17.4 21.4 27.4 21.4Z' fill='url(%23g)' stroke='%23fff6d8' stroke-width='3' stroke-linejoin='round'/%3E%3Cpath d='M5 4 5 30 12 23.6 17 34.2 22.4 31.8 17.4 21.4 27.4 21.4Z' fill='none' stroke='%233b2a1a' stroke-width='.9' stroke-linejoin='round'/%3E%3Cpath d='M7.4 17.5 7.4 25 9.6 23' fill='none' stroke='%23fff' stroke-opacity='.45' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 5 4, not-allowed;
}
body.no-cursor,
body.no-cursor #stage,
body.no-cursor canvas,
body.no-cursor #ui,
body.no-cursor #hud,
body.no-cursor .screen {
  cursor: none;
}
body.no-cursor .icon-btn,
body.no-cursor .fps-rec {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23ffd56a'/%3E%3Cstop offset='1' stop-color='%23e0932a'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M5 4 5 30 12 23.6 17 34.2 22.4 31.8 17.4 21.4 27.4 21.4Z' transform='translate(1.6 2.2)' fill='%231a2a1c' fill-opacity='.28' stroke='%231a2a1c' stroke-opacity='.28' stroke-width='3' stroke-linejoin='round'/%3E%3Cpath d='M5 4 5 30 12 23.6 17 34.2 22.4 31.8 17.4 21.4 27.4 21.4Z' fill='url(%23g)' stroke='%23fff6d8' stroke-width='3' stroke-linejoin='round'/%3E%3Cpath d='M5 4 5 30 12 23.6 17 34.2 22.4 31.8 17.4 21.4 27.4 21.4Z' fill='none' stroke='%233b2a1a' stroke-width='.9' stroke-linejoin='round'/%3E%3Cpath d='M5 4 5 14 Q7.2 11.2 8.8 13.4 Q10.4 9.4 13.2 11 L13.8 11Z' fill='%23fff' stroke='%23dfe9f2' stroke-width='.5' stroke-linejoin='round'/%3E%3Cpath d='M7.4 17.5 7.4 25 9.6 23' fill='none' stroke='%23fff' stroke-opacity='.45' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 5 4, pointer;
}
.fps-box {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 60;
  padding: .6em .9em;
  font:
    600 12px/1.45 ui-monospace,
    Menlo,
    monospace;
  white-space: nowrap;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.fps-box small {
  font-weight: 600;
  opacity: .75;
}
.fps-box .deg {
  color: #a3401c;
  opacity: 1;
}
.fps-box .fps-rec {
  pointer-events: auto;
  display: block;
  width: 100%;
  margin: .45em 0 0;
  padding: .3em .6em;
  font:
    800 11px/1.3 ui-monospace,
    Menlo,
    monospace;
  color: #4a2c16;
  white-space: normal;
  text-align: center;
  background: linear-gradient(#f6ead0, #e2cfa4);
  border: 1.5px solid #7a4a2a;
  border-radius: .45em;
  box-shadow: 0 .12em 0 #7a4a2a;
}
.fps-box .fps-rec:hover {
  filter: brightness(1.05);
}
.fps-box .fps-rec.on {
  color: #fff8ea;
  background: linear-gradient(#c4553a, #a3401c);
  border-color: #6e2a12;
  box-shadow: 0 .12em 0 #6e2a12;
}
.fps-box .fps-graph {
  position: static;
  inset: auto;
  display: block;
  margin: 0 0 .35em;
  border-bottom: 1px solid rgba(122, 74, 42, .35);
}
.finish-more {
  margin: 4px 0 14px;
  font-size: 0.95em;
  opacity: 0.85;
  text-align: center;
}
.gfx-level {
  margin-top: .5em;
}
.gfx-level.off {
  opacity: .55;
}
.gfx-level input:disabled {
  cursor: not-allowed;
}
.preload {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background: #16324f;
}
.preload::before {
  content: "";
  position: absolute;
  inset: -24px;
  background: url(assets/menu-bg.jpg) center 40% / cover no-repeat;
  filter: blur(7px) saturate(.9);
  transform: scale(1.04);
}
.preload::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse at 50% 42%,
      rgba(255, 244, 214, .18),
      rgba(14, 38, 64, .72));
}
body.ui-up .preload {
  display: none;
}
