/* Every game occupies the whole scene. The HUD never reserves a sidebar. */
.scene-dialog {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #101b27;
  border: 0;
  border-radius: 0;
  color: #fff;
}
.scene-dialog #dialog-content {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.scene-dialog .close {
  position: absolute;
  z-index: 20;
  right: 18px;
  top: 16px;
  background: #102333b8;
  color: #fff;
  border: 1px solid #ffffff38;
  box-shadow: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
}
.scene-heading {
  position: absolute;
  z-index: 8;
  top: 21px;
  left: 28px;
  right: 80px;
  pointer-events: none;
  display: flex;
  gap: 18px;
  align-items: center;
  color: #fff;
  text-shadow: 0 2px 12px #0008;
}
.scene-heading h2 {
  font:
    600 18px/1.2 "Trebuchet MS",
    sans-serif;
  margin: 0;
  letter-spacing: -0.4px;
}
.scene-heading span {
  font: 10px monospace;
  letter-spacing: 2px;
  opacity: 0.75;
}
.scene-layout,
.scene-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.scene-viewport {
  background: #152333;
}
.scene-viewport:after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    #06101d80,
    transparent 24%,
    transparent 65%,
    #06101d99
  );
  z-index: 1;
}
.scene-viewport canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.scene-panel {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  color: #fff;
  font-family: "Trebuchet MS", sans-serif;
}
.scene-panel h3 {
  position: absolute;
  left: 28px;
  top: 88px;
  max-width: 420px;
  margin: 0;
  font:
    500 clamp(24px, 3vw, 38px) / 1.12 Georgia,
    serif;
  text-shadow: 0 2px 12px #0009;
  letter-spacing: -0.7px;
}
.scene-description {
  position: absolute;
  top: 145px;
  left: 28px;
  max-width: 340px;
  background: #101e2ce8;
  border: 1px solid #ffffff22;
  backdrop-filter: blur(18px);
  border-radius: 15px;
  padding: 18px;
  color: #e0e8e9;
  font-size: 13px;
  line-height: 1.65;
  display: none;
  pointer-events: auto;
}
.show-help .scene-description {
  display: block;
}
.scene-help,
.scene-read-note {
  pointer-events: auto;
  position: absolute;
  border: 1px solid #ffffff38;
  background: #102333c9;
  color: #e2edef;
  border-radius: 22px;
  padding: 9px 14px;
  font:
    11px "Trebuchet MS",
    sans-serif;
  min-height: 36px;
}
.scene-help {
  left: 28px;
  bottom: 24px;
}
.scene-read-note {
  right: 28px;
  bottom: 24px;
}
.scene-score {
  position: absolute;
  right: 28px;
  top: 87px;
  padding: 12px 18px;
  border: 1px solid #ffffff30;
  background: #102333bc;
  backdrop-filter: blur(14px);
  border-radius: 28px;
  font: 600 12px/1.5 monospace;
  letter-spacing: 0.6px;
  max-width: 45%;
  text-align: center;
}
.scene-score:empty {
  display: none;
}
.scene-actions {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(800px, calc(100% - 40px));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  pointer-events: none;
}
.scene-actions > * {
  pointer-events: auto;
}
.scene-button {
  border: 1px solid #ffffff48;
  background: #e6d2a8;
  color: #18272d;
  min-height: 50px;
  padding: 13px 23px;
  border-radius: 30px;
  font:
    600 13px "Trebuchet MS",
    sans-serif;
  box-shadow: 0 5px 24px #0004;
  touch-action: none;
  transition:
    background 0.15s,
    transform 0.15s;
}
.scene-button:hover {
  background: #ffedc6;
  transform: translateY(-2px);
}
.scene-button:active {
  transform: translateY(1px);
}
.scene-button.secondary {
  background: #102333d9;
  color: #d2e6eb;
  border-color: #ffffff35;
}
.scene-button:disabled {
  opacity: 0.38;
  box-shadow: none;
  transform: none;
}
.scene-feedback {
  position: absolute;
  bottom: 140px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 540px;
  text-align: center;
  background: #102333de;
  color: #f4e1ba;
  padding: 11px 20px;
  border-radius: 30px;
  font:
    italic 15px/1.4 Georgia,
    serif;
  text-shadow: 0 1px 2px #000;
  margin: 0;
}
.scene-feedback:empty {
  display: none;
}
.scene-slider {
  display: block;
  min-width: 180px;
  font: 11px monospace;
  background: #102333df;
  padding: 8px 14px;
  border-radius: 12px;
}
.scene-slider span {
  display: block;
  margin-bottom: 4px;
}
.scene-slider input {
  width: 100%;
  accent-color: #efd19a;
  min-height: 28px;
}
.scene-meter {
  position: relative;
  height: 10px;
  flex: 0 0 180px;
  border: 1px solid #fff5;
  border-radius: 10px;
  margin: 20px 8px 10px;
  box-shadow: 0 3px 15px #0004;
}
.scene-meter:before {
  content: attr(data-label);
  position: absolute;
  bottom: 17px;
  left: 0;
  width: 100%;
  text-align: center;
  color: white;
  font: 10px monospace;
  text-shadow: 0 1px 5px #000;
}
.scene-meter span {
  position: absolute;
  top: -5px;
  width: 5px;
  height: 20px;
  background: #fff;
  border-radius: 3px;
  transform: translateX(-50%);
  box-shadow: 0 0 8px #fff8;
}
.scene-camera-help {
  position: absolute;
  z-index: 4;
  bottom: 19px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  color: #dde8e9;
  font: 10px monospace;
  text-align: center;
  letter-spacing: 1px;
  max-width: 50%;
  opacity: 0.8;
}
.scene-tour {
  position: absolute;
  z-index: 4;
  top: 156px;
  left: 28px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  pointer-events: none;
}
.scene-tour button {
  pointer-events: auto;
  background: #112937be;
  color: #fff;
  border: 1px solid #fff3;
  border-radius: 25px;
  padding: 9px 15px;
  font:
    11px "Trebuchet MS",
    sans-serif;
  min-height: 36px;
}
.scene-tour[hidden] {
  display: none;
}
.scene-loading,
.scene-fallback {
  margin: auto;
  padding: 40px;
  color: #f1e3c9;
}
.scene-dialog .success,
.scene-dialog .letter {
  margin: auto;
  max-width: 480px;
  padding: 30px;
  background: #f8f0e0;
  color: #553b43;
  border-radius: 20px;
}
.scene-button:focus-visible,
.scene-help:focus-visible,
.scene-read-note:focus-visible {
  outline: 3px solid #7ce5e9;
  outline-offset: 4px;
}
@media (max-width: 800px) {
  .scene-heading {
    left: 16px;
    top: 23px;
  }
  .scene-heading h2 {
    font-size: 15px;
  }
  .scene-heading span {
    display: none;
  }
  .scene-panel h3 {
    left: 16px;
    top: 76px;
    font-size: 24px;
    max-width: 65%;
  }
  .scene-score {
    top: 146px;
    left: 16px;
    right: auto;
    max-width: calc(100% - 32px);
    font-size: 10px;
    padding: 8px 12px;
  }
  .scene-actions {
    bottom: 76px;
    max-width: calc(100% - 24px);
    width: calc(100% - 24px);
    gap: 7px;
  }
  .scene-button {
    font-size: 11px;
    min-height: 46px;
    padding: 11px 15px;
    max-width: 100%;
  }
  .scene-feedback {
    bottom: 200px;
    max-width: calc(100% - 40px);
    width: max-content;
    font-size: 13px;
    padding: 9px 15px;
  }
  .scene-help {
    left: 14px;
    bottom: 17px;
  }
  .scene-read-note {
    right: 14px;
    bottom: 17px;
    font-size: 10px;
  }
  .scene-camera-help {
    display: none;
  }
  .scene-description {
    left: 16px;
    top: 189px;
    max-width: calc(100% - 32px);
    margin: 0;
    z-index: 8;
  }
  .scene-tour {
    left: 16px;
    top: 196px;
  }
  .scene-tour button {
    padding: 8px 12px;
    min-height: 32px;
  }
  .scene-meter {
    flex-basis: 140px;
    margin-top: 18px;
  }
  .scene-slider {
    min-width: 135px;
    max-width: 45%;
  }
}
@media (max-height: 550px) and (min-width: 600px) {
  .scene-panel h3 {
    font-size: 23px;
    top: 64px;
  }
  .scene-score {
    top: 64px;
  }
  .scene-actions {
    bottom: 50px;
  }
  .scene-help,
  .scene-read-note {
    bottom: 8px;
  }
  .scene-feedback {
    bottom: 110px;
  }
  .scene-tour {
    top: 110px;
  }
}
.arcade-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: #effaff;
  font: 12px monospace;
}
.arcade-live {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid #8ee5ed55;
  background: #0b142de3;
  border-radius: 8px;
  letter-spacing: 1px;
  box-shadow: 0 5px 24px #0004;
}
.arcade-live b {
  color: #9ef2e9;
  text-align: right;
}
.arcade-hud[data-mode="pizza"],
.arcade-hud[data-mode="lobby"],
.arcade-hud[data-mode="walking"] {
  display: none;
}
.arcade-reticle {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 1px solid #d7fbff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 1px 2px #000);
}
.arcade-reticle::before,
.arcade-reticle::after {
  content: "";
  position: absolute;
  background: #e8ffff;
}
.arcade-reticle::before {
  width: 2px;
  height: 40px;
  top: -7px;
  left: 12px;
}
.arcade-reticle::after {
  height: 2px;
  width: 40px;
  left: -7px;
  top: 12px;
}
.arcade-reticle.hit {
  border-color: #ffcf75;
  transform: translate(-50%, -50%) scale(1.35);
}
.arcade-power {
  display: none;
  position: absolute;
  left: 25%;
  right: 25%;
  bottom: 42px;
  height: 9px;
  background: #132034dd;
  border: 1px solid #91e6e4;
  border-radius: 8px;
  overflow: hidden;
}
.arcade-hud[data-mode="skee"] .arcade-power {
  display: block;
}
.arcade-power span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #70e6df, #ffcb72);
}
.arcade-gesture {
  position: absolute;
  height: 3px;
  background: #ffe4a6;
  transform-origin: left center;
  box-shadow: 0 0 10px #ffdd77;
}
.arcade-trigger {
  position: absolute;
  bottom: 50px;
  right: 20px;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 2px solid #9ef2e9;
  background: #183a4be6;
  color: white;
  font: bold 13px monospace;
  touch-action: none;
  box-shadow: 0 0 20px #71e4e755;
}
.arcade-trigger[hidden],
.arcade-reticle[hidden],
.arcade-gesture[hidden] {
  display: none;
}
.arcade-playing canvas {
  cursor: crosshair;
  outline: none;
}
.arcade-playing canvas:focus-visible {
  outline: 2px solid #f8cf78;
  outline-offset: -3px;
}
@media (max-width: 800px) {
  .arcade-live {
    top: 8px;
    left: 8px;
    right: 8px;
    font-size: 9px;
    padding: 8px;
    letter-spacing: 0;
  }
  .arcade-trigger {
    width: 58px;
    height: 58px;
    right: 12px;
    bottom: 38px;
  }
}

.arcade-live {
  top: 148px;
  left: auto;
  right: 28px;
  max-width: 320px;
  border-radius: 18px;
  font-size: 11px;
}
.arcade-trigger {
  z-index: 7;
  bottom: 155px;
  right: 30px;
  pointer-events: auto;
}
.arcade-power {
  bottom: 150px;
  left: 35%;
  right: 35%;
}
@media (max-width: 800px) {
  .arcade-live {
    top: 191px;
    left: 16px;
    right: auto;
    font-size: 10px;
    max-width: calc(100% - 32px);
  }
  .arcade-trigger {
    bottom: 210px;
    right: 18px;
  }
  .arcade-power {
    bottom: 190px;
    left: 25%;
    right: 25%;
  }
}

.scene-burst {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  font:
    800 25px "Trebuchet MS",
    sans-serif;
  text-shadow: 0 3px 14px #000b;
  white-space: nowrap;
}

.scene-sound {
  position: absolute;
  z-index: 8;
  right: 78px;
  top: 19px;
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 20px;
  border: 1px solid #fff3;
  background: #102333b8;
  color: #deebed;
  font:
    11px "Trebuchet MS",
    sans-serif;
}
.race-hud {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 190px;
  transform: translateX(-50%);
  width: 330px;
  max-width: 80%;
  pointer-events: none;
  color: #fff;
  font: 11px monospace;
}
.race-track {
  height: 30px;
  border-bottom: 2px solid #d9e3d56b;
  position: relative;
  margin-bottom: 16px;
}
.race-track span {
  position: absolute;
  bottom: -7px;
  padding: 5px 8px;
  border-radius: 12px;
  background: #29414a;
  font-size: 9px;
}
.race-track .race-you {
  bottom: 15px;
  background: #efd49f;
  color: #25383e;
}
.race-track i {
  position: absolute;
  right: 0;
  bottom: -20px;
  font-size: 9px;
  font-style: normal;
}
.race-beat {
  display: flex;
  gap: 25px;
  justify-content: center;
  align-items: center;
  font-size: 17px;
}
.race-beat b {
  display: inline-block;
  font-size: 22px;
}
@media (max-width: 800px) {
  .scene-sound {
    top: 62px;
    right: 16px;
    font-size: 10px;
  }
  .race-hud {
    bottom: 265px;
    width: 260px;
  }
}

.scene-help {
  z-index: 10;
}
.scene-description {
  z-index: 9;
}

.scene-panel .scene-feedback {
  bottom: calc(var(--actions-height, 50px) + 92px);
}
.arcade-live {
  display: none;
}
@media (max-width: 800px) {
  .scene-panel h3 {
    font-size: 22px;
    max-width: 72%;
  }
  .scene-score {
    top: 163px;
  }
  .scene-description {
    top: 205px;
  }
  .scene-tour {
    top: 210px;
  }
  .scene-panel .scene-feedback {
    bottom: calc(var(--actions-height, 80px) + 98px);
  }
}
.session-toolbar {
  position: absolute;
  right: 24px;
  top: 76px;
  z-index: 12;
  display: flex;
  gap: 7px;
}
.session-toolbar button,
.session-toolbar select {
  background: #20363de8;
  color: #f8ecda;
  border: 1px solid #ffffff25;
  border-radius: 18px;
  padding: 8px 12px;
  font: 12px system-ui;
}
.session-pause {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: #0b1925dd;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  color: #fff0d9;
}
.session-pause[hidden] {
  display: none;
}
.session-pause button {
  background: #eacfa1;
  border: 0;
  border-radius: 25px;
  padding: 14px 30px;
}
.scene-viewport:has(.session-pause:not([hidden])) .scene-panel {
  pointer-events: none;
}
.scene-viewport:has(.session-pause:not([hidden])) .session-toolbar {
  z-index: 51;
}
@media (max-width: 600px) {
  .session-toolbar {
    right: 15px;
    top: 120px;
  }
  .session-pause p {
    max-width: 90%;
    text-align: center;
  }
}
.session-toolbar {
  top: 160px;
}
.claw-assist {
  position: absolute;
  bottom: 45px;
  left: 20px;
  padding: 10px 16px;
  border: 1px solid #f7d9a655;
  border-radius: 20px;
  background: #1c3039;
  color: #f6dab1;
  z-index: 5;
}
.claw-assist[hidden] {
  display: none;
}
.scene-dialog > .close {
  z-index: 100;
}
