/* Phone Threshold (portrait). The stone is never stretched sideways: all three panels share one horizontal scale, so the
   picture keeps the desktop's proportions (the same tall oval mouth), cropped to the phone instead of squeezed into it.
   The oval is sized from the screen (78% of the width, at most 54% of the height) and everything hangs off it: the title
   just above, one enter pill just below, then the counter row; music and the bell sit in the bottom corners, the
   header keeps ENTRANCE, SIGN IN and a settings button (threshold-phone.js) that holds MOTION, SOUND, TILT and the socials. */
@media (max-width:700px) and (orientation:portrait){
  dialog.world-welcome{
    --ph-oh:min(calc(78vw * 1.45),54svh);
    --ph-ow:calc(var(--ph-oh) / 1.45);
    --ph-kx:calc(var(--ph-ow) / 441.6);
    --ph-ky:calc(var(--ph-oh) / 404.6);
    --ph-yc:calc(50% - 10px);
    --ph-top:max(10px,env(safe-area-inset-top));
    --ph-bot:max(10px,env(safe-area-inset-bottom));
    --cave-middle:calc(var(--ph-kx) * 460);
  }
  /* the stone: one scale across the three panels, centred on the oval */
  dialog.world-welcome .welcome-world-window :is(.world-stone,.world-stone-left,.world-stone-right){
    inset:auto!important;top:calc(var(--ph-yc) - var(--ph-ky) * 484.6)!important;height:calc(var(--ph-ky) * 941)!important}
  dialog.world-welcome .welcome-world-window .world-stone{left:calc(50% - var(--ph-kx) * 230)!important;width:calc(var(--ph-kx) * 460)!important}
  dialog.world-welcome .welcome-world-window .world-stone-left{left:calc(50% - var(--ph-kx) * 830)!important;width:calc(var(--ph-kx) * 600)!important}
  dialog.world-welcome .welcome-world-window .world-stone-right{left:calc(50% + var(--ph-kx) * 230)!important;width:calc(var(--ph-kx) * 612)!important}
  /* the oval and its click target */
  dialog.world-welcome .world-depth{left:calc(50% - var(--ph-kx) * 211.6)!important;top:calc(var(--ph-yc) - var(--ph-ky) * 202.3)!important;
    width:var(--ph-ow)!important;height:var(--ph-oh)!important;right:auto!important;bottom:auto!important}
  dialog.world-welcome .world-explore{left:calc(50% - var(--ph-ow) / 2)!important;top:calc(var(--ph-yc) - var(--ph-oh) / 2)!important;
    width:var(--ph-ow)!important;height:var(--ph-oh)!important;border-radius:50%}
  dialog.world-welcome .cave-haze{
    -webkit-mask-image:radial-gradient(ellipse calc(var(--ph-ow) * .5) calc(var(--ph-oh) * .5) at 50% var(--ph-yc),transparent 98%,#000 100%)!important;
    mask-image:radial-gradient(ellipse calc(var(--ph-ow) * .5) calc(var(--ph-oh) * .5) at 50% var(--ph-yc),transparent 98%,#000 100%)!important}
  /* title and line: centred, just above the oval */
  dialog.world-welcome .world-caption,dialog.world-welcome[data-world-key] .world-caption{
    position:absolute!important;left:16px!important;right:16px!important;top:auto!important;width:auto!important;transform:none!important;translate:none!important;
    bottom:calc(100% - var(--ph-yc) + var(--ph-oh) / 2 + 14px)!important;display:flex;flex-direction:column;align-items:center;gap:4px!important;text-align:center!important;margin:0!important}
  dialog.world-welcome .world-caption h3{font-size:clamp(1.15rem,5.4vw,1.45rem)!important;line-height:1.15!important;margin:0!important;letter-spacing:.06em}
  dialog.world-welcome .world-caption p,dialog.world-welcome[data-world-key] .world-caption p{font-size:clamp(.66rem,2.9vw,.75rem)!important;line-height:1.35!important;
    letter-spacing:.04em!important;white-space:normal!important;max-width:36ch;margin:0!important;text-wrap:balance}
  dialog.world-welcome[data-world-key=tickets] #world-name{display:block!important}
  /* one clear way in, right under the oval */
  dialog.world-welcome .world-entry-hint{position:absolute!important;left:50%!important;right:auto!important;bottom:auto!important;translate:-50% 0!important;
    top:calc(var(--ph-yc) + var(--ph-oh) / 2 + 12px)!important;min-height:0!important;padding:8px 18px!important;border:1px solid rgba(var(--world-glow,214,206,198),.55);
    border-radius:999px;background:#0a0a0e8c;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);pointer-events:none}
  dialog.world-welcome .world-entry-hint .entry-hint-tap{font-size:.7rem!important;letter-spacing:.14em!important}
  /* the counter row: previous / 03 of 08 / next */
  dialog.world-welcome .world-controls{position:absolute!important;left:0!important;right:0!important;bottom:auto!important;translate:none!important;
    top:calc(var(--ph-yc) + var(--ph-oh) / 2 + 58px)!important;height:auto!important}
  dialog.world-welcome .world-navigation p,dialog.world-welcome .world-controls p,dialog.world-welcome .world-navigation .wn-sfx{display:none!important}
  /* logos inside the oval keep a clear margin to its edge */
  dialog.world-welcome .world-depth--ticketlogo img{left:18%!important;width:64%!important}
  dialog.world-welcome .fq-lockup{width:60%!important}
  dialog.world-welcome [data-world-id=dreamers] .dreamers-logo-lockup{left:20%!important;width:60%!important}
  dialog.world-welcome .ws-front{width:46%!important;margin:-31% 0 0 -23%!important}
  /* the screens behind it stand closer in, so no corner reaches the oval's edge */
  dialog.world-welcome .ws-s:not(.ws-front){width:34%!important;margin:-23% 0 0 -17%!important}
  dialog.world-welcome .ws-s1{transform:translate3d(-48%,-38%,-160px) rotateY(18deg)!important}
  dialog.world-welcome .ws-s2{transform:translate3d(50%,-30%,-180px) rotateY(-18deg)!important}
  dialog.world-welcome .ws-s3{transform:translate3d(-50%,58%,-260px) rotateY(22deg)!important}
  dialog.world-welcome .ws-s4{transform:translate3d(52%,62%,-280px) rotateY(-22deg)!important}
  dialog.world-welcome .ws-s5{transform:translate3d(0,-96%,-420px)!important}
  /* the socials live in the settings panel on a phone */
  dialog.world-welcome .threshold-socials{display:none!important}
  /* header: ENTRANCE left; SIGN IN and settings right */
  dialog.world-welcome .welcome-tools{top:var(--ph-top)!important;left:12px!important;right:12px!important;display:flex!important;flex-wrap:nowrap!important;
    align-items:center!important;justify-content:space-between!important;gap:8px!important;overflow:visible!important;z-index:30!important}
  dialog.world-welcome .welcome-tools>button[data-welcome-back]{margin:0!important;font-size:.72rem;letter-spacing:.08em}
  dialog.world-welcome .welcome-tools>div:not(.wt-panel){display:flex!important;flex-wrap:nowrap!important;align-items:center;gap:2px!important;margin-left:auto}
  dialog.world-welcome .welcome-tools .wt-more{display:inline-grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid #ffffff2e;border-radius:50%;
    background:#0b0b10b3;color:#e8e2da;cursor:pointer}
  dialog.world-welcome .welcome-tools[data-more-open] .wt-more{border-color:#ffffff73;background:#16161ee6}
  dialog.world-welcome .wt-panel{position:absolute;top:52px;right:0;display:none;flex-direction:column;align-items:stretch;min-width:196px;padding:6px;
    border:1px solid #ffffff26;border-radius:14px;background:#0b0b10eb;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);box-shadow:0 12px 34px #000a}
  dialog.world-welcome .welcome-tools[data-more-open] .wt-panel{display:flex;animation:wtPanel .22s cubic-bezier(.2,.7,.2,1) both}
  @keyframes wtPanel{from{opacity:0;translate:0 -4px}to{opacity:1;translate:0 0}}
  dialog.world-welcome .wt-panel>button{display:flex!important;align-items:center;justify-content:flex-start;width:100%;min-height:44px!important;margin:0!important;padding:0 12px!important;
    border:0!important;border-radius:9px!important;background:none!important;box-shadow:none!important;color:#e8e2da!important;font:inherit!important;font-size:.72rem!important;letter-spacing:.1em!important;text-align:left}
  dialog.world-welcome .wt-panel>button:focus-visible,dialog.world-welcome .wt-panel>button:hover{background:#ffffff12!important}
  dialog.world-welcome .wt-socials{display:flex;justify-content:space-between;gap:2px;margin-top:4px;padding:6px 4px 0;border-top:1px solid #ffffff1c}
  dialog.world-welcome .wt-socials a{display:grid;place-items:center;width:34px;height:40px;color:#d9d3cc}
  dialog.world-welcome .wt-socials svg{width:16px;height:16px}
}
@media (max-width:700px) and (orientation:portrait) and (prefers-reduced-motion:reduce){
  dialog.world-welcome .welcome-tools[data-more-open] .wt-panel{animation:none}
}
@media not all and (max-width:700px) and (orientation:portrait){.wt-more,.wt-panel{display:none!important}}
