/* Makeup Coach — phone prototype
   Soft cream stage; ~390px phone frame; Lovart PNGs + % hotspots */

:root {
  --cream: #f6efe6;
  --cream-deep: #ebe2d6;
  --ink: #3a2f2a;
  --muted: #8a7a70;
  --rose: #b87a7a;
  --bezel: #2c2420;
  --phone-w: min(390px, calc(100vw - 24px));
  /* 1152 × 2048 assets → 9:16 */
  --phone-h: calc(var(--phone-w) * 2048 / 1152);
  --radius: 36px;
}

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

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--cream);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

.stage {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 12px 28px;
  gap: 14px;
}

.stage-label {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-align: center;
}

.hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  max-width: 320px;
}

.phone {
  width: var(--phone-w);
  height: var(--phone-h);
  flex-shrink: 0;
}

.phone-bezel {
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  background: var(--bezel);
  padding: 10px;
  box-shadow:
    0 24px 48px rgba(58, 47, 42, 0.18),
    0 0 0 1px rgba(0, 0, 0, 0.08);
}

.screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: calc(var(--radius) - 8px);
  overflow: hidden;
  background: #f3ebe3;
}

.panel {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.panel.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

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

/* Transparent tappable regions — positions measured from Lovart PNGs */
.hotspot {
  position: absolute;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 14px;
  z-index: 2;
}

.hotspot:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
}

.hotspot:active {
  background: rgba(184, 122, 122, 0.14);
}

/* Header back chevron (nav row under status bar) */
.hotspot--back {
  top: 5.8%;
  left: 1.5%;
  width: 14%;
  height: 4.2%;
  border-radius: 50%;
}

/* Primary full-width mauve CTA (~84–90% from top) */
.hotspot--primary {
  left: 5%;
  right: 5%;
  width: auto;
  height: 6%;
  bottom: 10%;
}

/* Secondary outline / text under primary (~91–96%) */
.hotspot--secondary {
  left: 5%;
  right: 5%;
  width: auto;
  height: 5.2%;
  bottom: 4.2%;
}

/* —— per-screen tweaks —— */

.panel[data-id="welcome"] .hotspot--primary {
  bottom: 10.2%;
  height: 6%;
}

.panel[data-id="welcome"] .hotspot--secondary {
  bottom: 5.5%;
  height: 4%;
  left: 22%;
  right: 22%;
}

.panel[data-id="kit"] .hotspot--primary {
  bottom: 10.2%;
  height: 5.5%;
}

.panel[data-id="kit"] .hotspot--secondary {
  bottom: 4%;
  height: 5%;
}

.panel[data-id="look"] .hotspot--primary {
  left: 8%;
  right: 8%;
  bottom: 9.4%;
  height: 5.2%;
}

.panel[data-id="look"] .hotspot--secondary {
  bottom: 5%;
  height: 3.8%;
  left: 30%;
  right: 30%;
}

.panel[data-id="look"] .hotspot--card-everyday {
  left: 5.5%;
  width: 43%;
  top: 56%;
  height: 20%;
  border-radius: 16px;
}

.panel[data-id="look"] .hotspot--card-wind {
  right: 5.5%;
  left: auto;
  width: 43%;
  top: 56%;
  height: 20%;
  border-radius: 16px;
}

.panel[data-id="plan"] .hotspot--primary {
  bottom: 11%;
  height: 5.5%;
}

.panel[data-id="plan"] .hotspot--secondary {
  bottom: 5%;
  height: 5%;
}

.panel[data-id="step"] .hotspot--primary {
  bottom: 9%;
  height: 4.5%;
}

.panel[data-id="step"] .hotspot--secondary {
  left: 5%;
  width: 44%;
  right: auto;
  bottom: 3.8%;
  height: 4.5%;
}

.panel[data-id="step"] .hotspot--skip {
  left: 52%;
  right: 5%;
  width: auto;
  bottom: 3.8%;
  height: 4.5%;
}

.panel[data-id="checkpoint"] .hotspot--primary {
  bottom: 10.6%;
  height: 5.2%;
}

.panel[data-id="checkpoint"] .hotspot--secondary {
  bottom: 4.2%;
  height: 5%;
}

.panel[data-id="finish"] .hotspot--primary {
  left: 9%;
  right: 9%;
  bottom: 10.5%;
  height: 5%;
}

.panel[data-id="finish"] .hotspot--save {
  left: 10%;
  width: 38%;
  height: 5%;
  bottom: 4.8%;
}

.panel[data-id="finish"] .hotspot--library {
  left: 50%;
  width: 40%;
  height: 5%;
  bottom: 4.8%;
}

.panel[data-id="library"] .hotspot--primary {
  bottom: 11.1%;
  height: 5.2%;
}

.panel[data-id="library"] .hotspot--secondary {
  bottom: 5%;
  height: 5%;
}

.panel[data-id="library"] .hotspot--card-natural {
  left: 5.5%;
  right: 5.5%;
  top: 20%;
  height: 19%;
  border-radius: 16px;
}

.panel[data-id="library"] .hotspot--card-everyday {
  left: 5.5%;
  right: 5.5%;
  top: 40%;
  height: 19%;
  border-radius: 16px;
}

@media (max-width: 360px) {
  :root {
    --radius: 28px;
  }

  .phone-bezel {
    padding: 8px;
  }
}

@media (max-height: 720px) {
  .stage {
    padding-top: 12px;
    padding-bottom: 16px;
    justify-content: flex-start;
  }

  .stage-label,
  .hint {
    font-size: 11px;
  }
}
