html,
body,
#root {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
}

html {
  min-height: 100%;
  --zh-sans-font:
    "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC",
    "Hiragino Sans GB", "Heiti SC", "SF Pro Display", "Segoe UI", ui-sans-serif,
    system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-family: var(--zh-sans-font);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  position: fixed;
  inset: 0;
  min-width: 0;
  min-height: 0;
  font-family: var(--zh-sans-font);
}

.landscape-shell {
  position: fixed;
  inset: 0;
  width: 100dvw;
  height: 100dvh;
  height: var(--app-height, 100dvh);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #000;
  padding:
    env(safe-area-inset-top, 0)
    env(safe-area-inset-right, 0)
    env(safe-area-inset-bottom, 0)
    env(safe-area-inset-left, 0);
  overscroll-behavior: none;
}

.landscape-scroll-area,
[data-landscape-scroll] {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.orientation-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  place-items: center;
  padding:
    calc(env(safe-area-inset-top, 0) + 1.25rem)
    calc(env(safe-area-inset-right, 0) + 1.25rem)
    calc(env(safe-area-inset-bottom, 0) + 1.25rem)
    calc(env(safe-area-inset-left, 0) + 1.25rem);
  overflow: hidden;
  background:
    radial-gradient(circle at 48% 18%, rgba(126, 99, 255, 0.18), transparent 28%),
    radial-gradient(circle at 18% 82%, rgba(219, 168, 92, 0.12), transparent 34%),
    linear-gradient(180deg, #050608 0%, #0a0c12 100%);
  color: rgba(250, 250, 246, 0.96);
  text-align: center;
}

.orientation-overlay__card {
  display: grid;
  justify-items: center;
  width: min(26rem, 92vw);
  gap: 0.9rem;
  padding: 1.4rem;
}

.orientation-overlay__icon {
  position: relative;
  width: 5.2rem;
  height: 3.2rem;
  border: 2px solid rgba(255, 238, 203, 0.86);
  border-radius: 0.95rem;
  box-shadow:
    inset 0 0 0 0.32rem rgba(255, 255, 255, 0.04),
    0 0 2rem rgba(126, 99, 255, 0.18);
}

.orientation-overlay__icon::before {
  position: absolute;
  top: 50%;
  right: -1.3rem;
  width: 0.58rem;
  height: 0.58rem;
  border-top: 2px solid rgba(255, 238, 203, 0.86);
  border-right: 2px solid rgba(255, 238, 203, 0.86);
  content: "";
  transform: translateY(-50%) rotate(45deg);
}

.orientation-overlay__icon::after {
  position: absolute;
  right: -1.6rem;
  bottom: -0.52rem;
  width: 1.7rem;
  height: 1.7rem;
  border-right: 2px solid rgba(139, 181, 255, 0.78);
  border-bottom: 2px solid rgba(139, 181, 255, 0.78);
  border-radius: 50%;
  content: "";
}

.orientation-overlay h1 {
  margin: 0;
  color: rgba(255, 248, 232, 0.98);
  font-size: clamp(1.45rem, 5.6vw, 2rem);
  font-weight: 820;
  line-height: 1.15;
  letter-spacing: 0;
}

.orientation-overlay p {
  max-width: 22rem;
  margin: 0;
  color: rgba(226, 232, 240, 0.72);
  font-size: clamp(0.92rem, 3.4vw, 1.02rem);
  font-weight: 560;
  line-height: 1.65;
}

html.is-portrait-orientation body > :not(.orientation-overlay) {
  visibility: hidden !important;
  pointer-events: none !important;
}

html.is-portrait-orientation .orientation-overlay {
  display: grid;
  visibility: visible !important;
  pointer-events: auto !important;
}

html.is-landscape-orientation .orientation-overlay {
  display: none;
}
