/* Image-based clickable prototype — same iPhone 12 Pro frame as SoftSpot mobile demo */
:root {
  --phone-w: 420px;
  --phone-h: calc(var(--phone-w) * 851 / 454);
  --frame-inset-l: 3.9648%;
  --frame-inset-t: 1.9976%;
  --frame-inset-r: 3.9648%;
  --frame-inset-b: 2.0564%;
  --screen-radius: 12.98cqw;
  --phone-aspect: 454 / 851;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
  background: transparent;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.iphone-12-pro {
  width: var(--phone-w);
  height: var(--phone-h);
  position: relative;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  flex-shrink: 0;
}

.iphone-frame-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
  z-index: 30;
  image-rendering: auto;
  -webkit-user-drag: none;
}

.phone-screen {
  position: absolute;
  left: var(--frame-inset-l);
  top: var(--frame-inset-t);
  right: var(--frame-inset-r);
  bottom: var(--frame-inset-b);
  background: #fff;
  border-radius: var(--screen-radius);
  overflow: hidden;
  isolation: isolate;
  z-index: 1;
  container-type: size;
}

.proto-screen {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.proto-hotspots {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.proto-hotspot {
  position: absolute;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  -webkit-tap-highlight-color: transparent;
}

.proto-hotspot:focus-visible {
  outline: 2px solid rgba(0, 122, 255, 0.7);
  outline-offset: -2px;
}

.proto-hotspot:active {
  background: rgba(0, 122, 255, 0.08);
}

/* Embed: preserve device aspect ratio — never stretch UI text */
.embed-mode,
.embed-mode body {
  background: #ffffff !important;
  padding: 0;
  margin: 0;
  min-height: 100%;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.embed-mode html {
  overflow: hidden;
  height: 100%;
  width: 100%;
  background: #ffffff !important;
  color-scheme: only light;
}

.embed-mode body {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.embed-mode {
  --phone-w: 100%;
  --phone-h: auto;
}

.embed-mode .iphone-12-pro {
  width: 100%;
  height: auto;
  aspect-ratio: var(--phone-aspect);
  max-width: 100%;
  max-height: 100%;
  background: transparent !important;
  transform: none;
  overflow: hidden;
  flex-shrink: 0;
}

.embed-mode .phone-screen {
  pointer-events: auto;
}

.embed-mode .iphone-frame-overlay {
  pointer-events: none;
}

/* Fullscreen — app fills device, no phone chrome */
.fs-mode,
.fs-mode body {
  background: #fff !important;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}

.fs-mode html {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: #fff !important;
}

.fs-mode body {
  display: block;
}

.fs-mode .iphone-frame-overlay {
  display: none !important;
}

.fs-mode .iphone-12-pro {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  background: transparent !important;
  overflow: hidden;
}

.fs-mode .phone-screen {
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  border-radius: 0;
  width: 100%;
  height: 100%;
}

.fs-mode .proto-screen {
  object-fit: cover;
  object-position: top center;
}
