body {
  background: radial-gradient(circle at 50% 0%, #efeaf8, #cfc8e6);
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}

/* ---------- phone shell ---------- */
.phone {
  width: 372px;
  max-width: 100%;
  height: min(780px, 96vh);
  background: linear-gradient(145deg, #2a2a2e, #050506);
  border-radius: 48px;
  padding: 12px;                 /* the bezel — gives content a safe area */
  box-shadow: 0 30px 80px rgba(40,20,80,.45);
}
.screen-frame {
  position: relative;
  width: 100%; height: 100%;
  background: #f3f1fa;
  border-radius: 38px;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.notch {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 116px; height: 26px; background: #050506; border-radius: 0 0 16px 16px; z-index: 5;
}

/* ---------- status bar (fixed top) ---------- */
.statusbar {
  flex: 0 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 26px 6px;
  font-size: 13px; font-weight: 700; color: #2a2440;
}
.sb-icons { font-size: 11px; }

/* ---------- screen container ---------- */
.screens { position: relative; flex: 1; min-height: 0; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; min-height: 0; }
.hidden { display: none !important; }

/* ---------- home ---------- */
.home-scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 8px; }
.home-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 20px; }
.home-sel { font-weight: 800; color: #2a2440; }
.bell-ic { font-size: 18px; }

.tabs { display: flex; gap: 8px; padding: 8px 20px; overflow-x: auto; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  font-size: 13px; padding: 7px 14px; border-radius: 999px; white-space: nowrap;
  background: #fff; color: #6b6485; flex: 0 0 auto;
}
.tab.active { background: var(--purple); color: #fff; }

.lock-card {
  margin: 12px 16px; background: #fff; border-radius: 22px; padding: 18px;
  box-shadow: 0 10px 26px rgba(80,40,150,.12);
}
.lock-card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lock-card-info { min-width: 0; }              /* allow text to shrink/wrap */
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.pill.locked { background: #fde2e4; color: var(--red); }
.pill.unlocked { background: #d8f5e3; color: var(--green); }
.lock-photo {
  width: 60px; height: 96px; flex: 0 0 auto;
  object-fit: cover; object-position: top; border-radius: 10px; background: #eee;
}
.lock-title { margin-top: 8px; font-size: 13px; color: #8a83a3; }
.lock-name { font-size: 20px; font-weight: 800; color: #2a2440; line-height: 1.15; }
.lock-model { font-size: 12px; color: var(--purple); }

.meta-row {
  display: flex; justify-content: space-between; text-align: center;
  border-top: 1px solid #eee; border-bottom: 1px solid #eee; margin-top: 14px; padding: 12px 0;
}
.meta-row > div { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: #2a2440; flex: 1; }
.meta-row b { font-size: 11px; }
.meta-row small { color: #8a83a3; }
.meta-row .crit { color: var(--red); }
.meta-row .ok { color: var(--green); }
.mi { font-size: 16px; }

.hold-unlock {
  margin-top: 14px; text-align: center; padding: 16px; border-radius: 16px;
  background: linear-gradient(180deg, #2a2440, #1a1430); color: #fff; font-weight: 700;
}
.hold-unlock small { font-weight: 400; color: #b9b2d6; font-size: 11px; }

.navbar {
  flex: 0 0 auto;
  display: flex; justify-content: space-around; padding: 10px 0 14px;
  font-size: 10px; text-align: center; color: #9a93b3;
  background: #fff; border-top: 1px solid #eee;
}
.navbar .active { color: var(--purple); }

/* ---------- call ---------- */
.call-head {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 16px; font-weight: 800; color: #2a2440;
}
.call-title { flex: 1; text-align: center; }
.back { background: none; font-size: 26px; color: #2a2440; line-height: 1; padding: 0 4px; }

.media-wrap {
  flex: 1; min-height: 0; margin: 0 14px; border-radius: 18px; overflow: hidden;
  background: #0c0a16; position: relative; display: flex; align-items: center; justify-content: center;
}
.media-wrap .gif, .media-wrap video { width: 100%; height: 100%; object-fit: cover; }
.media-label {
  position: absolute; bottom: 10px; left: 12px; color: #fff; font-size: 12px;
  background: rgba(0,0,0,.5); padding: 4px 10px; border-radius: 999px;
}

.call-actions { flex: 0 0 auto; display: flex; gap: 10px; padding: 14px 14px 6px; }
.act {
  flex: 1; min-width: 0; padding: 12px 0; border-radius: 16px; background: #fff; color: #2a2440;
  font-size: 13px; font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 5px;
  box-shadow: 0 4px 14px rgba(80,40,150,.12);
}
.act span { font-size: 21px; }
.act.active { background: var(--purple); color: #fff; }
.act.unlock { background: var(--green); color: #fff; }
.hangup { flex: 0 0 auto; margin: 6px 14px 16px; padding: 12px; border-radius: 14px; background: var(--red); color: #fff; font-weight: 700; }

/* ---------- notification ---------- */
.notif {
  position: absolute; top: -140px; left: 12px; right: 12px;
  background: rgba(255,255,255,.97); backdrop-filter: blur(8px);
  border-radius: 18px; padding: 12px 14px; display: flex; align-items: center; gap: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,.25); transition: top .4s cubic-bezier(.2,.9,.3,1.3);
  cursor: pointer; z-index: 20;
}
.notif.show { top: 46px; }
.notif-ic { font-size: 22px; flex: 0 0 auto; }
.notif-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.notif-body b { font-size: 14px; color: #2a2440; }
.notif-body small { font-size: 12px; color: #8a83a3; }
.notif-thumb img { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 10px; object-fit: cover; background: #ddd; }

/* ---------- toast ---------- */
.toast {
  position: absolute; bottom: -60px; left: 50%; transform: translateX(-50%);
  max-width: 80%;
  background: #2a2440; color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 13px; transition: bottom .3s; white-space: nowrap; z-index: 21;
}
.toast.show { bottom: 26px; }
