.exchange-phone-scene { position: relative; min-width: 0; width: 100%; }
.exchange-phone-canvas { position: fixed; inset: 0; z-index: 1; width: 100vw; height: 100vh; pointer-events: none; }
.exchange-phone-display, .exchange-phone-fallback { position: fixed; left: 0; top: 0; transform-origin: 50% 50%; }
.exchange-phone-fallback { z-index: 1; pointer-events: none; }
.exchange-phone-display { z-index: 2; overflow: hidden; color: #eee; isolation: isolate; backface-visibility: hidden; }
.exchange-phone-content { position: absolute; top: 0; left: 0; width: 390px; height: 844px; transform-origin: 0 0; }
.exchange-phone-content #exchange-app { display: block; width: 100%; height: 100%; border: 0; }
.exchange-phone-content .load-panel { color: #ddd; overflow-wrap: anywhere; }
.exchange-phone-content .load-panel.is-error .loading-mark { display: none; }
/* Interactive exchange device, sharing the existing phone geometry. */
.exchange-phone-content {
  --exchange-status: 55px;
  --exchange-home: 27px;
  font-family: -apple-system, BlinkMacSystemFont, "Arial", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.exchange-phone-display {
  background: #090a0b;
  user-select: none;
  -webkit-user-select: none;
  -webkit-backface-visibility: hidden;
}
.exchange-phone-fallback {
  border: 4px solid #a39c90;
  background: #08090b;
  box-shadow: inset 0 0 0 1px #faf9f5a8, 2px 1px 0 #5e5b55, 0 13px 23px #25282416;
}
.exchange-phone-fallback::before,
.exchange-phone-fallback::after {
  content: "";
  position: absolute;
  width: 3px;
  border-radius: 2px;
  background: #8f8b82;
}
.exchange-phone-fallback::before { left: -6px; top: 20%; height: 13%; }
.exchange-phone-fallback::after { right: -6px; top: 28%; height: 12%; }
.exchange-phone-status {
  position: absolute;
  z-index: 4;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--exchange-status);
  padding: 2px 7% 0;
  color: #fff;
  background: transparent;
  pointer-events: none;
}
.exchange-phone-status [data-phone-time] {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.exchange-phone-island {
  position: absolute;
  left: 50%;
  top: 21%;
  width: 29%;
  max-width: 112px;
  height: 60%;
  border-radius: 30px;
  background: #050505;
  transform: translateX(-50%);
  box-shadow: inset 0 0 0 1px #171717;
}
.exchange-phone-island::after {
  content: "";
  position: absolute;
  right: 10%;
  top: 35%;
  width: 8%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #11141e;
  box-shadow: inset 0 0 0 2px #0c0d13;
}
.exchange-phone-indicators { display: flex; align-items: center; gap: 4px; }
.exchange-phone-indicators svg { width: 18px; height: 14px; fill: currentColor; }
.exchange-phone-indicators svg:last-child { width: 26px; }
.exchange-phone-desktop {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: calc(var(--exchange-status) + 32px);
  background: #19282c url("media/phone-alpine-lake.jpg") center / cover;
  transform-origin: center;
}
.exchange-phone-desktop::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(#06120b52, #06120b1f 38%, transparent 58%, #06120b1f);
  pointer-events: none;
}
.exchange-wallpaper {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.exchange-wallpaper.is-static { visibility: hidden; }
.exchange-phone-clock {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #f8fbf9;
  text-shadow: 0 1px 8px #07252b22;
}
.exchange-phone-clock [data-phone-date] { font-size: 17px; font-weight: 500; }
.exchange-phone-clock [data-phone-clock] {
  font-size: 86px;
  font-weight: 550;
  line-height: 1.2;
  letter-spacing: -.06em;
  font-variant-numeric: tabular-nums;
}
.exchange-phone-apps {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  margin-top: 48px;
  padding: 0 18px;
}
.exchange-phone-apps > button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 0 0 8px;
  border: 0;
  background: none;
  color: #fff;
  font: inherit;
  font-size: 14px;
  line-height: 1.2;
  text-shadow: 0 1px 4px #001d26a8;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.exchange-phone-apps img {
  display: block;
  flex: none;
  width: 66px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 22.5%;
  object-fit: contain;
  box-shadow: 0 2px 5px #00121d24;
  -webkit-user-drag: none;
}
.exchange-phone-apps > button:hover img { filter: brightness(1.08); }
.exchange-phone-apps > button:active img { filter: brightness(.85); }
.exchange-phone-apps > button:focus-visible { outline: 2px solid #fff; outline-offset: 5px; border-radius: 14px; }
.exchange-page-dot {
  position: absolute;
  z-index: 1;
  bottom: calc(var(--exchange-home) + 28px);
  left: calc(50% - 3px);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffffd1;
}
.exchange-phone-app-window {
  position: absolute;
  z-index: 2;
  top: var(--exchange-status);
  bottom: var(--exchange-home);
  left: 0;
  right: 0;
  background: #101010;
  overflow: hidden;
  transform-origin: center;
}
.exchange-phone-content .exchange-phone-app-window #exchange-app { width: 100%; height: 100%; }
.exchange-phone-display[data-app="exchange"],
.exchange-phone-display[data-app="exchange"] .exchange-phone-status { background: #101010; color: #fff; }
.exchange-home-indicator {
  position: absolute;
  z-index: 5;
  bottom: 9px;
  left: 33%;
  width: 34%;
  height: 5px;
  border-radius: 5px;
  background: #fff;
  pointer-events: none;
}
.exchange-phone-display[data-app] .exchange-home-indicator { display: none; }
.exchange-home-gesture {
  position: absolute;
  z-index: 5;
  bottom: 0;
  left: 0;
  display: grid;
  align-items: end;
  justify-items: center;
  width: 100%;
  height: var(--exchange-home);
  padding: 0;
  border: 0;
  background: #101010;
  cursor: pointer;
}
.exchange-home-gesture > span { width: 34%; height: 5px; margin-bottom: 9px; border-radius: 5px; background: #fff; }
.exchange-home-gesture:focus-visible { outline: 2px solid #aaa; outline-offset: -3px; }
.exchange-phone-cover {
  position: absolute;
  z-index: 9;
  inset: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: transparent;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.exchange-phone-cover:focus-visible { outline: 3px solid #ddd; outline-offset: -6px; }
.exchange-phone-scene[data-grab="held"] .exchange-phone-cover,
.exchange-phone-scene[data-grab="dragging"] .exchange-phone-cover { cursor: grabbing; }
.exchange-phone-desktop[hidden],
.exchange-phone-app-window[hidden],
.exchange-home-gesture[hidden],
.exchange-phone-cover[hidden] { display: none !important; }
html.exchange-phone-open, body.exchange-phone-open { overflow: hidden; }
body.exchange-phone-open .exchange-phone-canvas,
body.exchange-phone-open .exchange-phone-fallback { z-index: 1001; }
body.exchange-phone-open .exchange-phone-display { z-index: 1002; }
.exchange-phone-experience {
  --phone-shade: 1;
  position: fixed;
  z-index: 1000;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, var(--phone-shade));
  color: #222;
  overflow: hidden;
  animation: none !important;
}
.exchange-phone-experience[open] { display: block; animation: none !important; }
.exchange-phone-experience::backdrop { background: rgba(255, 255, 255, var(--phone-shade)); }
.exchange-phone-experience-header {
  position: fixed;
  z-index: 1003;
  inset: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  min-height: 55px;
  padding: 7px 24px;
}
.exchange-phone-experience-header > button {
  display: flex;
  justify-self: start;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: #333;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.exchange-phone-experience-header > button:last-child { justify-self: end; }
.exchange-phone-experience-header > button[hidden] { visibility: hidden; display: flex !important; }
.exchange-phone-experience-header h2 { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.3; letter-spacing: 0; text-align: center; }
.exchange-phone-experience .exchange-phone-display,
.exchange-phone-display[data-device-phase="focused"] { user-select: auto; -webkit-user-select: auto; }
/* Older engines keep the live iframe in place, avoiding an authentication reload. */
.exchange-phone-experience[open]:not(:modal) {
  position: static;
  width: 0;
  height: 0;
  overflow: visible;
  background: transparent;
}
.exchange-phone-experience[open]:not(:modal)::before {
  content: "";
  position: fixed;
  z-index: 1000;
  inset: 0;
  background: rgba(255, 255, 255, var(--phone-shade));
}
.exchange-ground-shadow { position: fixed; z-index: 0; height: 9px; border-radius: 50%; background: #26231f; pointer-events: none; }
@media (max-width: 700px) {
  .exchange-phone-experience-header { gap: 5px; padding: 7px 15px; }
  .exchange-phone-experience-header > button { gap: 5px; font-size: 12px; }
  .exchange-phone-experience-header h2 { font-size: 14px; }
}
@media (max-width: 359px) {
  .exchange-phone-experience-header > button { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  video.exchange-wallpaper { visibility: hidden; }
  .exchange-phone-content .loading-mark { animation: none; }
}

.exchange-phone-app-window[data-closed="true"] { visibility: hidden; pointer-events: none; }

/* Same physical device and studio materials as the social customization page. */
.exchange-phone-canvas { z-index: 3; }
body.exchange-phone-open .exchange-phone-canvas { z-index: 1003; }
.exchange-phone-experience-header { z-index: 1004; }
.exchange-phone-model-credit { margin: 24px 0 0; color: #777; font-size: 11px; line-height: 1.6; }
.exchange-phone-model-credit a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
