/* Phone frame — forced 390×844, desktop centered */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #ffffff !important;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

body.desktop-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  background: #ffffff !important;
  padding: 16px;
}

.phone-frame {
  width: 390px;
  height: 844px;
  max-width: 100vw;
  max-height: 100vh;
  max-height: 100dvh;
  position: relative;
  background: #000;
  border-radius: 44px;
  box-shadow:
    0 0 0 2px #1a1a1a,
    0 0 0 6px #e8e8e8,
    0 25px 60px rgba(0, 0, 0, 0.18),
    0 8px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  flex-shrink: 0;
}

.phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 34px;
  background: #000;
  border-radius: 20px;
  z-index: 1000;
  pointer-events: none;
}

.phone-notch::after {
  content: "";
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1a1a2e;
  box-shadow: inset 0 0 2px #333;
}

.phone-status {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  padding: 14px 28px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 999;
  font-size: 13px;
  font-weight: 600;
  color: #222;
  pointer-events: none;
}

.phone-status .time {
  width: 54px;
}

.phone-status .icons {
  display: flex;
  gap: 5px;
  align-items: center;
  font-size: 12px;
}

.phone-screen {
  position: absolute;
  inset: 0;
  border-radius: 44px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.phone-screen > .app-root {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: 48px;
  min-height: 0;
}

/* Real mobile: still clamp to phone size if larger, fill if smaller */
@media (max-width: 430px) and (max-height: 900px) {
  body.desktop-shell {
    padding: 0;
    align-items: stretch;
    justify-content: center;
  }

  .phone-frame {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: 390px;
    border-radius: 0;
    box-shadow: none;
  }

  .phone-screen {
    border-radius: 0;
  }

  .phone-notch {
    display: none;
  }
}

/* Utilities shared */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulseSoft {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

@keyframes checkPop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.anim-fade-up {
  animation: fadeInUp 0.35s ease both;
}

.anim-fade {
  animation: fadeIn 0.25s ease both;
}

.skeleton {
  background: linear-gradient(90deg, #eee 25%, #f7f7f7 50%, #eee 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: 12px;
}

.toast-stack {
  position: absolute;
  top: 56px;
  left: 16px;
  right: 16px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  background: rgba(34, 34, 34, 0.92);
  color: #fff;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 500;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  animation: fadeInUp 0.3s ease;
}

.toast-item.success {
  background: rgba(52, 199, 89, 0.95);
}

.toast-item.info {
  background: rgba(21, 101, 192, 0.95);
}
