/* CELESTIA — pages made in the Sales Console and the promotion pop-up (extras.js). Design pixels of the stage
   (1080 tall, --W / --H), the app's own colours and type (index.html :root) */
.xp { background: radial-gradient(ellipse 70% 60% at 50% 60%, #121845 0%, #070A20 70%, #05071A 100%); user-select: none; -webkit-user-select: none; }
.xp img { -webkit-user-drag: none; }
.xp h2 { margin: 24px 0 0; font-family: var(--serif); font-weight: 300; font-size: 64px; line-height: 1.05; }
.xp h2 em { color: var(--rose); }
.xp-sub { margin: 14px 0 0; font-family: var(--thai); font-size: 20px; font-weight: 300; color: var(--silver); }
.xp button { padding: 0; border: 0; background: none; }

/* story: a big picture, the text beside it, more pictures under the text */
.xp-story .xp-pic { position: absolute; left: 64px; top: 150px; bottom: 120px; width: calc(var(--W) * .5 - 64px); border-radius: 28px; overflow: hidden; background: #0C1030; cursor: zoom-in; box-shadow: 0 30px 70px rgba(0, 0, 0, .45); }
.xp-story .xp-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.xp-story .xp-text { position: absolute; left: calc(var(--W) * .5 + 64px); right: 96px; top: 50%; transform: translateY(-50%); max-height: calc(var(--H) - 240px); display: flex; flex-direction: column; }
.xp-body { margin-top: 28px; font-family: var(--thai); font-size: 20px; line-height: 1.75; font-weight: 300; color: #D6D9EA; overflow-y: auto; min-height: 0; }
.xp-body p { margin: 0 0 16px; }
.xp-strip { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }
.xp-strip button { width: 168px; height: 112px; border-radius: 14px; overflow: hidden; border: 1px solid rgba(169, 178, 211, .22); }
.xp-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* gallery: a grid of pictures (tap = full screen) */
.xp-gallery .xp-head { position: absolute; left: 64px; top: max(140px, calc(var(--H) / 2 - 400px)); }
.xp-grid { position: absolute; left: 64px; right: 64px; top: max(370px, calc(var(--H) / 2 - 170px)); bottom: 80px; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; overflow-y: auto; align-content: start; scrollbar-width: none; overscroll-behavior: contain; }
.xp-grid::-webkit-scrollbar { display: none; }
.xp-grid button { position: relative; aspect-ratio: 3 / 2; border-radius: 18px; overflow: hidden; background: #0C1030; }
.xp-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.xp-grid button:hover img { transform: scale(1.04); }
.xp-grid span { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 14px; background: linear-gradient(transparent, rgba(5, 7, 26, .85)); font-size: 15px; letter-spacing: .12em; text-align: left; color: var(--pearl); }

/* video: one film, big */
.xp-video .xp-head { position: absolute; left: 64px; top: max(140px, calc(var(--H) / 2 - 400px)); }
.xp-film { position: absolute; left: 50%; top: calc(50% + 80px); transform: translate(-50%, -50%); width: min(calc(var(--W) - 260px), calc((var(--H) - 420px) * 16 / 9)); aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: #000; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.page.show .xp-film.up { animation-name: xpFilm; }
@keyframes xpFilm { from { opacity: 0; transform: translate(-50%, calc(-50% + 40px)); } to { opacity: 1; transform: translate(-50%, -50%); } }
.xp-film video { width: 100%; height: 100%; display: block; }
.xp-none { margin: 0; height: 100%; display: flex; align-items: center; justify-content: center; font-family: var(--thai); color: var(--silver); }

/* web: a 360 work or a web page, full screen */
.xp-web iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #05071A; }
.xp-web .xp-wait { display: none; position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; border: 2px solid rgba(169, 178, 211, .2); border-top-color: var(--rose-hi); animation: xpSpin 1s linear infinite; }
.xp-web.busy .xp-wait { display: block; }
@keyframes xpSpin { to { transform: rotate(360deg); } }
.xp-err { display: none; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; text-align: center; font-family: var(--thai); font-size: 18px; color: var(--silver); }
.xp-err b { display: block; margin-bottom: 8px; font-family: var(--serif); font-weight: 300; font-size: 48px; color: var(--pearl); }
.xp-web.bad .xp-err { display: block; } .xp-web.bad iframe { visibility: hidden; }

/* promotion pop-up */
.xpromo { position: absolute; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(4, 5, 14, .8); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: fade .4s ease both; transition: opacity .3s ease; }
.xpromo.out { opacity: 0; }
.xpromo figure { position: relative; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 18px; animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.xpromo .xp-img { padding: 0; border: 0; background: none; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 90px rgba(0, 0, 0, .65); }
.xpromo .xp-img img { display: block; max-width: calc(var(--W) - 260px); max-height: calc(var(--H) - 280px); object-fit: contain; }
.xpromo figcaption { font-family: var(--thai); font-size: 22px; font-weight: 300; color: var(--pearl); text-align: center; }
.xpromo .xp-x { position: absolute; top: -28px; right: -28px; width: 64px; height: 64px; border-radius: 50%; border: 1px solid rgba(217, 165, 143, .7); background: rgba(8, 11, 32, .85); display: flex; align-items: center; justify-content: center; }
.xpromo .xp-nav { display: flex; align-items: center; gap: 20px; font-size: 16px; letter-spacing: .2em; color: var(--silver); }
.xpromo .xp-nav button { width: 56px; height: 56px; border-radius: 50%; border: 1px solid rgba(217, 165, 143, .7); background: rgba(8, 11, 32, .6); color: var(--pearl); font-size: 30px; line-height: 1; }
