/* Full-screen, coordinate-locked satellite descent. */
.satellite-approach {
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  transform: scale(1.025);
  filter: none;
  background: #01070a;
  transition: opacity .42s ease, transform .7s cubic-bezier(.16, 1, .3, 1), visibility .42s;
}

.satellite-approach.visible {
  transform: none;
  opacity: var(--satellite-reveal);
}

.satellite-approach .satellite-frame {
  inset: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.satellite-approach .satellite-source {
  transform-origin: var(--sat-x) var(--sat-y);
  transform: scale(calc(1.08 + var(--satellite-reveal) * .5));
  filter: saturate(1.04) contrast(1.08) brightness(.72);
  transition: transform .12s linear;
}

.satellite-approach.closeup .satellite-source {
  transform-origin: var(--sat-x) var(--sat-y);
  transform: translate(calc(50% - var(--sat-x)), calc(50% - var(--sat-y))) scale(calc(1.28 + var(--satellite-reveal) * .72));
  transition: transform .65s cubic-bezier(.16, 1, .3, 1);
}

.satellite-approach.closeup .satellite-crosshair {
  left: 50%;
  top: 50%;
  transition: left .65s cubic-bezier(.16, 1, .3, 1), top .65s cubic-bezier(.16, 1, .3, 1), transform .3s ease;
}

.satellite-approach.closeup .satellite-vignette {
  background: radial-gradient(circle at 50% 50%, transparent 0 9%, rgba(0, 0, 0, .1) 30%, rgba(0, 4, 8, .7) 100%);
}

.satellite-approach .satellite-orbit-label {
  top: max(76px, calc(env(safe-area-inset-top) + 64px));
  left: clamp(18px, 4vw, 64px);
  right: auto;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(130, 245, 239, .2);
  border-radius: 999px;
  background: rgba(0, 9, 14, .58);
  backdrop-filter: blur(8px);
}

.satellite-orbit-label b {
  color: #7ff4ec;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .04em;
}

.satellite-approach .satellite-meta {
  left: clamp(18px, 4vw, 64px);
  right: clamp(18px, 4vw, 64px);
  bottom: max(142px, calc(env(safe-area-inset-bottom) + 126px));
  padding: 10px 13px;
  border-radius: 13px;
  background: rgba(0, 8, 12, .62);
  backdrop-filter: blur(8px);
}

.satellite-approach .satellite-crosshair {
  width: clamp(58px, 9vw, 92px);
  height: clamp(58px, 9vw, 92px);
  border-width: 2px;
  box-shadow: 0 0 0 8px rgba(117, 255, 242, .05), 0 0 30px rgba(117, 255, 242, .34);
}

.satellite-approach .satellite-vignette {
  background: radial-gradient(circle at var(--sat-x) var(--sat-y), transparent 0 9%, rgba(0, 0, 0, .1) 30%, rgba(0, 4, 8, .68) 100%);
}

/* Gallery VR/AR launchers. */
.xr-controls {
  position: absolute;
  z-index: 7;
  top: max(92px, calc(env(safe-area-inset-top) + 82px));
  inset-inline-end: 14px;
  display: flex;
  gap: 7px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: .28s ease;
}

.gallery.open .xr-controls {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.xr-button {
  min-width: 58px;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: .04em;
  border-color: rgba(111, 241, 234, .38);
  background: rgba(0, 15, 21, .72);
}

.xr-controls[data-message]::after {
  content: attr(data-message);
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  width: max-content;
  max-width: 240px;
  padding: 8px 10px;
  border-radius: 10px;
  color: #fff;
  background: rgba(3, 12, 17, .94);
  font-size: 11px;
}

.xr-overlay {
  --xr-look-x: 0px;
  --xr-look-y: 0px;
  position: fixed;
  z-index: 120;
  inset: 0;
  display: none;
  overflow: hidden;
  color: #efffff;
  background: #000;
}

.xr-overlay.open { display: block; }

.xr-header {
  position: absolute;
  z-index: 8;
  top: max(12px, env(safe-area-inset-top));
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px 9px 14px;
  border: 1px solid rgba(120, 244, 237, .22);
  border-radius: 16px;
  background: rgba(1, 10, 14, .68);
  backdrop-filter: blur(10px);
}

.xr-header div { display: grid; gap: 3px; }
.xr-header strong { font-size: clamp(14px, 2vw, 19px); }
.xr-header small { color: #8fc4c7; font-size: 11px; }

.xr-runtime-badge {
  margin-inline-start: auto;
  padding: 6px 10px;
  border: 1px solid rgba(117, 255, 242, .34);
  border-radius: 999px;
  color: #aafff8;
  background: rgba(10, 64, 66, .34);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .05em;
  white-space: nowrap;
}

.xr-close {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 13px;
  color: #fff;
  background: rgba(0, 0, 0, .45);
  font-size: 25px;
  cursor: pointer;
}

.xr-vr-stage,
.xr-ar-stage { position: absolute; inset: 0; display: none; }
.mode-vr .xr-vr-stage { display: grid; }
.mode-ar .xr-ar-stage { display: block; }

.xr-launcher,
.xr-native-host { position: absolute; inset: 0; display: none; }

.mode-launcher .xr-launcher {
  display: grid;
  grid-template-columns: minmax(300px, .72fr) minmax(580px, 1.28fr);
  gap: clamp(18px, 2.8vw, 42px);
  padding: clamp(86px, 10vh, 112px) clamp(18px, 4vw, 66px) clamp(22px, 4vh, 42px);
  overflow: auto;
  background:
    linear-gradient(90deg, rgba(1, 9, 13, .96), rgba(1, 12, 17, .76)),
    radial-gradient(circle at 75% 24%, rgba(33, 219, 205, .2), transparent 26%),
    linear-gradient(145deg, #01070b, #041921 58%, #02090d);
}

.xr-launcher-visual {
  position: sticky;
  top: 0;
  min-height: min(720px, calc(100vh - 140px));
  overflow: hidden;
  border: 1px solid rgba(126, 244, 237, .26);
  border-radius: 30px;
  background: #031116;
  box-shadow: 0 32px 80px rgba(0, 0, 0, .46), inset 0 0 60px rgba(71, 238, 227, .05);
}
.xr-launcher-visual > img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.88) contrast(1.08); animation: xr-preview-drift 16s ease-in-out infinite alternate; }
.xr-preview-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 4, 7, .05), rgba(0, 8, 12, .12) 35%, rgba(0, 8, 12, .94)); }
.xr-preview-copy { position: absolute; z-index: 2; inset-inline: 28px; bottom: 30px; display: grid; gap: 7px; }
.xr-preview-copy small { color: #6ff5ea; font-size: 10px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.xr-preview-copy strong { font-size: clamp(28px, 3.4vw, 49px); line-height: 1.05; text-shadow: 0 8px 30px #000; }
.xr-preview-copy span { color: #b9d0d2; font-size: 13px; font-weight: 700; }
.xr-preview-orbit { position: absolute; z-index: 2; top: 34px; inset-inline-end: 28px; width: 104px; height: 104px; border: 1px solid rgba(117, 255, 242, .38); border-radius: 50%; animation: xr-orbit 14s linear infinite; }
.xr-preview-orbit::before, .xr-preview-orbit::after { content: ''; position: absolute; inset: 18px; border: 1px dashed rgba(117, 255, 242, .34); border-radius: 50%; }
.xr-preview-orbit::after { inset: 41px; border-style: solid; background: #75fff2; box-shadow: 0 0 22px #75fff2; }
.xr-preview-orbit i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px #75fff2; }
.xr-preview-orbit i:nth-child(1) { left: 4px; top: 50%; }.xr-preview-orbit i:nth-child(2) { right: 13px; top: 17px; }.xr-preview-orbit i:nth-child(3) { left: 48%; bottom: -3px; }

.xr-launcher-main { min-width: 0; display: grid; align-content: center; gap: 18px; padding: 8px 0; }
.xr-launcher-copy { text-align: start; }
.xr-launcher-copy span { color: #74fff3; font-size: 11px; font-weight: 900; letter-spacing: .28em; }
.xr-launcher-copy h2 { margin: 9px 0 0; font-size: clamp(28px, 4.2vw, 58px); line-height: 1.02; }
.xr-launcher-copy p { margin: 10px 0 0; color: #9eb6b9; font-size: 13px; }

.xr-type-switch { width: max-content; display: flex; gap: 6px; padding: 5px; border: 1px solid rgba(126, 244, 237, .18); border-radius: 15px; background: rgba(0, 8, 12, .66); }
.xr-type-switch button { min-width: 142px; padding: 10px 15px; border: 0; border-radius: 11px; color: #91aaad; background: transparent; font-weight: 900; cursor: pointer; }
.xr-type-switch button.active { color: #032225; background: #75fff2; box-shadow: 0 0 22px rgba(117, 255, 242, .22); }

.xr-capability-rail { display: flex; flex-wrap: wrap; gap: 7px; }
.xr-capability-rail span { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 999px; color: #b2c7ca; background: rgba(4, 19, 25, .74); font-size: 10px; font-weight: 800; }
.xr-capability-rail span.ok b { color: #75fff2; text-shadow: 0 0 9px #75fff2; }
.xr-capability-rail span.fallback b { color: #f8c76c; }

.xr-mode-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.launcher-ar .xr-mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.xr-mode-card {
  position: relative;
  min-height: 260px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: 112px auto 1fr auto;
  gap: 10px;
  padding: 0 16px 15px;
  overflow: hidden;
  border: 1px solid rgba(125, 247, 240, .25);
  border-radius: 24px;
  color: #efffff;
  text-align: start;
  background: linear-gradient(150deg, rgba(8, 37, 46, .9), rgba(1, 12, 18, .92));
  box-shadow: inset 0 1px rgba(255, 255, 255, .06), 0 20px 60px rgba(0, 0, 0, .22);
  cursor: pointer;
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}

.xr-mode-card:hover,
.xr-mode-card:focus-visible {
  transform: translateY(-5px);
  border-color: rgba(117, 255, 242, .7);
  background: linear-gradient(150deg, rgba(9, 66, 72, .94), rgba(2, 19, 28, .96));
  outline: none;
}

.xr-mode-art { grid-column: 1 / 3; position: relative; margin: 0 -16px; overflow: hidden; border-bottom: 1px solid rgba(117, 255, 242, .16); }
.xr-mode-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .02), rgba(3, 18, 23, .84)); }
.xr-mode-art img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.72) contrast(1.12); transition: transform .55s cubic-bezier(.16, 1, .3, 1), filter .4s ease; }
.xr-mode-card:hover .xr-mode-art img { transform: scale(1.08); filter: saturate(1.02) contrast(1.08); }
.xr-mode-card > b { position: absolute; z-index: 2; top: 82px; inset-inline-start: 16px; width: 45px; height: 45px; display: grid; place-items: center; border: 1px solid rgba(117, 255, 242, .45); border-radius: 14px; color: #75fff2; background: rgba(2, 20, 25, .86); font-size: 23px; line-height: 1; text-shadow: 0 0 24px rgba(117, 255, 242, .5); }
.xr-mode-card .xr-mode-copy { grid-column: 1 / 3; display: grid; align-content: start; gap: 7px; padding-top: 4px; }
.xr-mode-card strong { font-size: clamp(17px, 1.65vw, 23px); }
.xr-mode-card small { color: #a9c1c4; font-size: 12px; line-height: 1.55; }
.xr-mode-card em { width: max-content; padding: 5px 8px; border-radius: 8px; color: #75fff2; background: rgba(117, 255, 242, .09); font-size: 9px; font-style: normal; font-weight: 900; }
.xr-mode-card > i { align-self: center; color: #75fff2; font-size: 18px; font-style: normal; }
.xr-pro-hint { margin: 0; padding: 10px 12px; border-inline-start: 2px solid #75fff2; color: #8ea7aa; background: rgba(117, 255, 242, .035); font-size: 10px; line-height: 1.55; }

@keyframes xr-preview-drift { from { transform: scale(1.03) translate3d(-1%, 0, 0); } to { transform: scale(1.11) translate3d(2%, -1%, 0); } }
@keyframes xr-orbit { to { transform: rotate(360deg); } }

.mode-native .xr-native-host { display: block; }
.xr-native-host canvas { width: 100% !important; height: 100% !important; display: block; }
.native-ar { background: transparent; }
.native-ar .xr-header { background: rgba(1, 10, 14, .5); }

.xr-native-tools {
  position: absolute;
  z-index: 10;
  left: 50%;
  bottom: max(18px, calc(env(safe-area-inset-bottom) + 10px));
  display: none;
  align-items: center;
  gap: 6px;
  padding: 7px;
  border: 1px solid rgba(117, 255, 242, .28);
  border-radius: 17px;
  background: rgba(1, 12, 17, .7);
  backdrop-filter: blur(14px);
  transform: translateX(-50%);
}
.native-ar .xr-native-tools { display: flex; }
.xr-native-tools span { padding: 0 8px; color: #a8c1c4; font-size: 10px; font-weight: 800; white-space: nowrap; }
.xr-native-tools button { width: 42px; height: 42px; border: 1px solid rgba(117, 255, 242, .18); border-radius: 12px; color: #eaffff; background: rgba(8, 41, 49, .8); font-size: 20px; font-weight: 900; cursor: pointer; }
.xr-native-tools button:hover, .xr-native-tools button:focus-visible { border-color: #75fff2; color: #021c20; background: #75fff2; outline: none; }

.xr-vr-stage {
  grid-template-columns: 1fr 1fr;
  direction: ltr;
  touch-action: none;
  cursor: grab;
  background: #000;
}

.xr-eye {
  position: relative;
  overflow: hidden;
  border-inline-end: 1px solid rgba(120, 244, 237, .16);
  background: #020507;
}

.xr-eye img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate3d(var(--xr-look-x), var(--xr-look-y), 0) scale(1.16);
  filter: saturate(1.05) contrast(1.04);
  transition: transform 80ms linear;
}

.xr-eye-left img { margin-left: -1.2%; }
.xr-eye-right img { margin-left: 1.2%; }
.xr-eye i { position: absolute; inset: 0; box-shadow: inset 0 0 16vw #000; border-radius: 28%; pointer-events: none; }

.variant-gallery .xr-eye {
  background: radial-gradient(circle at 50% 45%, #123741, #01070a 68%);
  perspective: 900px;
}
.variant-gallery .xr-eye img {
  object-fit: contain;
  transform: translate3d(var(--xr-look-x), var(--xr-look-y), 0) rotateY(calc(var(--xr-look-x) * -.045)) scale(.72);
  border: 5px solid rgba(117, 255, 242, .5);
  border-radius: 18px;
  box-shadow: 0 25px 80px #000;
}

.variant-cinema .xr-eye { background: linear-gradient(#010305 0 12%, #10181c 12% 86%, #000 86%); }
.variant-cinema .xr-eye img {
  object-fit: contain;
  transform: translate3d(var(--xr-look-x), var(--xr-look-y), 0) scale(.78);
  border: 8px solid #15262b;
  box-shadow: 0 0 50px rgba(117, 255, 242, .13), 0 28px 80px #000;
}

.xr-vr-reticle,
.xr-ar-reticle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(196, 255, 250, .72);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(111, 241, 234, .24);
}

.xr-ar-stage video { width: 100%; height: 100%; object-fit: cover; background: #020507; }
.xr-error .xr-ar-stage { background: radial-gradient(circle at 50% 45%, #09212a, #010507 64%); }

.xr-ar-grid {
  position: absolute;
  inset: 0;
  opacity: .28;
  background-image: linear-gradient(rgba(119, 240, 232, .13) 1px, transparent 1px), linear-gradient(90deg, rgba(119, 240, 232, .13) 1px, transparent 1px);
  background-size: 52px 52px;
  transform: rotate(var(--xr-heading));
  mask-image: radial-gradient(circle, #000 0 30%, transparent 72%);
}

.xr-ar-reticle { width: 72px; height: 72px; }
.xr-ar-reticle i { position: absolute; inset: 12px; border: 1px dashed #7ff4ec; border-radius: 50%; }

.xr-ar-card {
  position: absolute;
  left: 50%;
  bottom: max(26px, calc(env(safe-area-inset-bottom) + 18px));
  width: min(560px, 90vw);
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(126, 244, 237, .36);
  border-radius: 20px;
  background: rgba(1, 12, 17, .76);
  backdrop-filter: blur(12px);
  transform: translate(calc(-50% + var(--xr-look-x) * .32), calc(var(--xr-look-y) * .22));
}

.xr-ar-card img { width: 92px; height: 68px; object-fit: cover; border-radius: 13px; }
.xr-ar-card div { min-width: 0; display: grid; gap: 3px; }
.xr-ar-card strong { font-size: clamp(17px, 3vw, 24px); overflow-wrap: anywhere; }
.xr-ar-card span { color: #83eee7; font-size: 12px; font-weight: 800; }
.xr-ar-card small { direction: ltr; color: #b7c9cc; font-variant-numeric: tabular-nums; }

.variant-guide .xr-ar-grid { opacity: .48; mask-image: radial-gradient(circle, #000 0 48%, transparent 82%); }
.variant-guide .xr-ar-card { bottom: auto; top: 50%; transform: translate(-50%, -50%); }

.xr-photo-strip {
  position: absolute;
  z-index: 9;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  display: none;
  gap: 7px;
  padding: 7px;
  border: 1px solid rgba(117, 255, 242, .2);
  border-radius: 15px;
  background: rgba(0, 7, 10, .66);
  backdrop-filter: blur(10px);
  transform: translateX(-50%);
}

.fallback.mode-vr .xr-photo-strip,
.fallback.mode-ar .xr-photo-strip { display: flex; }
.xr-photo-strip button { width: 48px; height: 34px; padding: 0; overflow: hidden; border: 1px solid transparent; border-radius: 9px; background: #061014; cursor: pointer; }
.xr-photo-strip button.active { border-color: #75fff2; box-shadow: 0 0 14px rgba(117, 255, 242, .38); }
.xr-photo-strip img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 1100px) {
  .mode-launcher .xr-launcher { grid-template-columns: 1fr; align-content: start; }
  .xr-launcher-visual { position: relative; min-height: 340px; }
  .xr-launcher-main { align-content: start; }
}

@media (max-width: 720px) {
  .satellite-approach { inset: 0; width: 100%; height: 100%; transform: scale(1.02); }
  .satellite-approach.visible { transform: none; }
  .satellite-approach .satellite-frame { inset: 0; border-radius: 0; }
  .satellite-approach .satellite-orbit-label { top: max(62px, calc(env(safe-area-inset-top) + 52px)); left: 12px; }
  .satellite-approach .satellite-meta { left: 12px; right: 12px; bottom: max(128px, calc(env(safe-area-inset-bottom) + 114px)); }
  .xr-controls { top: max(142px, calc(env(safe-area-inset-top) + 132px)); inset-inline-end: 10px; flex-direction: column; }
  .xr-button { min-width: 54px; padding: 8px 9px; font-size: 11px; }
  .xr-header { left: 8px; right: 8px; }
  .xr-runtime-badge { display: none; }
  .mode-launcher .xr-launcher { grid-template-columns: 1fr; align-content: start; gap: 16px; padding: 86px 10px 24px; }
  .xr-launcher-visual { position: relative; min-height: 230px; border-radius: 22px; }
  .xr-preview-copy { inset-inline: 18px; bottom: 18px; }
  .xr-preview-copy strong { font-size: 29px; }
  .xr-preview-orbit { top: 18px; inset-inline-end: 18px; width: 72px; height: 72px; }
  .xr-preview-orbit::before { inset: 13px; }.xr-preview-orbit::after { inset: 28px; }
  .xr-launcher-main { gap: 13px; padding: 0; }
  .xr-launcher-copy h2 { font-size: 31px; }
  .xr-type-switch { width: 100%; }
  .xr-type-switch button { min-width: 0; flex: 1; padding-inline: 8px; font-size: 11px; }
  .xr-mode-grid, .launcher-ar .xr-mode-grid { grid-template-columns: 1fr; gap: 9px; }
  .xr-mode-card { min-height: 210px; grid-template-rows: 92px auto 1fr auto; border-radius: 18px; }
  .xr-mode-card > b { top: 68px; }
  .xr-ar-card { grid-template-columns: 74px 1fr; width: 92vw; }
  .xr-ar-card img { width: 74px; height: 58px; }
  .xr-photo-strip button { width: 42px; height: 30px; }
  .xr-native-tools span { display: none; }
  .xr-native-tools button { width: 38px; height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .satellite-approach, .satellite-approach .satellite-frame img, .xr-eye img, .xr-controls, .xr-launcher-visual > img, .xr-preview-orbit { transition: none; animation: none; }
}
