/* pengyyy shell only. Reuses the download page's fixed local sunset asset. */
body.gate-page {
  box-sizing: border-box;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: 24px 18px;
  padding: calc(24px + env(safe-area-inset-top, 0px))
    calc(18px + env(safe-area-inset-right, 0px))
    calc(24px + env(safe-area-inset-bottom, 0px))
    calc(18px + env(safe-area-inset-left, 0px));
  display: grid;
  place-items: center;
  color-scheme: dark;
  background-color: #291f29;
  background-image: linear-gradient(180deg, rgb(26 23 35 / 30%), rgb(31 25 37 / 28%) 48%, rgb(21 22 34 / 66%)),
    url('/__pp_gate/sunset.webp');
  background-position: center, 65% center;
  background-size: cover;
  background-repeat: no-repeat;
  color: #fff7f0;
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  -webkit-text-size-adjust: 100%;
}

body.gate-page *,
body.gate-page *::before,
body.gate-page *::after { box-sizing: border-box; }

body.gate-page main.gate-card {
  width: 100%;
  max-width: 360px;
  min-width: 0;
  min-height: 280px;
  margin: 0;
  padding: 30px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(255 230 214 / 24%);
  border-radius: 22px;
  background: linear-gradient(145deg, rgb(47 34 45 / 86%), rgb(29 29 44 / 88%));
  box-shadow: 0 18px 60px rgb(12 12 26 / 22%), inset 0 1px 0 rgb(255 239 220 / 5%);
  text-align: center;
  overflow-wrap: anywhere;
}

/* A warm orbit echoes the sunset; no extra copy or device fingerprint script. */
body.gate-page main.gate-card::before {
  content: "";
  display: block;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  margin-bottom: 20px;
  border: 2px solid rgb(255 225 195 / 14%);
  border-top-color: #ffe0bb;
  border-right-color: #dfa588;
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgb(255 209 171 / 4%);
  animation: pengyyy-gate-spin 1.2s linear infinite;
}

body.gate-page .gate-brand {
  order: -1;
  margin: 0 0 24px;
  color: #ffe1c5;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-indent: 0.08em;
}

body.gate-page .gate-assurance {
  margin: 12px 0 0;
  color: #e2ccc1;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.02em;
}

body.gate-page main.gate-card h1 {
  max-width: 100%;
  margin: 0;
  color: #fff7f0;
  font-size: clamp(16px, 4.5vw, 19px);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.025em;
}

/* Reserve the full ellipsis width: animation never moves the heading. */
body.gate-page .gate-dots {
  display: inline-block;
  width: 3ch;
  margin-left: 0.1em;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0;
  vertical-align: bottom;
  text-align: left;
}
body.gate-page .gate-dots > span {
  display: block;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
  animation: pengyyy-gate-dots 1.6s steps(4, end) infinite;
}

/* Keep the existing JS status target; no success/failure text is displayed. */
body.gate-page #gate-status { display: none; }

body.gate-page #gate-retry {
  max-width: 100%;
  min-height: 44px;
  margin: 24px 0 0;
  padding: 10px 23px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(255 219 187 / 42%);
  border-radius: 10px;
  background: rgb(255 221 188 / 9%);
  color: #ffe1c5;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  touch-action: manipulation;
}
@media (hover: hover) {
  body.gate-page #gate-retry:hover { background: rgb(255 221 188 / 17%); border-color: #efc3a1; }
}
body.gate-page #gate-retry:focus-visible { outline: 2px solid #ffe0bb; outline-offset: 4px; }
body.gate-page #gate-retry:disabled { opacity: 0.55; cursor: default; }
body.gate-page noscript p { margin: 18px 0 0; color: #e2ccc1; font-size: 13px; line-height: 1.7; }
body.gate-page.gate-retry-state main.gate-card::before { visibility: hidden; animation: none; }
body.gate-page.gate-retry-state .gate-dots > span { width: 100%; animation: none; }
body.gate-page [hidden] { display: none !important; }

@keyframes pengyyy-gate-spin { to { transform: rotate(360deg); } }
@keyframes pengyyy-gate-dots { to { width: 4ch; } }
@media (prefers-reduced-motion: reduce) {
  body.gate-page main.gate-card::before { animation: none; }
  body.gate-page .gate-dots > span { width: 100%; animation: none; }
}
