/* Camera and composer */

.camera-screen-inner {
  width: 100%;
  height: 100%;
  padding: 12px 3px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.locket-top-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 25;
  position: relative;
}

.locket-avatar-lockup {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  min-width: 0;
}

.locket-avatar-sig {
  font-style: italic;
  font-weight: 700;
  font-size: 12.5px;
  line-height: 1.1;
  letter-spacing: 0.15px;
  color: var(--locket-ui-text, #f1f5f9);
  opacity: 0.92;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.locket-avatar-sig:hover {
  opacity: 1;
  transform: translateY(-0.5px);
}

.locket-avatar-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: #22242a;
  border: 2px solid rgba(255, 255, 255, 0.14);
  color: #e9edf3;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: transform 0.24s var(--spring-bounce), border-color 0.2s;
  flex-shrink: 0;
}
.locket-avatar-btn:hover {
  transform: scale(1.08);
  border-color: var(--bs-primary);
}
.locket-avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.locket-friends-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(38, 40, 46, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.32);
  transition:
    background-color 0.2s var(--smooth-ease),
    border-color 0.2s var(--smooth-ease),
    transform 0.22s var(--spring-bounce);
}
.locket-friends-pill:hover {
  background: rgba(52, 55, 64, 0.96);
  transform: translateY(-1px);
}
.locket-friends-pill:active {
  transform: scale(0.96);
}

.locket-circle-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(38, 40, 46, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.32);
  transition: transform 0.24s var(--spring-bounce), background-color 0.2s;
  flex-shrink: 0;
}
.locket-circle-icon:hover {
  background-color: #343842;
  transform: translateY(-1px) scale(1.06);
}
.locket-circle-icon:active {
  transform: scale(0.93);
}

.unread-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background-color: var(--bs-danger);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid #000000;
  box-shadow: 0 2px 8px rgba(255, 76, 81, 0.5);
}

/* Viewfinder */
.locket-viewfinder {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 52px;
  overflow: hidden;
  position: relative;
  background-color: #111318;
  cursor: pointer;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.65);
  flex-shrink: 0;
  transition: transform 0.3s var(--spring-out), box-shadow 0.3s;
}
.locket-viewfinder.camera-is-live { box-shadow:0 8px 24px #00000016,0 0 0 1px color-mix(in srgb,var(--bs-primary) 20%,transparent); }
.camera-live-chrome { position:absolute; inset:14px 14px auto; z-index:22; display:flex; align-items:center; justify-content:space-between; gap:8px; pointer-events:none; animation:cameraChromeIn .28s var(--spring-out) both; }
.camera-live-chrome[hidden],.camera-live-stage[hidden],.camera-connect-panel[hidden],.camera-error-panel[hidden],.camera-move-pip[hidden] { display:none; }
.camera-live-stage { position:absolute; inset:0; z-index:2; overflow:hidden; background:#121419; pointer-events:none; }
.camera-preview-video { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; backface-visibility:hidden; }
.camera-preview-video.is-mirrored { transform:scaleX(-1); }
.camera-preview-video.is-inset { inset:auto; z-index:1; border-radius:4cqw; outline:1.5px solid #ffffffe6; outline-offset:-1.5px; box-shadow:0 5px 18px #00000030; }
.camera-error-panel,.camera-connect-panel { position:absolute; z-index:26; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; padding:24px; color:var(--locket-ui-text); background:var(--locket-ui-card); text-align:center; cursor:default; }
.camera-error-panel > svg { width:42px; height:42px; color:var(--bs-primary); }
.camera-error-panel strong,.camera-connect-panel strong { font-size:clamp(16px,5cqw,22px); line-height:1.3; }
.camera-error-panel p { margin:0; max-width:36ch; color:var(--locket-ui-muted); font-size:clamp(12px,3.4cqw,14px); line-height:1.5; }
.camera-panel-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:8px; }
.camera-panel-secondary { min-height:40px; padding:8px 12px; border:1px solid var(--locket-ui-border); border-radius:14px; color:var(--locket-ui-text); background:var(--locket-ui-raised); font:600 13px/1.3 var(--locket-font-family); cursor:pointer; }
.camera-connect-orbit { width:28px; height:28px; border:2px solid var(--locket-ui-border); border-top-color:var(--bs-primary); border-radius:50%; animation:riSpin .8s linear infinite; }
.camera-flash { position:absolute; inset:0; z-index:30; opacity:0; background:#fff; pointer-events:none; }
.camera-move-pip { position:absolute; z-index:24; left:50%; bottom:14px; transform:translateX(-50%); display:inline-flex; align-items:center; gap:6px; min-height:36px; padding:5px 12px; border:1px solid #ffffff24; border-radius:999px; background:#14161c80; backdrop-filter:blur(12px); color:#fff; font:600 11px/1 var(--locket-font-family); cursor:pointer; }
.camera-move-pip svg { width:16px; height:16px; }
@container (max-width:300px) { .camera-error-panel { padding:14px; gap:8px; } .camera-error-panel > svg { display:none; } }
.camera-live-tool { border:1px solid rgba(255,255,255,.18); background:rgba(12,15,22,.56); color:#fff; backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px); box-shadow:0 8px 22px rgba(0,0,0,.22); }
.camera-live-actions { display:flex; align-items:center; gap:7px; margin-left:auto; pointer-events:auto; }
.camera-live-tool { min-height:32px; display:inline-flex; align-items:center; justify-content:center; gap:5px; padding:0 10px; border-radius:999px; color:#f8fafc; font:700 11px/1 var(--locket-font-family); cursor:pointer; transition:transform .2s var(--spring-bounce),background .2s,border-color .2s; }
.camera-live-tool:hover { transform:translateY(-1px); background:rgba(255,255,255,.18); border-color:rgba(255,255,255,.42); }
.camera-live-tool.is-active { background:color-mix(in srgb,var(--bs-primary) 72%,#111827); border-color:color-mix(in srgb,var(--bs-primary) 72%,white); box-shadow:0 0 0 2px color-mix(in srgb,var(--bs-primary) 24%,transparent); }
.camera-live-tool:active { transform:scale(.94); }
.camera-live-tool:disabled { cursor:wait; opacity:.65; transform:none; }
.camera-live-tool.icon-only { width:34px; padding:0; }
.camera-live-tool .ui-icon { width:16px; height:16px; }
@keyframes cameraChromeIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:none; } }
@keyframes cameraCaptureFlash { 0% { box-shadow:inset 0 0 0 999px rgba(255,255,255,0); } 28% { box-shadow:inset 0 0 0 999px rgba(255,255,255,.54); } 100% { box-shadow:inset 0 0 0 999px rgba(255,255,255,0); } }
@media (prefers-reduced-motion:reduce) { .camera-live-chrome,.camera-connect-orbit { animation:none; } }
#previewCanvas {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Sound control */
.locket-sound-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 15;
  background: rgba(24, 27, 34, 0.82);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(233, 237, 243, 0.18);
  color: #e9edf3;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: none;
  transition: transform 0.2s var(--spring-bounce), background-color 0.2s;
}
.locket-sound-btn:hover {
  transform: scale(1.05);
  background: rgba(35, 39, 47, 0.94);
}

/* Caption & iOS Overlay Pill on Viewfinder */
.locket-live-overlay-pill {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  max-width: 90%;
  min-width: 185px;
  padding: 6px 14px;
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  border: 1.5px solid rgba(255, 255, 255, 0.44);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 15;
  overflow: hidden;
  transition: transform 0.24s var(--spring-bounce), border-color 0.2s, box-shadow 0.2s;
}
.locket-live-overlay-pill:focus-within {
  transform: translateX(-50%) scale(1.03);
  border-color: #ffffff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.72);
}
.locket-live-overlay-pill.is-empty-caption { background:var(--locket-ui-card)!important; color:var(--locket-ui-text)!important; border:1px solid var(--locket-ui-border); box-shadow:0 3px 10px #00000012; backdrop-filter:none; -webkit-backdrop-filter:none; animation:none; }
.locket-live-overlay-pill.is-empty-caption #captionInput { color:var(--locket-ui-muted)!important; font-size:15px; font-weight:500; }
.locket-live-overlay-pill.is-empty-caption::before,.locket-live-overlay-pill.is-empty-caption::after { display:none; }
.locket-live-overlay-pill.is-empty-caption:focus-within { transform:translateX(-50%); border-color:var(--bs-primary); }
.live-ov-prefix,
.live-ov-suffix {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.live-ov-prefix[hidden],
.live-ov-suffix[hidden] {
  display: none !important;
}
.caption-pill-overlay {
  position: relative;
  bottom: auto;
  left: auto;
  transform: none;
  width: auto;
  max-width: 240px;
  min-width: 130px;
  padding: 3px 4px;
  border-radius: 0;
  font-weight: 700;
  font-size: 13.5px;
  text-align: center;
  box-shadow: none;
  border: none;
  background: transparent !important;
  outline: none;
  display: block;
  cursor: text;
  z-index: 2;
}
.caption-pill-overlay:focus {
  transform: none;
  box-shadow: none;
}
.caption-pill-overlay::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

/* iOS Locket Authentic Overlay Badges (Location, Time, Weather, Review, Music) */
.ov-ios-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}
.ov-ios-badge svg {
  width: 13.5px;
  height: 13.5px;
  display: block;
}
.ov-ios-loc {
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: #ffffff;
}
.ov-ios-time {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #111827;
}
.ov-ios-weather {
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  color: #ffffff;
}
.ov-ios-review {
  background: linear-gradient(135deg, #fde047, #eab308);
  color: #713f12;
  font-size: 13px;
  font-weight: 900;
}
.ov-ios-music-disc {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #18181b;
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  animation: locketDiscSpin 5.5s linear infinite;
  flex-shrink: 0;
}
.ov-ios-music-disc img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ov-ios-music-disc svg {
  width: 14px;
  height: 14px;
}
@keyframes locketDiscSpin {
  to { transform: rotate(360deg); }
}
.ov-ios-eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 13px;
  padding: 0 2px;
}
.ov-ios-eq i {
  width: 2.5px;
  background: currentColor;
  border-radius: 2px;
  display: inline-block;
  animation: locketEqBounce 0.85s ease-in-out infinite alternate;
}
.ov-ios-eq i:nth-child(1) { height: 6px; animation-delay: 0s; }
.ov-ios-eq i:nth-child(2) { height: 12px; animation-delay: 0.2s; }
.ov-ios-eq i:nth-child(3) { height: 8px; animation-delay: 0.4s; }
@keyframes locketEqBounce {
  0% { transform: scaleY(0.45); opacity: 0.7; }
  100% { transform: scaleY(1.1); opacity: 1; }
}
.ov-ios-weather-fx {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0 2px;
}
.ov-ios-weather-fx i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #e0f2fe;
  box-shadow: 0 0 6px #ffffff;
  animation: locketSnowTwinkle 1.6s ease-in-out infinite alternate;
}
.ov-ios-weather-fx i:nth-child(2) { animation-delay: 0.5s; }
@keyframes locketSnowTwinkle {
  0% { transform: translateY(-2px) scale(0.75); opacity: 0.5; }
  100% { transform: translateY(2px) scale(1.2); opacity: 1; }
}

/* Caption Animation FX (Ánh Kim Lướt, Nhịp Đập Glow, Bay Lơ Lửng, Cầu Vồng Holo, Sao Lấp Lánh) */
.cap-fx-shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.36) 50%, transparent 75%);
  background-size: 220% 100%;
  animation: capShimmerSweep 3.2s linear infinite;
  pointer-events: none;
  border-radius: inherit;
}
@keyframes capShimmerSweep {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.cap-fx-pulse {
  animation: capGlowPulse 2.2s ease-in-out infinite;
}
@keyframes capGlowPulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 0 0 rgba(255, 255, 255, 0.35); }
  50% { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65), 0 0 18px 3px rgba(255, 255, 255, 0.42); }
}
.locket-live-overlay-pill.cap-fx-float,
.feed-caption-pill.cap-fx-float {
  animation: capFloatWave 2.8s ease-in-out infinite;
}
@keyframes capFloatWave {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-4px); }
}
.cap-fx-holo {
  border-color: rgba(244, 114, 182, 0.85) !important;
  animation: capHoloBorder 3.6s linear infinite;
}
@keyframes capHoloBorder {
  0% { border-color: #38bdf8; box-shadow: 0 8px 24px rgba(56, 189, 248, 0.38); }
  33% { border-color: #f472b6; box-shadow: 0 8px 24px rgba(244, 114, 182, 0.38); }
  66% { border-color: #facc15; box-shadow: 0 8px 24px rgba(250, 204, 21, 0.38); }
  100% { border-color: #38bdf8; box-shadow: 0 8px 24px rgba(56, 189, 248, 0.38); }
}
.cap-fx-snow::before {
  content: "✦";
  font-size: 11px;
  opacity: 0.85;
  margin-right: 2px;
  animation: locketSnowTwinkle 1.2s ease-in-out infinite alternate;
}

/* Camera quick tools bar (Khung & Màu, Caption, Địa Điểm, Nhạc & VIP) */
.camera-quick-tools-bar {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  gap: 7px;
  padding: 2px 4px;
}
.cam-quick-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--bs-primary) 22%, var(--locket-ui-border, rgba(255, 255, 255, 0.12)));
  background: color-mix(in srgb, var(--locket-ui-raised, #242730) 76%, var(--locket-ui-card, #181a20));
  color: var(--locket-ui-text, #f1f5f9);
  border-radius: 16px;
  padding: 5px 7px 5px 5px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
  transition: transform 0.18s var(--spring-bounce), border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.cam-quick-pill > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}
.cam-quick-pill:hover {
  transform: translateY(-1.5px);
  border-color: var(--bs-primary);
  background: color-mix(in srgb, var(--bs-primary) 16%, var(--locket-ui-card, #1d2028));
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.24);
}
.cam-quick-pill:active {
  transform: scale(0.96);
}
.cam-quick-icon-wrap {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  overflow: visible;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  box-shadow: none;
}
.cam-quick-icon-img {
  width: 22px !important;
  height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.28));
}

/* Camera actions */
.locket-bottom-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 6px 8px 2px;
}

.locket-side-action {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(233, 237, 243, 0.05);
  border: 1px solid rgba(233, 237, 243, 0.08);
  color: #e9edf3;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.24s var(--spring-bounce), background-color 0.2s, border-color 0.2s;
}
.locket-side-action:hover {
  transform: translateY(-2px) scale(1.08);
  background-color: rgba(72, 118, 255, 0.14);
  border-color: rgba(72, 118, 255, 0.4);
}
.locket-side-action:active {
  transform: scale(0.92);
}

/* Shutter and send button */
.locket-shutter-ring {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 4px solid var(--locket-gold);
  padding: 5px;
  background: rgba(255, 180, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(255, 180, 0, 0.10);
  transition: transform 0.26s var(--spring-bounce), box-shadow 0.26s var(--smooth-ease), border-color 0.25s;
}
.locket-shutter-ring:hover {
  transform: scale(1.06);
  box-shadow: 0 0 0 6px rgba(255, 180, 0, 0.16), 0 10px 26px rgba(255, 180, 0, 0.24);
}
.locket-shutter-ring:active {
  transform: scale(0.93);
}
.locket-shutter-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: #e9edf3;
  color: #181b22;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.26s var(--spring-out);
}
.locket-shutter-ring.send-mode {
  border-color: var(--bs-primary);
  background: rgba(72, 118, 255, 0.14);
  box-shadow: 0 0 0 5px rgba(72, 118, 255, 0.16), 0 10px 30px rgba(72, 118, 255, 0.35);
}
.locket-shutter-ring.send-mode .locket-shutter-inner {
  background: linear-gradient(135deg, #4876ff 0%, #2f53bc 100%);
  color: #ffffff;
}

/* History shortcut */
.locket-history-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(233, 237, 243, 0.05);
  border: 1px solid rgba(233, 237, 243, 0.08);
  color: #bfc6d1;
  font-size: 13.5px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s, transform 0.22s var(--spring-bounce);
}
.locket-history-trigger:hover {
  color: #ffffff;
  background: rgba(72, 118, 255, 0.14);
  border-color: rgba(72, 118, 255, 0.35);
  transform: translateY(2px);
}

/* Phone notifications */
.phone-toast {
  position: absolute;
  top: 74px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 88%;
  z-index: 65;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
  animation: toastPopIn 0.28s var(--spring-bounce);
}
@keyframes toastPopIn {
  from { opacity: 0; transform: translate(-50%, -10px) scale(0.92); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
.phone-toast.ok {
  display: inline-flex;
  background: rgba(18, 38, 24, 0.94);
  border: 1px solid rgba(86, 202, 0, 0.5);
  color: #84e840;
}
.phone-toast.err {
  display: inline-flex;
  background: rgba(48, 18, 22, 0.94);
  border: 1px solid rgba(255, 76, 81, 0.5);
  color: #ff787c;
}
.phone-toast.wait {
  display: inline-flex;
  background: rgba(20, 28, 48, 0.94);
  border: 1px solid rgba(72, 118, 255, 0.5);
  color: #b4c8ff;
}
@keyframes riSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.ri-spin-smooth {
  display: inline-block;
  animation: riSpin 0.85s linear infinite;
}

/* Recipient sheet */
.recipient-sheet {
  position: absolute;
  top: 68px;
  left: 14px;
  right: 14px;
  max-height: 450px;
  background-color: rgba(35, 39, 47, 0.96);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(233, 237, 243, 0.14);
  border-radius: 24px;
  z-index: 55;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.72);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-10px) scale(0.96);
  transform-origin: top center;
  transition:
    opacity 0.24s var(--spring-out),
    transform 0.28s var(--spring-bounce),
    visibility 0.24s;
}
.recipient-sheet.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.recipient-sheet-header {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(233, 237, 243, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #969fac;
}
.recipient-list-scroll {
  overflow-y: auto;
  max-height: 350px;
  display: flex;
  flex-direction: column;
}
.recipient-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(233, 237, 243, 0.06);
  cursor: pointer;
  transition: background-color 0.18s var(--smooth-ease), padding-left 0.18s var(--smooth-ease);
}
.recipient-row:hover {
  background-color: rgba(72, 118, 255, 0.10);
  padding-left: 19px;
}
.recipient-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.friend-row-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #343c48, #272c35);
  border: 1.5px solid rgba(233, 237, 243, 0.12);
  color: #e9edf3;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.friend-row-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.friend-row-name {
  font-size: 14.5px;
  font-weight: 600;
  color: #e9edf3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recipient-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(191, 198, 209, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #ffffff;
  font-weight: 800;
  transition: all 0.2s var(--spring-bounce);
}
.recipient-row.selected .recipient-check {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
  transform: scale(1.06);
  box-shadow: 0 2px 8px rgba(72, 118, 255, 0.45);
}

/* =====================================================
   US LOCKET GOLD — AI MAGIC & VISION CLASSIFIER SUITE
   ===================================================== */
.ai-magic-trigger {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 16;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(236, 72, 153, 0.55);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.88), rgba(236, 72, 153, 0.88));
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(236, 72, 153, 0.36);
  backdrop-filter: blur(12px);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.ai-magic-trigger:hover,
.ai-magic-trigger.active {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 8px 22px rgba(236, 72, 153, 0.55);
  filter: brightness(1.08);
}
.ai-magic-sparkle {
  font-size: 13px;
  line-height: 1;
}
.cam-quick-pill.ai-quick-pill {
  border-color: rgba(236, 72, 153, 0.48);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.24), rgba(236, 72, 153, 0.22));
}
.ai-laser-scanner {
  position: absolute;
  inset: 0;
  z-index: 18;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
}
.ai-laser-scanner.is-scanning::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, #38bdf8, #ec4899, #facc15, transparent);
  box-shadow: 0 0 22px 6px rgba(56, 189, 248, 0.72);
  animation: aiHudLaserSweep 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes aiHudLaserSweep {
  0% { top: 4%; opacity: 0.95; }
  50% { top: 92%; opacity: 1; }
  100% { top: 12%; opacity: 0; }
}
.ai-magic-sheet {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 54px;
  z-index: 22;
  padding: 10px 11px;
  border-radius: 20px;
  border: 1px solid rgba(168, 85, 247, 0.42);
  background: rgba(13, 15, 24, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.62);
}
.ai-magic-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.ai-magic-sheet-head p {
  margin: 0;
  font-size: 11.5px;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-magic-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.ai-mode-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 7px 8px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(30, 34, 48, 0.82);
  color: #f8fafc;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.ai-mode-chip span {
  font-size: 14px;
  line-height: 1.1;
}
.ai-mode-chip b {
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
}
.ai-mode-chip small {
  font-size: 9.5px;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.ai-mode-chip:hover,
.ai-mode-chip.active {
  transform: translateY(-1px);
  border-color: #ec4899;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.42), rgba(236, 72, 153, 0.36));
}
.dummy-close {
}
.locket-private-upload {
  display: inline-flex;
  align-self: center;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  min-height: 40px;
  margin: 8px auto 0;
  padding: 8px 18px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 999px;
  background: #1e293b;
  color: #f8fafc;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.locket-private-upload[hidden] { display: none !important; }
.locket-private-upload:disabled { opacity: 0.55; cursor: wait; }
.locket-private-upload:focus-visible { outline: 2px solid #facc15; outline-offset: 3px; }
