/* === [S03.50] Demo: portrait gate overlay styles === */
/* Shown only on touch devices held in portrait (see demo_orientation.js). Covers everything, including the toolbar and popups. */
.demo-orientation {
  --demo-orientation-ink: #F2F5F9;
  --demo-orientation-muted: #8C96A8;
  --demo-orientation-accent: #6FA0FF;
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 16px;
  background: rgba(17, 16, 17, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--demo-orientation-ink);
  text-align: center;
  touch-action: none;
  overscroll-behavior: contain;
  -webkit-user-select: none;
  user-select: none;
}

.demo-orientation.is-on { display: flex; }

.demo-orientation__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  max-width: 320px;
}

.demo-orientation__stage {
  position: relative;
  width: 200px;
  height: 150px;
}

.demo-orientation__arrow,
.demo-orientation__phone {
  position: absolute;
  overflow: visible;
}

.demo-orientation__arrow {
  left: 0;
  top: 0;
}

.demo-orientation__phone {
  left: 40px;
  top: 15px;
  width: 120px;
  height: 120px;
  transform-origin: 50% 50%;
  animation: demo-orientation-turn 2.2s ease-in-out infinite;
}

.demo-orientation__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
}

.demo-orientation__sub {
  margin: 6px 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--demo-orientation-muted);
}

/* Hold portrait, turn 90 degrees, hold landscape, turn back. */
@keyframes demo-orientation-turn {
  0%,
  18% { transform: rotate(0deg); }
  46%,
  82% { transform: rotate(90deg); }
  100% { transform: rotate(0deg); }
}

/* Reduced motion: no animation, a static landscape phone with the arrow. */
@media (prefers-reduced-motion: reduce) {
  .demo-orientation__phone {
    animation: none;
    transform: rotate(90deg);
  }
}

/* Scroll lock while the gate is shown. */
html.demo-orientation-lock,
html.demo-orientation-lock body {
  overflow: hidden;
}
