@font-face {
  font-family: "Sunset Rotate";
  src: url("/frontend/assets/font1.woff") format("woff");
  font-display: swap;
}

html,
body {
  position: fixed;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
}

canvas {
  position: fixed !important;
  inset: 0;
  display: block;
  max-width: 100vw;
  max-height: 100dvh;
  touch-action: none;
}

body.sv-immersive-mode #game-header,
body.sv-immersive-mode [data-player-header] {
  display: none !important;
}

.sv-rotate-overlay {
  position: fixed;
  z-index: 90;
  inset: 0;
  overflow: hidden;
  color: #f7e5bd;
  background-color: #100705;
  background-image: url("/frontend/assets/sunset-valley-rotate-portrait.png");
  background-position: center;
  background-size: cover;
  font-family: "Avenir Next", "Segoe UI", Arial, sans-serif;
  text-align: center;
  -webkit-font-smoothing: antialiased;
}

.sv-rotate-overlay[hidden] {
  display: none;
}

.sv-rotate-overlay__copy {
  position: absolute;
  top: 60.8%;
  left: 50%;
  display: grid;
  width: min(78vw, 304px);
  gap: 10px;
  transform: translate(-50%, -50%);
}

.sv-rotate-overlay__title {
  margin: 0;
  color: #edc26b;
  font: 900 clamp(25px, 7.3vw, 30px)/1 "Sunset Rotate", Georgia, serif;
  letter-spacing: -.01em;
  text-shadow: 0 2px 2px rgba(0, 0, 0, .88), 0 0 18px rgba(226, 150, 42, .2);
  text-transform: uppercase;
  white-space: nowrap;
}

.sv-rotate-overlay__copy p {
  max-width: 270px;
  margin: 0 auto;
  color: #f7e5bd;
  font: 600 clamp(14px, 4vw, 16px)/1.35 Georgia, "Times New Roman", serif;
  text-wrap: balance;
  text-shadow: 0 2px 3px rgba(0, 0, 0, .92);
}

.sv-rotate-overlay__status {
  position: absolute;
  bottom: max(28px, env(safe-area-inset-bottom));
  left: 50%;
  width: min(76vw, 296px);
  transform: translateX(-50%);
  color: #e8bd67;
  font: 600 clamp(13px, 3.8vw, 15px)/1.2 Georgia, "Times New Roman", serif;
  letter-spacing: .025em;
  text-shadow: 0 2px 4px #090302;
}

@media (max-width: 430px) and (orientation: portrait) {
  body.sv-orientation-prompt-visible .sv-site-header--floating {
    top: 8px;
    width: calc(100% - 24px);
    border-radius: 12px;
  }

  body.sv-orientation-prompt-visible .sv-site-header__inner,
  body.sv-orientation-prompt-visible .sv-site-header--inset .sv-site-header__inner {
    min-height: 56px;
    gap: 4px;
    padding: 5px 6px;
  }

  body.sv-orientation-prompt-visible .sv-site-header__mark {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    font-size: 12px;
  }

  body.sv-orientation-prompt-visible .sv-header-account {
    min-height: 38px;
    padding: 5px 7px;
  }

  body.sv-orientation-prompt-visible .sv-header-balance {
    font-size: 13px;
  }

  body.sv-orientation-prompt-visible .sv-header-actions {
    gap: 4px;
  }

  body.sv-orientation-prompt-visible .sv-header-actions__utilities {
    padding: 2px;
  }

  body.sv-orientation-prompt-visible .sv-header-actions__cashier {
    gap: 5px;
  }

  body.sv-orientation-prompt-visible .sv-header-action,
  body.sv-orientation-prompt-visible .sv-header-action--primary,
  body.sv-orientation-prompt-visible .sv-header-action--secondary {
    width: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 8px;
  }

  body.sv-orientation-prompt-visible .sv-header-disconnect,
  body.sv-orientation-prompt-visible .wallet-disconnect-button.sv-header-disconnect {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }
}

@media (max-height: 720px) and (orientation: portrait) {
  .sv-rotate-overlay__copy {
    top: 60.8%;
    gap: 7px;
  }

  .sv-rotate-overlay__title {
    font-size: clamp(23px, 7vw, 28px);
  }

  .sv-rotate-overlay__copy p {
    font-size: clamp(12px, 3.6vw, 14px);
  }

  .sv-rotate-overlay__status {
    bottom: max(16px, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .sv-rotate-overlay * {
    animation: none !important;
  }
}
