/* ═══════════════════════════════════════
   PROTOTYPE — App shell & interactive states
   Access gate, screen navigation, transitions
═══════════════════════════════════════ */

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--espresso);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ═══════════════════════════════════════
   ACCESS GATE
═══════════════════════════════════════ */
.access-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(165deg, var(--cream) 0%, var(--blush) 50%, var(--champagne) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.access-gate.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.access-content {
  text-align: center;
  padding: 40px 32px;
  max-width: 320px;
  width: 100%;
}
.access-logo {
  margin-bottom: 16px;
}
.access-logo .logo-gem {
  margin: 0 auto;
  width: 56px;
  height: 56px;
  background: linear-gradient(145deg, var(--rose) 0%, var(--rose-deep) 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px var(--shadow-rose);
}
.access-logo .logo-gem svg {
  width: 28px;
  height: 28px;
}
.access-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.access-subtitle {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.access-form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}
.access-input {
  width: 200px;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  padding: 14px 18px;
  border: 1px solid var(--border-mid);
  border-radius: 14px;
  background: var(--white);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-align: center;
}
.access-input::placeholder {
  text-transform: none;
  letter-spacing: normal;
  color: var(--text-muted);
}
.access-input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px var(--shadow-rose);
}
.access-input.error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(184, 106, 106, 0.15);
}
.access-btn {
  width: 52px;
  min-width: 52px;
  height: 52px;
  flex-shrink: 0;
  border: none;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--rose) 0%, var(--rose-deep) 100%);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 12px var(--shadow-rose);
}
.access-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px var(--shadow-rose);
}
.access-btn:active {
  transform: scale(0.96);
}
.access-error {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  color: var(--red);
  margin-bottom: 24px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.access-error.visible {
  opacity: 1;
}
.access-hint {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  color: var(--text-muted);
}
.access-hint a {
  color: var(--rose-deep);
  text-decoration: none;
  font-weight: 500;
}
.access-hint a:hover {
  text-decoration: underline;
}

/* ═══════════════════════════════════════
   APP CONTAINER
═══════════════════════════════════════ */
.app {
  width: 100%;
  max-width: 375px;
  height: 100%;
  max-height: 812px;
  background: var(--cream);
  position: relative;
  overflow: hidden;
  border-radius: 0;
}
@media (min-width: 400px) {
  .app {
    border-radius: 44px;
    box-shadow: 0 50px 100px rgba(0,0,0,0.4);
  }
}

/* ═══════════════════════════════════════
   SCREENS
═══════════════════════════════════════ */
.screen {
  position: absolute;
  inset: 0;
  background: var(--cream);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.screen::-webkit-scrollbar { display: none; }
.screen.active {
  opacity: 1;
  visibility: visible;
}

/* ═══════════════════════════════════════
   AVATAR
═══════════════════════════════════════ */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--champagne) 0%, var(--blush) 100%);
  border: 2px solid var(--white);
  box-shadow: 0 2px 8px var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ═══════════════════════════════════════
   OTP INPUT
═══════════════════════════════════════ */
.otp-wrap {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.otp-box {
  width: 44px;
  height: 52px;
  background: var(--white);
  border: 1.5px solid rgba(196, 166, 176, 0.35);
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  outline: none;
}
.otp-box:focus { border-color: var(--rose); }

/* ═══════════════════════════════════════
   UTILITY
═══════════════════════════════════════ */
.hidden { display: none !important; }
.btn-link {
  background: none;
  border: none;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--rose-deep);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-link:active { opacity: 0.7; }

/* ═══════════════════════════════════════
   INTERACTIVE SHEET TRANSITIONS
═══════════════════════════════════════ */
.sheet-overlay {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 100;
}
.sheet-overlay.active {
  opacity: 1;
  visibility: visible;
}
.sheet {
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.sheet-overlay.active .sheet {
  transform: translateY(0);
}

/* ═══════════════════════════════════════
   INTERACTIVE SEARCH OVERLAY TRANSITIONS
═══════════════════════════════════════ */
.wishlist-search-overlay {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.wishlist-search-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Start screen — fill app container */
.start-screen {
  min-height: 100%;
}
