/* ===== Real-Screen Interactive App Prototype (Strict CSP: zero inline styles) ===== */

.hero-figure {
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.phone-device {
  width: clamp(256px, 25vw, 294px);
  padding: 9px;
  border-radius: 38px;
  margin-inline: auto;
  position: relative;
}

.phone-screen-wrap {
  position: relative;
  aspect-ratio: 5 / 11;
  border-radius: 30px;
  overflow: hidden;
  background: var(--page);
  user-select: none;
}

.phone-screen-wrap [hidden] {
  display: none !important;
}

/* Stacked Real Screenshot Layers */
.proto-screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.992);
}

@media (prefers-reduced-motion: no-preference) {
  .proto-screen {
    transition: opacity 0.18s ease, transform 0.18s ease;
  }
}

.proto-screen.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  z-index: 2;
}

.proto-img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

/* ===== Deterministic Light / Auto / Dark Switching via html[data-theme] ===== */
.proto-img-dark,
.proto-img-auto,
.hs-home-d,
.hs-dock-minibar {
  display: none;
}

html[data-theme-pref="auto"]:not([data-theme="dark"]) .proto-img-has-auto {
  display: none;
}

html[data-theme-pref="auto"]:not([data-theme="dark"]) .proto-img-auto {
  display: block;
}

html[data-theme="dark"] .proto-img-light,
html[data-theme="dark"] .proto-img-auto,
html[data-theme="dark"] .hs-home-l {
  display: none;
}

html[data-theme="dark"] .proto-img-dark,
html[data-theme="dark"] .hs-home-d,
html[data-theme="dark"] .hs-dock-minibar {
  display: block;
}

/* Transparent Tactile Hotspots */
.proto-spot {
  position: absolute;
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 12px;
  cursor: pointer;
  z-index: 3;
}

.proto-spot.is-pill {
  border-radius: 999px;
}

.proto-spot.is-card {
  border-radius: 16px;
}

.proto-spot:hover,
.proto-spot:focus-visible {
  background: rgba(240, 88, 130, 0.16);
  box-shadow: inset 0 0 0 1.5px rgba(240, 88, 130, 0.65);
  outline: none;
}

/* Figma-style flash highlight when tapping a non-interactive region */
.phone-screen-wrap.is-flashing .proto-screen.is-active .proto-spot {
  background: rgba(240, 88, 130, 0.16);
  box-shadow: inset 0 0 0 1.5px rgba(240, 88, 130, 0.68);
}

/* ===== Pixel-Aligned Hotspot Positions (640x1408 / 1440x3168 real UI) ===== */

/* Shared Bottom Dock Tabs */
.hs-dock-home     { left: 5%;    top: 90.0%; width: 22.5%; height: 7.5%; }
.hs-dock-live     { left: 27.5%; top: 90.0%; width: 22.5%; height: 7.5%; }
.hs-dock-rooms    { left: 50%;   top: 90.0%; width: 22.5%; height: 7.5%; }
.hs-dock-settings { left: 72.5%; top: 90.0%; width: 22.5%; height: 7.5%; }

/* Dark-only floating mini-player above bottom dock (live-dark / rooms-dark / settings-dark) */
.hs-dock-minibar  { left: 4%;    top: 81.8%; width: 78%;   height: 6.6%; }

/* Top-left unified back pill on secondary pages */
.hs-back-pill     { left: 3.5%;  top: 6.0%;  width: 34%;   height: 4.4%; }
.hs-back-short    { left: 3.5%;  top: 6.0%;  width: 24%;   height: 4.4%; }

/* Home Screen: Shared top controls */
.hs-home-inbox      { left: 74%;   top: 6.0%;  width: 11%;   height: 4.5%; }
.hs-home-avatar     { left: 85.5%; top: 6.0%;  width: 10.5%; height: 4.5%; }
.hs-home-live-all   { left: 84%;   top: 12.2%; width: 12.5%; height: 2.8%; }
.hs-home-live-card  { left: 4%;    top: 16.2%; width: 92%;   height: 23.2%; }

/* Home Screen Light (with 2 live concerts shifting lower blocks down) */
.hs-home-l-q-live   { left: 3.5%;  top: 73.0%; width: 22%;   height: 5.5%; }
.hs-home-l-q-replay { left: 27%;   top: 73.0%; width: 22%;   height: 5.5%; }
.hs-home-l-q-music  { left: 50.5%; top: 73.0%; width: 22%;   height: 5.5%; }
.hs-home-l-q-flip   { left: 74%;   top: 73.0%; width: 22%;   height: 5.5%; }
.hs-home-l-music-all{ left: 84%;   top: 80.5%; width: 12.5%; height: 2.8%; }
.hs-home-l-recent   { left: 4%;    top: 83.8%; width: 78%;   height: 6.0%; }

/* Home Screen Dark (compact spacing without concert rows) */
.hs-home-d-q-live   { left: 3.5%;  top: 58.2%; width: 22%;   height: 5.5%; }
.hs-home-d-q-replay { left: 27%;   top: 58.2%; width: 22%;   height: 5.5%; }
.hs-home-d-q-music  { left: 50.5%; top: 58.2%; width: 22%;   height: 5.5%; }
.hs-home-d-q-flip   { left: 74%;   top: 58.2%; width: 22%;   height: 5.5%; }
.hs-home-d-music-all{ left: 84%;   top: 66.2%; width: 12.5%; height: 2.8%; }
.hs-home-d-recent   { left: 4%;    top: 70.0%; width: 78%;   height: 11.2%; }

/* Rooms List */
.hs-rooms-top       { left: 4%;    top: 12.6%; width: 92%;   height: 11.2%; }
.hs-rooms-rest      { left: 4%;    top: 24.8%; width: 92%;   height: 55.5%; }

/* Music All & Favorites */
.hs-music-tab-all   { left: 5%;    top: 12.8%; width: 15.5%; height: 4.0%; }
.hs-music-tab-fav   { left: 21%;   top: 12.8%; width: 18%;   height: 4.0%; }
.hs-music-all-play  { left: 4%;    top: 18.2%; width: 92%;   height: 79%; }
.hs-music-fav-play  { left: 4%;    top: 18.2%; width: 92%;   height: 69%; }
.hs-minibar-bottom  { left: 4%;    top: 88.8%; width: 78%;   height: 7.0%; }

/* Full-Screen Player & Lyrics */
.hs-player-close      { left: 4%;    top: 5.7%;  width: 11%;   height: 4.2%; }
.hs-player-seg-song   { left: 34.5%; top: 5.7%;  width: 15.5%; height: 4.0%; }
.hs-player-seg-lyrics { left: 50%;   top: 5.7%;  width: 15.5%; height: 4.0%; }
.hs-player-pill-right { left: 61.5%; top: 87.1%; width: 19%;   height: 4.1%; }

/* Settings */
.hs-settings-moon   { left: 74%;   top: 6.0%;  width: 11%;   height: 4.5%; }
.hs-settings-gear   { left: 85.5%; top: 6.0%;  width: 10.5%; height: 4.5%; }
.hs-theme-auto      { left: 8%;    top: 39.8%; width: 28%;   height: 4.4%; }
.hs-theme-light     { left: 36%;   top: 39.8%; width: 28%;   height: 4.4%; }
.hs-theme-dark      { left: 64%;   top: 39.8%; width: 28%;   height: 4.4%; }
.hs-settings-prefs  { left: 8%;    top: 59.8%; width: 84%;   height: 5.8%; }

/* Quick-Jump Caption & Navigation Pills Below Phone */
.sim-caption {
  margin-top: 0.1rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--muted);
}

.sim-quick-jumps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.42rem;
}

.sim-jump-btn {
  padding: 0.3rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--control-edge);
  background: var(--control-bg);
  color: var(--muted);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.sim-jump-btn:hover {
  color: var(--ink);
  background: var(--control-hover);
}

.sim-jump-btn.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

@media (max-width: 900px) {
  .hero-figure {
    justify-content: center;
    align-items: center;
  }
}

@media (max-width: 380px) {
  .phone-device {
    width: min(100%, 286px);
  }
}
