/* Native snapping settles whole scenes; nested reading panes scroll independently. */
html { scroll-snap-type: y mandatory; }
#scene, #quiz { scroll-snap-align: start; scroll-snap-stop: always; }
html.is-modal-open { overflow: hidden; scroll-snap-type: none; overscroll-behavior: none; }
html.is-modal-open body { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }
.space-landing .moon-language { width: 48px; height: 48px; min-width: 48px; min-height: 48px; padding: 0; right: auto; display: grid; place-items: center; transform: none; }
.space-landing .moon-language span { transform: none; letter-spacing: 0; line-height: 1; text-align: center; }
.space-landing .request-sheet {
  --dialog-padding: 28px; --dialog-gap: 32px;
  position: fixed; inset: var(--dialog-top, 0px) 0 auto;
  margin: auto; top: calc(var(--dialog-top, 0px) + var(--dialog-height, 100dvh) / 2);
  transform: translateY(-50%); width: min(680px, calc(100% - 32px));
  max-width: none; min-height: 0; max-height: calc(var(--dialog-height, 100dvh) - 32px);
  padding: var(--dialog-padding); overflow: hidden; overscroll-behavior: contain;
  border: 1px solid #536873; border-radius: 12px; background: #071018; color: #d9f7ff;
  box-shadow: 0 24px 70px #0009; backdrop-filter: none; animation: none;
  scrollbar-color: #536873 #071018; font-family: 'IBM Plex Mono', monospace;
}
.request-sheet > [data-form-view], .request-sheet > [data-success-view] { max-height: calc(var(--dialog-height, 100dvh) - var(--dialog-gap) - var(--dialog-padding) * 2 - 2px); overflow-y: auto; overscroll-behavior: contain; padding: 3px; scrollbar-width: thin; }
.request-sheet::backdrop { background: #01040abf; }
.request-sheet::before { display: none; }
.request-sheet header { display: block; padding-right: 36px; margin-bottom: 18px; }
.request-sheet h2 { font: 700 clamp(23px, 3vw, 30px)/1.2 'Space Mono', 'Courier New', monospace; color: #ffc857; letter-spacing: -.02em; }
.request-sheet header p { max-width: 52ch; margin-top: 6px; color: #a7cbd5; font: 400 16px/1.4 'IBM Plex Mono', monospace; }
.request-sheet .field > span { color: #d9f7ff; font: 500 14px/1.4 'IBM Plex Mono', monospace; }
.request-sheet .field b { color: #ffc857; margin-left: 5px; }
.request-sheet .field em, .request-sheet .form-footer > span { color: #a7cbd5; font-size: 12px; }
.request-sheet .field input, .request-sheet .field textarea { color: #e3faff; background: #101f2a; border: 1px solid #43616d; border-radius: 4px; font: 400 16px/1.4 'IBM Plex Mono', monospace; caret-color: #ffc857; }
.request-sheet .field input::placeholder { color: #95b5bf; opacity: 1; }
.request-sheet .field input:focus, .request-sheet .field textarea:focus { background: #142a37; border-color: #7ee7ff; outline: 2px solid #7ee7ff; outline-offset: 2px; }
.request-sheet .field input[aria-invalid='true'] { border-color: #ffac97; }
.request-sheet .field small { color: #ffb7a5; font-size: 13px; }
.request-sheet .form-footer { gap: 0; align-items: stretch; flex-direction: column; margin-top: 0; }
.request-sheet .form-footer .sheet-action { align-self: flex-end; }
.request-sheet .form-footer #request-status:not(:empty) { margin-bottom: 12px; }
.request-sheet .sheet-action { color: #071018; background: #ffc857; border-radius: 4px; min-height: 48px; padding: 10px 16px; font: 700 14px/1.4 'Space Mono', monospace; box-shadow: none; }
.request-sheet .sheet-action:hover { background: #ffda89; transform: none; box-shadow: none; }
.request-sheet .sheet-close { top: 8px; right: 8px; color: #7ee7ff; border-radius: 4px; background: #071018; }
.request-sheet .sheet-close:hover { background: #142a37; }
.request-sheet :focus-visible { outline: 2px solid #7ee7ff; outline-offset: 3px; }
.request-sheet #request-title:focus { outline: none; }
.request-sheet .success-view { min-height: 0; padding: 12px; }
.request-sheet .success-view p { color: #a7cbd5; }
.request-sheet .form-challenge { min-width: 0; }
.request-sheet form { min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.request-sheet .field, .request-sheet .field input, .request-sheet .field textarea { min-width: 0; max-width: 100%; }
.request-sheet #request-status, .request-sheet #captcha-status { overflow-wrap: anywhere; }
.request-sheet #request-captcha { max-width: 100%; }
.request-sheet #captcha-status:empty { display: none; }
.request-sheet #captcha-status { color: #a7cbd5; font-size: 13px; line-height: 1.4; margin-top: 8px; }
.request-sheet #captcha-retry { min-height: 44px; padding: 8px 0; border: 0; background: none; color: #7ee7ff; font: 500 14px 'IBM Plex Mono', monospace; text-decoration: underline; cursor: pointer; }
.request-sheet #captcha-retry[hidden], .request-sheet #request-status:empty { display: none; }
.request-sheet #request-status { color: #ffb7a5; font-size: 16px; line-height: 1.4; margin: 0; }
.request-sheet .sheet-action:disabled { opacity: .65; cursor: progress; }
@media (max-width: 600px) {
  .space-landing .request-sheet { --dialog-padding: 18px; --dialog-gap: 20px; width: calc(100% - 20px); max-height: calc(var(--dialog-height, 100dvh) - 20px); }
  .request-sheet form { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .request-sheet .field--wide { grid-column: 1 / -1; }
  .request-sheet .form-footer { align-items: stretch; flex-direction: column; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .space-landing .request-sheet { --dialog-padding: 18px; }
  .request-sheet header { margin-bottom: 16px; }
  .request-sheet form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .request-sheet .field--wide { grid-column: 1 / -1; }
}
@media (max-width: 600px) and (max-height: 650px) {
  .space-landing .request-sheet { --dialog-padding: 14px; }
  .request-sheet header { margin-bottom: 14px; }
}
@media (forced-colors: active) {
  .space-landing .request-sheet { border-color: CanvasText; background: Canvas; color: CanvasText; }
}
