/* The opening plate is an engraved globe set in ink. The type and dial have
   separate bounds, so moving greetings stay legible in either direction. */
#gate .wo-welcome {
  --frame-side: clamp(18px, 5vw, 82px);
  --night: #111f2a;
  --moon: #faf2d9;
  --night-muted: #c1ccca;
  --rule: #a7ad9870;
  --choice-space: clamp(251px, 33dvh, 295px);
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: max(265px, calc(100dvh - var(--choice-space))) auto;
  align-content: start;
  background:
    radial-gradient(ellipse at 74% 28%, #324e51 0%, transparent 46%),
    radial-gradient(ellipse at 17% 83%, #273a3d 0%, transparent 48%),
    linear-gradient(113deg, #10232c, #172930 62%, #101e28);
}
#gate .wo-sky {
  position: relative;
  inset: auto;
  align-self: stretch;
  min-height: 0;
  height: auto;
  --disc-center: 71%;
  --disc-top: calc(50% + 34px);
  --disc-size: min(41cqw, calc(84cqh - 68px), 445px);
}
#gate .wo-celestial {
  background: linear-gradient(90deg, #11252bab, #1a30333a 52%, transparent 85%);
}
#gate .wo-brand-bar {
  margin-inline: var(--frame-side);
  padding: max(11px, env(safe-area-inset-top)) 0 8px;
  border-block-end: 1px solid #c9bc8d4a;
}
#gate .wo-brand-bar .wo-brand { gap: .38em; font-size: clamp(24px, 2.85vw, 43px); }
#gate .wo-brand-bar .wo-brand img { width: .93em; height: .93em; }
#gate .wo-brand small { font-size: .49em; letter-spacing: .025em; color: #dec38a; }
#gate .wo-light-film.has-light { opacity: .055; }
#gate .wo-sphere,
#gate .wo-meridian {
  left: var(--disc-center);
  top: var(--disc-top);
  height: auto;
  aspect-ratio: 1;
  translate: -50% -50%;
}
#gate .wo-sphere {
  width: var(--disc-size);
  box-shadow: 0 0 0 1px #e3d2a07a, 0 15px 44px -24px #040d13;
}
#gate .wo-sphere::after { box-shadow: inset 0 0 0 1px #d4d7ba40; }
#gate .wo-meridian {
  width: calc(var(--disc-size) * 1.16);
  border: 0;
  transform: none;
  background: url('/brand/arrival-dial.svg') center / contain no-repeat;
}
#gate .wo-meridian::before, #gate .wo-meridian::after { display: none; }
#gate .wo-marquee {
  top: 31%;
  inset-inline: 0;
  color: #c5c6a9c2;
  mask-image: linear-gradient(90deg, transparent, #0008 5%, black 31%, #000a 75%, transparent);
}
#gate .wo-marquee + .wo-sphere + .wo-marquee { top: 76%; color: #a9c8c1d9; }
#gate .wo-marquee-track div {
  gap: clamp(34px, 7vw, 112px);
  padding-inline-end: clamp(34px, 7vw, 112px);
  font-size: clamp(1.05rem, 2.4vw, 2.45rem);
}
#gate .wo-lead {
  inset: auto auto calc(42% - 1em) var(--frame-side);
  width: calc(var(--disc-center) - var(--disc-size) * .55 - var(--frame-side) - 1rem);
  height: 1.41em;
  color: var(--moon);
  font: italic 400 clamp(48px, 8.7vw, 130px)/1.07 var(--serif, Georgia, serif);
  letter-spacing: -.057em;
  text-shadow: none;
}
#gate .wo-reel span {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  direction: ltr;
  padding-inline: .04em .1em;
}
#gate .wo-reel span:is([lang=ja],[lang=ko],[lang=zh-Hant],[lang=he]) { font-size: .79em; }
#gate .wo-location {
  inset: auto auto 4px var(--frame-side);
  max-width: 40%;
  color: var(--night-muted);
  font: .67rem/1.35 var(--sans);
  text-align: start;
}
#gate .wo-choice {
  align-self: start;
  container-type: inline-size;
  width: min(1040px, calc(100% - var(--frame-side) * 2));
  padding: 0 0 max(12px, env(safe-area-inset-bottom));
}
#gate .wo-choice h2 {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin: 0 0 .45rem;
  min-height: 1.55em;
  font: 500 1rem/1.4 var(--serif);
  color: var(--moon);
  text-align: start;
}
#gate .wo-choice h2::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
#gate .wo-terms { margin-block-start: .7rem; padding-block-start: .65rem; }
#gate .wo-terms-title { font-size: 1.09rem; }
#gate .wo-terms-summary { min-height: 3lh; }
#gate .wo-terms .wo-route { align-self: start; }
#gate .wo-docs summary { color: #decba1; }
#gate .wo-declined { color: #ffd5ae; }
#gate .wo-brand-bar .wo-icon { --liquid-white: #f9f4dc73; }

@media (min-width: 681px) and (min-height: 501px) {
  #gate .wo-terms-note { display: grid; grid-template-columns: minmax(0, 1fr) max-content; column-gap: 1.15rem; align-items: start; }
  #gate .wo-terms-title, #gate .wo-terms-summary { grid-column: 1; }
  #gate .wo-terms-summary { min-height: 2lh; }
  #gate .wo-docs:not([open]) { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  #gate .wo-docs[open], #gate .wo-declined { grid-column: 1 / -1; }
}
@media (min-width: 1500px) {
  #gate .wo-sky { --disc-center: 67%; }
}
@media (max-width: 680px) and (orientation: portrait), (min-width: 681px) and (max-width: 860px) and (max-aspect-ratio: 4/5) {
  #gate .wo-welcome { --frame-side: max(17px, 5vw); --choice-space: clamp(296px, 39dvh, 330px); }
  #gate .wo-sky {
    --disc-size: min(62cqw, calc(100cqh - 157px), 330px);
    --disc-center: 50%;
    --disc-top: calc(65px + var(--disc-size) * .58 + max(0px, (100cqh - var(--disc-size) - 182px) * .33));
  }
  #gate .wo-brand-bar { padding-block-start: max(7px, env(safe-area-inset-top)); }
  #gate .wo-brand-bar .wo-brand { font-size: clamp(21px, 5.9vw, 31px); }
  #gate .wo-marquee { top: 28%; }
  #gate .wo-marquee + .wo-sphere + .wo-marquee { top: 64%; }
  #gate .wo-marquee-track div { font-size: clamp(1.1rem, 4.8vw, 1.75rem); }
  #gate .wo-lead {
    inset: auto var(--frame-side) 12px;
    width: auto;
    font-size: clamp(48px, 13.3vw, 86px);
  }
  #gate .wo-reel span { justify-content: center; }
  #gate .wo-location { inset: auto var(--frame-side) 1px; max-width: none; text-align: center; }
}
@media (max-width: 680px) and (orientation: portrait) and (max-height: 620px) {
  #gate .wo-welcome { --choice-space: 296px; }
  #gate .wo-sky { --disc-size: min(63cqw, calc(100cqh - 145px)); }
  #gate .wo-lead { bottom: 7px; font-size: clamp(38px, 11.9vw, 61px); }
}
@media (max-height: 500px) and (min-aspect-ratio: 13/10) {
  #gate .wo-welcome { grid-template-columns: minmax(0,1fr) minmax(0,1.15fr); grid-template-rows: minmax(100%, auto); }
  #gate .wo-sky {
    align-self: start;
    height: max(100dvh, 260px);
    --disc-center: 50%;
    --disc-size: min(53cqw, 45cqh);
    --disc-top: calc(50% + 7px);
  }
  #gate .wo-brand-bar { margin-inline: 12px; }
  #gate .wo-brand-bar .wo-brand { font-size: 1.25rem; }
  #gate .wo-lead { inset: auto 8px 8px; width: auto; font-size: clamp(38px, 10.5dvh, 64px); }
  #gate .wo-reel span { justify-content: center; }
  #gate .wo-choice { justify-self: stretch; width: auto; padding: max(14px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) 8px; }
  #gate .wo-location { inset: auto 8px 0; max-width: none; text-align: center; font-size: .55rem; }
}
:root[data-contrast=true] #gate .wo-welcome { --night-muted: white; --rule: #c9c4a8; }
@media (forced-colors: active) {
  #gate .wo-meridian { display: none; }
}

/* The measure gets shorter as the reader enlarges type. Stack the legal text
   before its side column gets cramped. Keep the chooser anchored across languages. */
@container (max-width: 33em) {
  #gate .wo-terms-note { display: block; }
  #gate .wo-terms-summary { min-height: 3lh; }
}
@container (max-width: 14em) {
  #gate .wo-terms-summary { min-height: 5lh; }
  #gate .wo-docs:not([open]) summary { min-height: calc(2lh + .8rem); }
}
@container (max-width: 10.8em) {
  #gate .wo-choice h2 { min-height: 2lh; }
  #gate .wo-terms-title { min-height: 2lh; }
  #gate .wo-terms-summary { min-height: 7lh; }
}

/* In daylight the controls sit on the same stock as the edition. The engraving
   and globe remain part of the opening plate when the user changes appearance. */
:root[data-theme=light] #gate .wo-welcome {
  color-scheme: light;
  --moon: #1a2c39;
  --night-muted: #42505a;
  --rule: #23373a52;
  --liquid-white: #ffffffd6;
  --liquid-ink: #3b555a70;
  --liquid-shade: #34585352;
  --liquid-fill: inherit;
  --liquid-accent: inherit;
  --liquid-rim: inherit;
  background: linear-gradient(114deg, #f8f3e7, #ede6d7);
}
:root[data-theme=light] #gate .wo-celestial {
  background: linear-gradient(90deg, #f7f1e5d9 0%, #f5efdf60 51%, #f5efdf0d);
}
:root[data-theme=light] #gate .wo-brand-bar { border-color: var(--rule); }
:root[data-theme=light] #gate .wo-brand small, :root[data-theme=light] #gate .wo-docs summary { color: #745129; }
:root[data-theme=light] #gate .wo-marquee { color: #3e4c4a; }
:root[data-theme=light] #gate .wo-marquee + .wo-sphere + .wo-marquee { color: #635640; }
:root[data-theme=light] #gate .wo-location { background: #f5efdfed; padding-inline: .35em; }
:root[data-theme=light] #gate .wo-declined { color: #792d2a; }
:root[data-theme=light] #gate .wo-lang { color: var(--moon); text-shadow: none; }
:root[data-theme=light] #gate .wo-brand-bar .wo-icon, :root[data-theme=light] #gate .wo-enter { --liquid-white: #ffffffd6; }
@media (forced-colors: active) {
  #gate .wo-celestial { background: none; }
}
