/* CELESTIA — VIRTUAL TOUR page (tour.js): 360 works full screen, a chooser of cover cards when there are more */
.tour { background: radial-gradient(ellipse 70% 60% at 50% 55%, #121845 0%, #070A20 70%, #05071A 100%); user-select: none; -webkit-user-select: none; }

/* the chooser: title on the left, one card per work */
.tr-pick { position: absolute; inset: 0; transition: opacity .5s ease; }
.tr-head { position: absolute; left: clamp(80px, calc(var(--W) * .0625), 120px); top: max(150px, calc(var(--H) / 2 - 380px)); }
.tr-head h2 { margin: 26px 0 0; font-family: var(--serif); font-weight: 300; font-size: 72px; line-height: 1; letter-spacing: .02em; }
.tr-head h2 em { color: var(--rose); }
.tr-head p { margin: 16px 0 0; font-family: var(--thai); font-weight: 300; font-size: 20px; color: var(--silver); }
/* one row (up to 4), else two; the card width (--cw) fits the screen (tour.js) */
.tr-cards { position: absolute; left: 0; right: 0; top: max(380px, calc(var(--H) / 2 - 140px)); display: grid; grid-template-columns: repeat(var(--cols, 2), var(--cw, 520px)); justify-content: center; gap: 28px; }
.tr-card { position: relative; width: var(--cw, 520px); aspect-ratio: 4 / 3; padding: 0; border: 1px solid rgba(169, 178, 211, .22); border-radius: 22px; overflow: hidden;
  background: #0B0F2E; text-align: left; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); transition: transform .5s cubic-bezier(.2, .8, .2, 1), border-color .4s, box-shadow .4s; }
.tr-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.04); transition: transform 1.2s cubic-bezier(.2, .8, .2, 1); }
.tr-card .nocover { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 40%, #1C2560, #0B0F2E 70%); color: var(--rose); }
.tr-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5, 7, 26, .92) 0%, rgba(5, 7, 26, .35) 42%, rgba(5, 7, 26, 0) 70%); }
.tr-card:active { transform: scale(.985); }
.tr-card:hover, .tr-card:focus-visible { border-color: var(--rose); box-shadow: 0 24px 60px rgba(0, 0, 0, .45), 0 0 0 1px var(--rose), 0 0 34px rgba(217, 165, 143, .25); }
.tr-card:hover img { transform: scale(1.09); }
.tr-card .deg { position: absolute; z-index: 1; top: 20px; left: 20px; padding: 6px 14px; border-radius: 99px; border: 1px solid rgba(242, 238, 246, .4); background: rgba(5, 7, 26, .45);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 13px; letter-spacing: .24em; color: var(--pearl); }
.tr-card .txt { position: absolute; z-index: 1; left: 28px; right: 28px; bottom: 24px; display: flex; align-items: flex-end; gap: 16px; }
.tr-card .txt span { flex: 1; min-width: 0; }
.tr-card b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(28px, calc(var(--cw, 520px) * .075), 40px); line-height: 1.05; letter-spacing: .04em; color: var(--pearl); }
.tr-card small { display: block; margin-top: 8px; font-family: var(--thai); font-weight: 300; font-size: 17px; color: var(--silver); }
.tr-card .go { flex: none; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--rose); color: var(--rose); transition: background .4s, color .4s; }
.tr-card:hover .go { background: var(--rose); color: var(--midnight); }
.tr-card.up { opacity: 0; }
.page.show .tr-card.up { animation: rise 1s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--d, 0) * 1ms + 250ms); }

/* a work open: the whole page */
.tr-view { position: absolute; inset: 0; background: #05071A; opacity: 0; pointer-events: none; transition: opacity .5s ease; }
.tr-view iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #05071A; }
.tour.open .tr-view { opacity: 1; pointer-events: auto; }
.tour.open .tr-pick { opacity: 0; pointer-events: none; }
.tr-view .an-wait { display: none; z-index: 2; }
.tour.loading .tr-view .an-wait { display: block; }
.tr-err { position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; display: none; text-align: center; font-family: var(--thai); font-size: 20px; font-weight: 300; color: var(--silver); }
.tr-err b { display: block; margin-bottom: 10px; font-family: var(--serif); font-weight: 300; font-size: 44px; color: var(--pearl); }
.tour.bad .tr-err { display: block; } .tour.bad .tr-view iframe { visibility: hidden; }

/* the switcher while a work is open (2 or more): back to the cards + one tab each */
.tour .tr-tabs { top: calc(40px + var(--sat, 0px)); display: none; background: rgba(8, 11, 32, .82); border-color: rgba(169, 178, 211, .35); box-shadow: 0 8px 24px rgba(0, 0, 0, .3); }
.tour.open.many .tr-tabs { display: flex; }
/* (".tour" first: the shared .fac-tabs style in index.html comes later and would win; Jost is loaded up to 500) */
.tour .tr-tabs button { height: 50px; font-size: 14px; font-weight: 500; letter-spacing: .2em; }
.tour .tr-tabs button:not(.on) { color: var(--pearl); }
/* a work open: the app's menu button moves to the lower left corner, out of the way of the work's own buttons
   (360 viewers usually keep one in the middle at the bottom) */
#stage .menu-btn { transition: transform .2s, opacity .3s, left .5s cubic-bezier(.2, .8, .2, 1), margin-left .5s cubic-bezier(.2, .8, .2, 1); }
#stage.tour-open:not(.is-open) .menu-btn { left: 52px; margin-left: 0; }
.tr-tabs .back { width: 46px; padding: 0; display: grid; place-items: center; letter-spacing: 0; }

/* nothing published */
.tour .tr-soon { display: none; }
.tour.empty .tr-soon { display: flex; }
.tour.empty .tr-pick, .tour.empty .tr-view { display: none; }
