:root {
  --text-white: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.72);
  --text-dim: rgba(255, 255, 255, 0.44);
  --pill-dark: rgba(18, 24, 30, 0.46);
  --glass-border: rgba(255, 255, 255, 0.12);
  --gold: #f7b928;
  --gold-bright: #ffca3a;
  --lilac: #e598f7;
  --danger: #ff4d6d;
  --card-radius: 48px;
  --shutter-grad: linear-gradient(160deg, #52d8f0 0%, #8373f7 52%, #ec6ead 100%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-drag: none;
}

html {
  width: 100%;
  min-height: 100%;
  min-height: 100vh;
  min-height: 100lvh;
  margin: 0;
  padding: 0;
  background-color: #26163b;
  overflow: visible;
}

html:has(body[data-theme="classic"]) { background-color: #352336; }
html:has(body[data-theme="gold"]) { background-color: #171412; }
html:has(body[data-theme="rose"]) { background-color: #261523; }
html:has(body[data-theme="midnight"]) { background-color: #09090c; }
html:has(body[data-theme="emerald"]) { background-color: #3a7545; }
html:has(body[data-theme="ocean"]) { background-color: #195380; }
html:has(body[data-theme="violet"]) { background-color: #26163b; }
html:has(body[data-theme="sunset"]) { background-color: #2e1518; }
html:has(body[data-theme="cosmic_dream"]) { background-color: #18384e; }
html:has(body.dark-subtab) { background-color: #121214; }
html:has(body.history-view-active) { background-color: #292212; }
html:has(body.ptb-mode) { background-color: #183642; }
html:has(.modal-overlay.bottom-sheet-mode:not(.hidden)) { background-color: #1d1c21; }
html:has(#captionSheetModal:not(.hidden)) { background-color: #222325; }
html:has(#goldPerksModal:not(.hidden)) { background-color: #120e05; }
html:has(#authScreen:not(.hidden)) { background-color: #121113; }

body {
  position: relative;
  width: 100%;
  min-height: 100%;
  min-height: 100vh;
  min-height: 100lvh;
  overflow: visible;
  overscroll-behavior: none;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-white);
  background: transparent;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  user-select: none;
}

input,
textarea {
  -webkit-user-select: text;
  -webkit-touch-callout: default;
  user-select: text;
}

button,
input,
select {
  font-family: inherit;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* ==================== DYNAMIC CAMERA THEMES ==================== */
.locket-backdrop {
  position: fixed;
  top: -100px;
  left: -10px;
  right: -10px;
  bottom: -140px;
  min-height: calc(100lvh + 240px);
  width: auto;
  height: auto;
  z-index: 0;
  contain: layout style paint;
  transform: translateZ(0);
  transition: background 0.35s ease;
  background:
    radial-gradient(circle at 20% 12%, rgba(62, 108, 114, 0.55), transparent 55%),
    radial-gradient(circle at 80% 72%, rgba(112, 66, 106, 0.52), transparent 58%),
    linear-gradient(180deg, #294047 0%, #37434d 32%, #4a3548 68%, #352336 100%);
}

body[data-theme="gold"] {
  --shutter-grad: linear-gradient(160deg, #ffe373 0%, #f7b928 52%, #e07a00 100%);
}
body[data-theme="gold"] .locket-backdrop {
  background: linear-gradient(180deg, #2c2418 0%, #231d17 48%, #171412 100%);
}

body[data-theme="rose"] {
  --shutter-grad: linear-gradient(160deg, #ff9ebb 0%, #f06595 52%, #cc5de8 100%);
}
body[data-theme="rose"] .locket-backdrop {
  background: linear-gradient(180deg, #4b2a3b 0%, #3d2235 50%, #261523 100%);
}

body[data-theme="midnight"] {
  --shutter-grad: linear-gradient(160deg, #a5b4fc 0%, #6366f1 50%, #ec4899 100%);
}
body[data-theme="midnight"] .locket-backdrop {
  background: linear-gradient(180deg, #14151a 0%, #0e0f13 55%, #09090c 100%);
}

body[data-theme="emerald"] {
  --shutter-grad: linear-gradient(160deg, #6ee7b7 0%, #10b981 52%, #0ea5e9 100%);
}
body[data-theme="emerald"] .locket-backdrop {
  background: linear-gradient(180deg, #275852 0%, #447e53 52%, #3a7545 100%);
}

body[data-theme="ocean"] {
  --shutter-grad: linear-gradient(160deg, #67e8f9 0%, #0284c7 52%, #2563eb 100%);
}
body[data-theme="ocean"] .locket-backdrop {
  background: linear-gradient(180deg, #1b5e73 0%, #1f749c 52%, #195380 100%);
}

body[data-theme="violet"] {
  --shutter-grad: linear-gradient(160deg, #f0abfc 0%, #9333ea 52%, #4f46e5 100%);
}
body[data-theme="violet"] .locket-backdrop {
  background: linear-gradient(180deg, #2d204d 0%, #3d245e 52%, #26163b 100%);
}

body[data-theme="sunset"] {
  --shutter-grad: linear-gradient(160deg, #fde047 0%, #f97316 52%, #e11d48 100%);
}
body[data-theme="sunset"] .locket-backdrop {
  background: linear-gradient(180deg, #4b2321 0%, #5c2a1f 52%, #2e1518 100%);
}

body[data-theme="cosmic_dream"] {
  --shutter-grad: linear-gradient(160deg, #c084fc 0%, #60a5fa 50%, #2dd4bf 100%);
}
body[data-theme="cosmic_dream"] .locket-backdrop {
  background:
    linear-gradient(180deg, rgba(24, 20, 56, 0.14) 0%, rgba(18, 42, 64, 0.22) 100%),
    url("/static/img/themes/cosmic_dream.jpg?v=20261202cc") center / cover no-repeat;
}

/* Darker sleek backdrop on Kỷ niệm & Trò chuyện tabs (matches Image 2 & 3) */
body.dark-subtab .locket-backdrop {
  background: linear-gradient(180deg, #1d211f 0%, #18191b 45%, #121214 100%);
}

/* ==================== AUTH OVERLAY (IMAGE 1 & 2 SLEEK DESIGN) ==================== */
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: max(20px, env(safe-area-inset-top, 0px)) 18px max(24px, env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  background:
    radial-gradient(circle at 50% 62%, rgba(247, 185, 40, 0.14), transparent 56%),
    radial-gradient(circle at 20% 10%, rgba(255, 196, 60, 0.08), transparent 46%),
    linear-gradient(180deg, #121113 0%, #161411 65%, #111012 100%);
}

.auth-card.auth-sleek-shell {
  width: 100%;
  max-width: 390px;
  margin: auto 0;
  padding: 18px 8px;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-logo-ring.auth-gold-glow {
  width: 68px;
  height: 68px;
  margin: 0 auto 2px;
  border-radius: 20px;
  padding: 0;
  background: transparent;
  box-shadow: 0 12px 32px rgba(247, 185, 40, 0.25);
  overflow: hidden;
}

.auth-logo-ring.auth-gold-glow .auth-logo-inner {
  border-radius: 20px;
  background: transparent;
}

.auth-title {
  text-align: center;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  text-align: center;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.62);
  margin: -4px 0 8px;
}

.auth-invite-banner {
  padding: 11px 14px;
  border-radius: 16px;
  background: rgba(247, 185, 40, 0.14);
  border: 1px solid rgba(247, 185, 40, 0.45);
  color: #ffe08a;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  line-height: 1.4;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.auth-label-row label {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.72);
}

.auth-forgot-link {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.auth-pill-input {
  height: 52px;
  padding: 0 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(32, 32, 37, 0.92);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: border-color 0.2s ease;
}

.auth-pill-input:focus-within {
  border-color: var(--gold);
}

.auth-at-prefix {
  color: var(--gold);
  font-weight: 800;
  font-size: 15px;
}

.auth-pill-input input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  outline: none;
}

.auth-pill-input input::placeholder {
  color: rgba(255, 255, 255, 0.36);
}

.pw-eye-btn {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.56);
  display: grid;
  place-items: center;
  padding: 4px;
  cursor: pointer;
}

.pw-eye-btn.active {
  color: var(--gold);
}

.auth-gold-cta {
  height: 52px;
  width: 100%;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffca45 0%, #f5b324 100%);
  color: #16140c;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 6px;
  box-shadow: 0 8px 28px rgba(245, 179, 36, 0.28);
}

.auth-gold-cta:active {
  transform: scale(0.985);
}

.auth-switch-line {
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.68);
  padding: 2px 0;
}

.auth-gold-link {
  border: none;
  background: transparent;
  color: var(--gold-bright);
  font-size: 14px;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
  margin-left: 4px;
}

.auth-install-btn {
  height: 50px;
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(34, 34, 38, 0.92);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  margin-top: 2px;
}

.auth-install-btn:active {
  transform: scale(0.985);
}

.auth-install-guide {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(36, 30, 18, 0.92);
  border: 1.5px solid rgba(247, 185, 40, 0.36);
  color: rgba(255, 255, 255, 0.92);
  font-size: 13.5px;
  line-height: 1.5;
  text-align: left;
}

.auth-lang-pill {
  align-self: center;
  margin-top: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.66);
  font-size: 13.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.auth-legal-note {
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.48);
  padding: 2px 10px 0;
}

.auth-legal-link {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-size: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.avatar-upload-row.compact {
  margin-bottom: 2px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.avatar-upload-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.avatar-upload-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  border: 2px dashed rgba(255, 255, 255, 0.28);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  text-align: center;
  font-size: 18px;
}

.avatar-upload-circle small {
  display: block;
  font-size: 10px;
  color: var(--text-soft);
  margin-top: 2px;
}

.avatar-upload-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.input-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  margin-bottom: 5px;
}

.input-group input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  outline: none;
}

.input-group input:focus {
  border-color: var(--gold);
}

.prefix-input {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
}

.prefix-input span {
  color: var(--gold);
  font-weight: 800;
  margin-right: 4px;
}

.prefix-input input {
  border: none;
  background: transparent;
  padding: 0;
  height: 100%;
}

.locket-primary-btn {
  height: 46px;
  padding: 0 20px;
  border: none;
  border-radius: 999px;
  background: var(--shutter-grad);
  color: #fff;
  font-size: 14.5px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 4px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.locket-primary-btn.small {
  height: 40px;
  font-size: 13.5px;
}

/* ==================== MAIN APP SHELL & TOP HEADER ==================== */
.app-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 450px;
  height: 100dvh;
  min-height: 100%;
  overflow: hidden;
  margin: 0 auto;
  padding: max(8px, env(safe-area-inset-top, 0px)) 0 max(12px, env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.locket-header {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: 46px 1fr 46px;
  align-items: center;
  height: 48px;
  padding: 0 14px;
  flex-shrink: 0;
}

.header-left-slot {
  display: flex;
  align-items: center;
}

.header-center-slot {
  display: flex;
  justify-content: center;
  align-items: center;
}

.header-right-slot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.header-bare-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.header-bare-icon-btn:active {
  transform: scale(0.92);
}

.screen-header-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.header-circle-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--pill-dark);
  backdrop-filter: blur(16px);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.header-circle-btn.small {
  width: 36px;
  height: 36px;
  font-size: 22px;
}

.friends-center-pill {
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: none;
  background: var(--pill-dark);
  backdrop-filter: blur(16px);
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.notif-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
}

.header-avatar-btn {
  width: 42px;
  height: 42px;
  justify-self: end;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: #353740;
  color: #fff;
  overflow: hidden;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.header-avatar-btn.gold-ring {
  border-color: var(--gold);
}

.header-avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-initials {
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
}

/* ==================== SCREENS & VERTICAL PULL-UP STAGE ==================== */
.vertical-stage {
  display: none;
  position: relative;
  flex: 1;
  min-height: 0;
  width: 100%;
  touch-action: pan-x;
}

.vertical-stage.active {
  display: flex;
  flex-direction: column;
}

.vertical-stage > .screen-view {
  height: 100%;
}

.vertical-stage.transitioning {
  display: block;
  overflow: visible;
}

.vertical-stage.transitioning > .screen-view {
  position: absolute;
  inset: 0;
  display: flex !important;
  will-change: transform;
  pointer-events: none;
}

.moment-stage {
  will-change: transform, opacity;
}

.moment-frame {
  touch-action: none;
}

.screen-view {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0 4px;
}

.screen-view.active {
  display: flex;
}

/* ==================== CAMERA + PREVIEW VIEWFINDER ==================== */
.viewfinder-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  min-height: 0;
}

.viewfinder-card {
  position: relative;
  width: min(100%, 66dvh, 450px);
  aspect-ratio: 1 / 1;
  border-radius: 50px;
  overflow: hidden;
  background: #1c2228;
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.36);
}

@media (min-height: 780px) {
  .viewfinder-card {
    width: min(100%, 68dvh, 450px);
  }
}

.camera-video,
.capture-canvas,
.preview-video,
.moment-img,
.moment-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: translateZ(0);
}

.vertical-stage.transitioning * {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.viewfinder-card.preset-fisheye::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 9;
  box-shadow: inset 0 0 42px 16px rgba(0, 0, 0, 0.65);
}

/* Viewfinder Perimeter Progress Border (30s Hold-to-Record) */
.viewfinder-progress-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 26;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.14s ease;
}

.viewfinder-card.recording-active .viewfinder-progress-svg {
  opacity: 1;
}

.viewfinder-card.recording-active .in-frame-hud {
  opacity: 0;
  pointer-events: none;
}

#viewfinderProgressPath {
  filter: drop-shadow(0 0 6px rgba(59, 232, 255, 0.88));
}

.preview-status-pill {
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(16, 16, 22, 0.72);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 12px;
  font-weight: 800;
  color: var(--gold-bright);
}

.preview-mini-btn {
  pointer-events: auto;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(16, 16, 22, 0.72);
  backdrop-filter: blur(14px);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.preview-mute-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 22;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(18, 19, 24, 0.56);
  backdrop-filter: blur(12px);
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.preview-mute-btn:active {
  transform: scale(0.92);
}

.shutter-flash {
  position: absolute;
  inset: 0;
  z-index: 25;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.shutter-flash.active {
  opacity: 0.95;
  transition: none;
}

.timer-countdown {
  position: absolute;
  inset: 0;
  z-index: 23;
  display: grid;
  place-items: center;
  font-size: 86px;
  font-weight: 800;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.camera-fallback {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  text-align: center;
  gap: 12px;
  background: radial-gradient(circle at 50% 35%, #2d3c46, #1d2029 80%);
}

.fallback-cam-icon {
  font-size: 38px;
}

.camera-fallback p {
  font-size: 13px;
  color: var(--text-soft);
  max-width: 250px;
  line-height: 1.45;
}

.fallback-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.mini-pill-btn {
  height: 36px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.mini-pill-btn.light {
  background: #fff;
  color: #181820;
  border: none;
}

/* In-Frame HUD Icons */
.in-frame-hud {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
}

.in-frame-hud button,
.in-frame-hud .zoom-pill {
  pointer-events: auto;
}

.hud-bare-btn {
  position: relative;
  border: none;
  background: transparent;
  color: #fff;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
  cursor: pointer;
  display: grid;
  place-items: center;
}

.hud-bare-btn.active {
  color: var(--gold-bright);
}

.hud-top-left {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.hud-bare-btn.hud-top-right {
  position: absolute;
  top: 20px;
  right: 22px;
}

.hud-bare-btn.hud-bottom-left {
  position: absolute;
  bottom: 18px;
  left: 22px;
}

.hud-bare-btn.hud-bottom-right {
  position: absolute;
  bottom: 18px;
  right: 22px;
}

.hud-circle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(30, 30, 36, 0.42);
  backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.55);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.hud-circle-btn.active {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.hud-sub-badge {
  position: absolute;
  bottom: -10px;
  font-size: 10px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.65);
  color: var(--gold-bright);
  padding: 1px 5px;
  border-radius: 999px;
}

.zoom-pill {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(96, 98, 108, 0.44);
  backdrop-filter: blur(14px);
}

.zoom-opt {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.zoom-opt.active {
  width: 38px;
  height: 38px;
  background: rgba(46, 46, 54, 0.8);
  color: #fff;
  font-size: 13.5px;
  font-weight: 800;
}

/* Caption Overlay & Trigger */
.caption-overlay {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 18px;
  z-index: 24;
  display: flex;
  justify-content: center;
  align-items: center;
}

.caption-trigger-pill {
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(34, 34, 42, 0.56);
  backdrop-filter: blur(18px);
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

#captionInput,
.moment-caption-pill {
  max-width: 100%;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(16, 16, 22, 0.72);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  text-align: center;
  outline: none;
}

#captionInput {
  width: 88%;
}

.preview-styled-badge-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 92%;
}

.clear-badge-x {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

/* ==================== SHUTTER + HOLD-TO-RECORD 30S ==================== */
.capture-lower-section,
.preview-lower-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.shutter-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 12px;
}

.squircle-thumb-btn {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  display: grid;
  place-items: center;
  font-size: 22px;
  cursor: pointer;
}

.squircle-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shutter-wrap {
  position: relative;
  width: 102px;
  height: 102px;
  display: grid;
  place-items: center;
  touch-action: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  user-select: none;
}

.record-ring-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.shutter-wrap.recording .record-ring-svg {
  opacity: 1;
}

.locket-shutter-ring {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  border: none;
  padding: 5px;
  background: var(--shutter-grad);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  display: grid;
  place-items: center;
  touch-action: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  user-select: none;
  transition: transform 0.16s ease, background 0.2s ease;
}

.locket-shutter-core,
.locket-send-core {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #ffffff;
  border: 4px solid rgba(35, 25, 38, 0.85);
  display: grid;
  place-items: center;
  color: #201a24;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.shutter-wrap.recording .locket-shutter-ring {
  background: linear-gradient(160deg, #52e5ff 0%, #36b5ff 100%);
  transform: scale(1.06);
  box-shadow: 0 0 22px rgba(59, 232, 255, 0.45);
}

.shutter-wrap.recording .locket-shutter-core {
  width: 72%;
  height: 72%;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.28);
}

/* Official Preview Controls (Image 3 & 9) */
.preview-dots-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 4px 0 6px;
}

.preview-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease;
}

.preview-dot.active {
  background: #ffffff;
  transform: scale(1.22);
}

.preview-actions-row {
  padding: 0 26px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.preview-bare-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.preview-bare-btn:active {
  transform: scale(0.92);
}

.preview-send-circle {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(18px);
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24);
  transition: transform 0.15s ease, background 0.2s ease;
}

.preview-send-circle:active {
  transform: scale(0.94);
}

.preview-send-circle:disabled {
  opacity: 0.55;
}

.flip-cam-btn,
.preview-action-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.flip-cam-btn {
  background: transparent;
}

.capture-micro-hint {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
}

.history-pull-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 2px 12px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.history-mini-thumb {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  font-size: 13px;
}

.history-mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Audience Avatar Selector Row (Bottom of Image 3 & 9) */
.audience-bar {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 18px 4px;
  scrollbar-width: none;
}

.audience-bar::-webkit-scrollbar {
  display: none;
}

.aud-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.16);
  align-self: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.aud-avatar-item {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  width: 54px;
  padding: 0;
}

.aud-avatar-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  padding: 2.5px;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid transparent;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.aud-avatar-circle img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.aud-avatar-item.selected {
  color: #5be2ff;
}

.aud-avatar-item.selected .aud-avatar-circle {
  border-color: #4bd8ff;
  box-shadow: 0 0 12px rgba(75, 216, 255, 0.35);
}

.aud-avatar-name {
  width: 100%;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== BOTTOM GLASS DOCK + COMPOSE FAB ==================== */
.bottom-dock-row {
  position: relative;
  z-index: 30;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 54px;
}

.bottom-glass-dock {
  width: 268px;
  height: 56px;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
}

.dock-btn {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 46px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.44);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dock-ptb-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}

.dock-ptb-tag {
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1;
}

.dock-btn.active {
  background: rgba(255, 255, 255, 0.17);
  color: #ffffff;
}

.dock-unread-dot {
  position: absolute;
  top: 9px;
  right: 16px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--danger);
}

/* Floating Lavender Pencil FAB on Chat Screen (Exact Image 2) */
.compose-pencil-fab {
  position: absolute;
  right: 14px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  background: var(--lilac);
  color: #201528;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(229, 152, 247, 0.35);
  cursor: pointer;
  transition: transform 0.16s ease;
}

.compose-pencil-fab:active {
  transform: scale(0.92);
}

/* ==================== SCREEN 3: KỶ NIỆM CALENDAR (EXACT IMAGE 3) ==================== */
.memories-screen {
  justify-content: flex-start;
  gap: 8px;
  padding-left: 14px;
  padding-right: 14px;
}

.memories-seg-pill {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.mem-seg-btn {
  height: 36px;
  padding: 0 18px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mem-seg-btn.active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.memories-scroll-wrap {
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.memories-scroll-wrap::-webkit-scrollbar {
  display: none;
}

.trail-Connector {
  flex-shrink: 0;
  margin: 2px 0;
}

/* Calendar Card */
.calendar-card {
  width: 100%;
  border-radius: 26px;
  overflow: hidden;
  background: #232528;
  border: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.calendar-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  background: #303336;
}

.cal-month-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.cal-month-arrows {
  display: flex;
  gap: 6px;
}

.cal-arrow-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 17px;
  cursor: pointer;
}

.calendar-days-grid {
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.cal-day-slot {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background: #383b3f;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-size: 18px;
}

.cal-day-slot.empty-pad {
  background: transparent;
}

.cal-day-slot.has-locket {
  border: 2px solid var(--lilac);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(229, 152, 247, 0.25);
}

.cal-day-slot.has-locket img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cal-day-count {
  position: absolute;
  right: 3px;
  bottom: 3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--lilac);
  color: #1f1326;
  font-size: 10px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

/* Rewind Card ("Tua lại Tháng ..." + "▶ Chơi") */
.rewind-banner-card {
  position: relative;
  width: 100%;
  padding: 20px 22px;
  border-radius: 26px;
  background: linear-gradient(125deg, #4b3d24 0%, #2a241b 60%, #3a311e 100%);
  border: 1px solid rgba(255, 202, 58, 0.22);
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  flex-shrink: 0;
}

.rewind-title,
.rewind-sub {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
}

.rewind-play-btn {
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  border: none;
  background: #ffbe18;
  color: #16130b;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 190, 24, 0.35);
}

/* Stats Pill ("💛 X Locket | 🔥 chuỗi Y ngày") */
.memories-stats-pill {
  padding: 12px 24px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 14.5px;
  color: var(--text-soft);
  flex-shrink: 0;
}

.memories-stats-pill strong {
  color: #fff;
  font-weight: 800;
}

.stats-divider {
  opacity: 0.25;
}

.memories-rollcalls-wrap {
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.moments-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 4px 2px;
}

.grid-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background: #282a2e;
  cursor: pointer;
}

.grid-cell img,
.grid-cell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.grid-cell span {
  position: absolute;
  left: 6px;
  bottom: 5px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  font-size: 10px;
  font-weight: 700;
}

/* ==================== SCREEN 4: TRÒ CHUYỆN (EXACT IMAGE 2) ==================== */
.chat-screen {
  justify-content: flex-start;
  padding-left: 14px;
  padding-right: 14px;
}

.chat-panel {
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.chat-threads-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 0;
}

.locket-chat-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 6px;
  border-radius: 18px;
  cursor: pointer;
  transition: background 0.16s ease;
}

.locket-chat-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.chat-ring-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  padding: 3px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  flex-shrink: 0;
}

.chat-ring-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #2c2f33;
  color: #aeb4bc;
  font-size: 17px;
  font-weight: 800;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.chat-ring-avatar-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-row-body {
  flex: 1;
  min-width: 0;
}

.chat-row-name {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 3px;
}

.chat-row-sub {
  font-size: 13.5px;
  color: var(--text-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-row-chevron {
  font-size: 22px;
  color: rgba(255, 255, 255, 0.42);
  font-weight: 600;
  padding-right: 4px;
}

/* Dashed Gold "+" Invite Row at bottom of Chat List (Exact Image 2) */
.invite-friend-chat-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 6px;
  cursor: pointer;
}

.dashed-gold-plus {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2.2px dashed var(--gold);
  color: var(--gold);
  font-size: 28px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.invite-row-label {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

/* Active 1-on-1 Chat View */
.chat-convo-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.convo-friend-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #343842;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.mini-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.convo-name {
  font-size: 15px;
  font-weight: 800;
}

.convo-handle {
  font-size: 12px;
  color: var(--text-soft);
}

.chat-messages-box {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 2px;
}

.msg-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 20px;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
  user-select: text;
}

.msg-bubble.mine {
  align-self: flex-end;
  background: #3d3f48;
  color: #fff;
  border-bottom-right-radius: 6px;
}

.msg-bubble.theirs {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-bottom-left-radius: 6px;
}

.msg-post-ref {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  margin-bottom: 6px;
  font-size: 11.5px;
}

.msg-post-ref img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.chat-send-form {
  display: flex;
  gap: 8px;
  padding-top: 8px;
}

.chat-send-form input {
  flex: 1;
  height: 42px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 14px;
  outline: none;
}

.chat-send-btn {
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: none;
  background: var(--gold);
  color: #16140e;
  font-weight: 800;
  cursor: pointer;
}

/* ==================== HISTORY VIEW ==================== */
.history-top-controls {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
}

.friend-filter-select {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--pill-dark);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  outline: none;
}

.friend-filter-select option {
  background: #202026;
}

.back-up-pill {
  height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.empty-history-card {
  margin: auto 10px;
  padding: 28px 22px;
  border-radius: 32px;
  background: rgba(18, 22, 28, 0.55);
  border: 1px solid var(--glass-border);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.empty-icon {
  font-size: 40px;
}

.empty-history-card p {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-soft);
}

.empty-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.moment-stage {
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.moment-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 16;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

.moment-nav-btn:disabled {
  opacity: 0.15;
  pointer-events: none;
}

.moment-nav-btn.prev { left: 12px; }
.moment-nav-btn.next { right: 12px; }

.moment-meta-row {
  width: 100%;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.moment-author-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px 4px 5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
}

.moment-author-name {
  font-size: 13.5px;
  font-weight: 800;
}

.gold-crown {
  font-size: 13px;
}

.moment-time,
.moment-counter {
  font-size: 12px;
  color: var(--text-soft);
}

.moment-right-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mini-circle-tool {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.moment-reactions-row {
  min-height: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.reaction-badge {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.32);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.moment-reply-dock {
  width: 100%;
  padding: 0 14px;
}

.moment-reply-form {
  height: 44px;
  padding: 0 8px 0 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  gap: 6px;
}

.moment-reply-form input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 13.5px;
  outline: none;
}

.inline-emojis {
  display: inline-flex;
  gap: 2px;
}

.react-emoji-btn {
  border: none;
  background: transparent;
  font-size: 20px;
  padding: 4px;
  cursor: pointer;
}

.emoji-burst-layer {
  position: absolute;
  inset: 0;
  z-index: 18;
  pointer-events: none;
  overflow: hidden;
}

.burst-item {
  position: absolute;
  bottom: 16px;
  font-size: 30px;
  animation: floatEmoji 1.3s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}

@keyframes floatEmoji {
  0% { opacity: 0; transform: translateY(10px) scale(0.5); }
  20% { opacity: 1; transform: translateY(-25px) scale(1.2); }
  100% { opacity: 0; transform: translateY(-220px) scale(0.95); }
}

.double-tap-heart {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 20;
  font-size: 84px;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  pointer-events: none;
}

.double-tap-heart.pop {
  animation: popHeart 0.7s ease forwards;
}

@keyframes popHeart {
  0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0; }
  40% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
  100% { transform: translate(-50%, -58%) scale(1.3); opacity: 0; }
}

/* ==================== FULL LOCKET GOLD PROFILE DRAWER (EXACT IMAGE 1) ==================== */
.modal-overlay {
  position: fixed;
  top: -80px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  background: rgba(6, 7, 10, 0.72);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 96px 16px 16px;
}

.modal-overlay.bottom-sheet-mode {
  align-items: flex-end;
  padding: 80px 0 0 0;
}

.locket-profile-drawer {
  position: relative;
  width: 100%;
  max-width: 450px;
  max-height: 92dvh;
  background: #1d1c21;
  border-radius: 34px 34px 0 0;
  padding: 12px 18px calc(28px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  box-shadow: 0 -16px 50px rgba(0, 0, 0, 0.65), 0 140px 0 0 #1d1c21;
  scrollbar-width: none;
}

.locket-profile-drawer::-webkit-scrollbar {
  display: none;
}

.drawer-grab-bar {
  width: 42px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  margin: 0 auto 14px;
}

.drawer-close-top {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
}

/* Top-left Circular LOCKET GOLD Stamp */
.locket-gold-stamp {
  position: absolute;
  top: 22px;
  left: 20px;
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
}

.stamp-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.stamp-text {
  fill: var(--gold);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.1px;
}

.stamp-heart {
  font-size: 24px;
}

/* Profile Hero */
.prof-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 6px;
}

.prof-hero-avatar-ring {
  position: relative;
  width: 106px;
  height: 106px;
  border-radius: 50%;
  padding: 4px;
  border: 3.5px solid var(--gold);
  display: grid;
  place-items: center;
  cursor: pointer;
  margin-bottom: 12px;
}

.prof-hero-avatar-ring.no-gold {
  border-color: rgba(255, 255, 255, 0.25);
}

.prof-hero-avatar-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

#profHeroInitials {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #32313a;
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 800;
}

.avatar-cam-badge {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2c2b33;
  border: 2px solid #1d1c21;
  display: grid;
  place-items: center;
  font-size: 13px;
}

.prof-hero-name {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
}

.prof-link-line {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: none;
  background: transparent;
  color: var(--text-soft);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

/* 4 Quick Circular Buttons */
.prof-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 20px 0 18px;
}

.prof-q-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.prof-q-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #323138;
  display: grid;
  place-items: center;
  transition: transform 0.15s ease, background 0.2s ease;
}

.prof-q-item:hover .prof-q-circle {
  background: #3d3c45;
}

.prof-q-label {
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Gold-bordered Member Banner */
.gold-member-banner {
  width: 100%;
  padding: 15px 18px;
  border-radius: 22px;
  background: #242228;
  border: 1.5px solid rgba(247, 185, 40, 0.55);
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  text-align: left;
  cursor: pointer;
  margin-bottom: 20px;
}

.banner-heart {
  font-size: 28px;
}

.banner-text-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.banner-text-col strong {
  font-size: 15px;
  font-weight: 800;
}

.banner-text-col span {
  font-size: 12.5px;
  color: var(--text-soft);
}

/* Section Headers */
.prof-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 2px 10px;
}

.sec-left {
  font-size: 15px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.9);
}

.sec-gold-link {
  border: none;
  background: transparent;
  color: var(--gold);
  font-size: 14px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.plus-box {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--gold);
  color: #18140a;
  font-size: 13px;
  font-weight: 900;
}

/* Widget Cards */
.widget-cards-row {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.widget-create-card,
.widget-live-card {
  width: 146px;
  height: 156px;
  border-radius: 26px;
  background: #2b2a30;
  border: 2px solid rgba(255, 255, 255, 0.14);
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.widget-plus-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  background: rgba(247, 185, 40, 0.12);
  color: var(--gold);
  font-size: 30px;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin-top: 6px;
}

.widget-create-pill {
  width: 100%;
  padding: 7px 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 13.5px;
  font-weight: 700;
}

.widget-live-card {
  padding: 0;
}

.widget-live-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.widget-live-tag {
  position: absolute;
  bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  font-size: 11px;
  font-weight: 700;
}

/* Locket Gold Settings Group */
.prof-settings-card {
  border-radius: 24px;
  background: #2a2930;
  overflow: hidden;
  margin-bottom: 16px;
}

.prof-setting-row {
  width: 100%;
  padding: 15px 16px;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  cursor: pointer;
}

.prof-setting-row:last-child {
  border-bottom: none;
}

.prof-setting-row.no-click {
  cursor: default;
}

.prof-setting-row.danger-text .set-title {
  color: #ff453a;
}

.sec-with-ico {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.set-icon-box {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.set-icon-box.gold {
  color: var(--gold);
}

.set-icon-box.danger {
  color: #ff453a;
}

.aa-glyph {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.row-meta-tag {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prof-footer-note {
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.42);
  padding: 4px 0 12px;
}

.set-title {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-chevron {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.36);
}

/* iOS Toggle Switch */
.ios-switch {
  position: relative;
  width: 50px;
  height: 30px;
  display: inline-block;
}

.ios-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ios-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: 0.25s;
}

.ios-slider::before {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  transition: 0.25s;
}

.ios-switch input:checked + .ios-slider {
  background: var(--gold);
}

.ios-switch input:checked + .ios-slider::before {
  transform: translateX(20px);
}

/* ==================== OTHER MODALS (CUSTOMIZER / QR / FRIENDS / INVITE) ==================== */
.sheet-box {
  width: 100%;
  max-width: 420px;
  max-height: 86dvh;
  padding: 20px;
  border-radius: 30px;
  background: #1f2027;
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}

.sheet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sheet-top h3 {
  font-size: 17.5px;
  font-weight: 800;
}

.sheet-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}

.choices-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.choice-tile {
  padding: 12px 8px;
  border-radius: 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.choice-tile span {
  font-size: 24px;
}

.choice-tile small {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-soft);
}

.choice-tile.selected {
  border-color: var(--gold);
  background: rgba(247, 185, 40, 0.18);
}

.qr-card-box {
  align-items: center;
  text-align: center;
}

.qr-card-box .sheet-top {
  width: 100%;
}

.qr-frame-wrap {
  padding: 12px;
  border-radius: 24px;
  background: #ffcf4a;
  box-shadow: 0 12px 34px rgba(247, 185, 40, 0.3);
}

.qr-frame-wrap img {
  width: 210px;
  height: 210px;
  display: block;
  border-radius: 12px;
}

.qr-handle-text {
  font-size: 18px;
  color: var(--gold);
}

.my-id-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tiny-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-soft);
  margin-bottom: 3px;
}

.my-id-banner strong {
  font-size: 16px;
  color: var(--gold);
  user-select: all;
}

.pill-action-btn {
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.pill-action-btn.gold {
  background: var(--gold);
  color: #16130b;
  border: none;
}

.pill-action-btn.subtle {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-soft);
}

.search-id-box {
  padding: 12px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.search-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.at-sign {
  font-weight: 800;
  color: var(--gold);
  font-size: 16px;
  padding-left: 4px;
}

.search-input-row input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-size: 13.5px;
  outline: none;
}

.friends-scroll-area {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.group-title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-soft);
  margin-bottom: 8px;
}

.user-list-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.user-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.user-card-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.u-name {
  font-size: 13.5px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.u-handle {
  font-size: 12px;
  color: var(--gold);
}

.row-btns {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.empty-note {
  font-size: 12.5px;
  color: var(--text-dim);
  text-align: center;
  padding: 14px 6px;
}

.invite-desc {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-soft);
}

.invite-link-card {
  padding: 12px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(247, 185, 40, 0.35);
}

.invite-badge {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 8px;
}

.invite-copy-row {
  display: flex;
  gap: 8px;
}

.invite-copy-row input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 12.5px;
  outline: none;
}

/* ==================== FULLSCREEN REWIND PLAYER ==================== */
.rewind-player-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: #0e0e12;
  display: flex;
  flex-direction: column;
  padding: 14px 16px 28px;
}

.rewind-progress-bars {
  display: flex;
  gap: 5px;
  margin-bottom: 12px;
}

.rw-bar {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  overflow: hidden;
}

.rw-bar.done {
  background: var(--gold);
}

.rewind-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.rewind-player-label {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--gold);
}

.rewind-stage {
  position: relative;
  flex: 1;
  max-width: 430px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rewind-media {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 42px;
  object-fit: cover;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}

.rewind-caption {
  position: absolute;
  bottom: 24px;
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  font-size: 14px;
  font-weight: 700;
}

/* Toasts */
.toast-area {
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 98;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: calc(100% - 32px);
  max-width: 380px;
}

.toast-pill {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(22, 22, 28, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}


/* ==================== BRAND LOGO IMAGE & ICON STYLES ==================== */
.brand-logo-img,
.stamp-heart-img,
.banner-heart-img,
.tile-logo-img {
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
}

.stamp-heart-img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.banner-heart-img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.tile-logo-img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

/* ==================== CAMERA THEME PICKER SHEET (IMAGE 2 & 3 MATCH) ==================== */
.camera-theme-sheet {
  position: relative;
  width: 100%;
  max-width: 450px;
  max-height: 94dvh;
  border-radius: 36px 36px 0 0;
  padding: 12px 0 calc(24px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  transition: background 0.3s ease;
  background: linear-gradient(180deg, #272729 0%, #1c1c1e 100%);
  box-shadow: 0 -16px 50px rgba(0, 0, 0, 0.65), 0 140px 0 0 #1c1c1e;
  scrollbar-width: none;
}

.camera-theme-sheet::-webkit-scrollbar {
  display: none;
}

.camera-theme-sheet[data-preview-theme="emerald"] {
  background: linear-gradient(180deg, #32555a 0%, #2b5944 55%, #2f6938 100%);
}
.camera-theme-sheet[data-preview-theme="ocean"] {
  background: linear-gradient(180deg, #205268 0%, #1d6b8c 55%, #16517a 100%);
}
.camera-theme-sheet[data-preview-theme="gold"] {
  background: linear-gradient(180deg, #3a2e1a 0%, #2a2115 65%, #1d1812 100%);
}
.camera-theme-sheet[data-preview-theme="rose"] {
  background: linear-gradient(180deg, #4f263c 0%, #3d1d30 60%, #271220 100%);
}
.camera-theme-sheet[data-preview-theme="violet"] {
  background: linear-gradient(180deg, #30214f 0%, #281945 60%, #1a112e 100%);
}
.camera-theme-sheet[data-preview-theme="sunset"] {
  background: linear-gradient(180deg, #4c231c 0%, #3b1917 60%, #241010 100%);
}
.camera-theme-sheet[data-preview-theme="cosmic_dream"] {
  background:
    linear-gradient(180deg, rgba(37, 30, 82, 0.72) 0%, rgba(24, 56, 78, 0.88) 100%),
    url("/static/img/themes/cosmic_dream.jpg?v=20261202cc") center / cover no-repeat;
}

.theme-sheet-head {
  text-align: center;
  padding: 8px 24px 18px;
}

.theme-sheet-head h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.theme-sheet-head p {
  font-size: 14.5px;
  line-height: 1.42;
  color: rgba(255, 255, 255, 0.68);
  font-weight: 600;
}

.theme-carousel {
  width: 100%;
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px calc(50% - 123px) 16px;
  scrollbar-width: none;
  cursor: grab;
}

.theme-carousel::-webkit-scrollbar {
  display: none;
}

/* Tall Modern iPhone Mockup Card (Image 6 Match) */
.phone-theme-card {
  position: relative;
  flex: 0 0 246px;
  height: min(55dvh, 456px);
  min-height: 392px;
  scroll-snap-align: center;
  border-radius: 42px;
  padding: 16px 10px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  border: 3px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
  opacity: 0.72;
  transform: scale(0.93);
  transition: transform 0.22s ease, opacity 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  overflow: hidden;
}

.phone-theme-card.active {
  opacity: 1;
  transform: scale(1);
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.55);
}

.phone-mini-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
}

.phone-mini-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.phone-mini-pill {
  width: 68px;
  height: 19px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.phone-mini-viewfinder {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 26px;
  overflow: hidden;
  background: #232429;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.phone-mini-viewfinder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.phone-mini-placeholder {
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.65);
  text-align: center;
  padding: 12px;
}

.phone-mini-shutter-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  margin-top: 4px;
}

.phone-mini-side {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.phone-mini-shutter {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  padding: 4px;
  display: grid;
  place-items: center;
}

.phone-mini-shutter span {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fff;
  border: 3px solid rgba(0, 0, 0, 0.6);
}

.phone-mini-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
}

.phone-mini-sq {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
}

.phone-mini-bar {
  width: 52px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.phone-mini-name {
  font-size: 11.5px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.84);
  letter-spacing: 0.01em;
}

.theme-dots-row {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 14px;
}

.theme-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  transition: all 0.2s ease;
}

.theme-dot.active {
  width: 18px;
  border-radius: 999px;
  background: #fff;
}

.theme-save-btn {
  width: calc(100% - 40px);
  height: 52px;
  border: none;
  border-radius: 999px;
  background: #ffbe18;
  color: #141414;
  font-size: 16.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  transition: background 0.25s ease, transform 0.12s ease;
}

.theme-save-btn:active {
  transform: scale(0.97);
}

/* Camera Presets Strip (Image 3) & Full Grid Modal (Image 4) */
.hud-cam-dot {
  position: absolute;
  top: -2px;
  right: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffcf4a;
  box-shadow: 0 0 6px rgba(255, 207, 74, 0.9);
}

.cam-style-bar {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 16;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: auto;
}

.cam-bar-circle {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(34, 34, 38, 0.68);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.cam-style-quick-track {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 4px;
  scrollbar-width: none;
}

.cam-style-quick-track::-webkit-scrollbar {
  display: none;
}

.cam-quick-item {
  flex: 0 0 auto;
  width: 44px;
  height: 36px;
  border: none;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0.74;
  transform: scale(0.88);
  transition: transform 0.16s ease, opacity 0.16s ease;
}

.cam-quick-item.active {
  opacity: 1;
  transform: scale(1.12);
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.5));
}

#cameraPresetsModal {
  z-index: 95;
}

.camera-presets-sheet {
  position: relative;
  width: 100%;
  max-width: 450px;
  max-height: 78dvh;
  border-radius: 34px 34px 0 0;
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  background: #232325;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 -16px 50px rgba(0, 0, 0, 0.65), 0 140px 0 0 #232325;
}

.presets-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 2px 4px;
}

.presets-sheet-head h3 {
  font-size: 18px;
  font-weight: 800;
}

.presets-reset-pill {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.presets-groups-scroll {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.presets-groups-scroll::-webkit-scrollbar {
  display: none;
}

.presets-group-title {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}

.presets-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px 10px;
}

.preset-item {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px 2px;
  border-radius: 16px;
  transition: background 0.15s ease, transform 0.12s ease;
}

.preset-item.active {
  background: rgba(255, 207, 74, 0.14);
  outline: 1.5px solid rgba(255, 207, 74, 0.55);
}

.preset-item:active {
  transform: scale(0.95);
}

.preset-ico-box {
  width: 50px;
  height: 44px;
  display: grid;
  place-items: center;
}

.preset-item-label {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  color: rgba(255, 255, 255, 0.86);
}

/* ==================== FRIENDS BOTTOM SHEET (IMAGE 4 MATCH) ==================== */
.locket-friends-drawer {
  position: relative;
  width: 100%;
  max-width: 450px;
  max-height: 92dvh;
  border-radius: 34px 34px 0 0;
  padding: 12px 18px calc(26px + env(safe-area-inset-bottom, 0px));
  background: #1c1d1f;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 -16px 50px rgba(0, 0, 0, 0.65), 0 140px 0 0 #1c1d1f;
  scrollbar-width: none;
}

.locket-friends-drawer::-webkit-scrollbar {
  display: none;
}

.friends-sheet-hero {
  text-align: center;
  margin-top: 2px;
}

.friends-hero-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 24px;
  font-weight: 800;
}

.friends-hero-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
}

.friends-hero-sub {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.56);
  margin-top: 4px;
  font-weight: 600;
}

.friends-search-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 8px 0 16px;
  border-radius: 18px;
  background: #2b2c2f;
  color: rgba(255, 255, 255, 0.65);
}

.friends-search-pill input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  outline: none;
}

.friends-search-pill input::placeholder {
  color: rgba(255, 255, 255, 0.52);
}

.search-go-pill {
  height: 34px;
  padding: 0 14px;
  border-radius: 12px;
  border: none;
  background: var(--gold);
  color: #16130b;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.friends-id-card {
  width: 100%;
  padding: 12px 14px;
  border-radius: 20px;
  border: none;
  background: #27282b;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
}

.friends-id-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}

.friends-id-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.friends-id-text span {
  font-size: 13.5px;
  font-weight: 700;
}

.friends-id-text strong {
  color: var(--gold);
}

.friends-id-text small {
  font-size: 12px;
  color: var(--gold);
  font-weight: 700;
}

.friends-section-label {
  font-size: 15px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.84);
  margin-top: 2px;
}

.quick-filter-chips {
  display: flex;
  gap: 8px;
  margin: 8px 0 4px;
}

.other-apps-card {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 14px 10px;
  border-radius: 22px;
  background: #27282b;
}

.app-share-item {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

.app-share-item small {
  font-size: 12px;
  font-weight: 700;
}

.app-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 24px;
}

.app-circle.insta {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}
.app-circle.snap {
  background: #fffc00;
}
.app-circle.sms {
  background: #27d35a;
}
.app-circle.more {
  background: #3a3b3f;
}

/* Friend / Request Rows inside Image 4 Sheet */
.friend-row-v2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 4px;
}

.friend-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.friend-gold-av {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  padding: 2.5px;
  border: 2.5px solid var(--gold);
  flex-shrink: 0;
}

.friend-gold-av-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #2e3035;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 800;
  overflow: hidden;
}

.friend-gold-av-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.friend-mini-heart {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1c1d1f;
  display: grid;
  place-items: center;
  font-size: 10px;
  border: 1.5px solid var(--gold);
}

.friend-row-name {
  font-size: 15.5px;
  font-weight: 800;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-row-handle {
  font-size: 12px;
  color: var(--text-soft);
}

.friend-x-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font-size: 20px;
  cursor: pointer;
}

.req-btns-pair {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.req-cancel-btn {
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.req-accept-btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: none;
  background: var(--gold);
  color: #16130b;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}

.show-more-pill {
  align-self: center;
  height: 36px;
  padding: 0 18px;
  border-radius: 999px;
  border: none;
  background: #35363a;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
}

.friends-bottom-share {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 6px 4px;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}


/* ==================== HISTORY VIEW V2 (EXACT IMAGE 2 MATCH) ==================== */
body.history-view-active .locket-backdrop {
  background:
    radial-gradient(circle at 50% 82%, rgba(164, 128, 28, 0.28), transparent 62%),
    linear-gradient(180deg, #1a1b19 0%, #1d1c17 52%, #292212 100%);
}

.history-filter-wrap {
  position: relative;
}

.friends-center-pill.filter-mode {
  background: rgba(255, 255, 255, 0.1);
  padding: 0 16px;
  gap: 6px;
}

.history-filter-menu {
  position: absolute;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  max-height: 320px;
  overflow-y: auto;
  padding: 8px;
  border-radius: 24px;
  background: rgba(28, 28, 32, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(22px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.filter-opt-row {
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
}

.filter-opt-row:hover,
.filter-opt-row.active {
  background: rgba(255, 255, 255, 0.12);
}

.filter-opt-row.active {
  color: var(--gold-bright);
}

.filter-opt-av {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  flex-shrink: 0;
}

.filter-opt-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.filter-opt-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 4px 6px;
}

/* History Screen Vertical Layout */
.history-screen-v2 {
  justify-content: space-between;
  padding: 6px 0 8px;
}

.history-screen-v2 .moment-stage {
  justify-content: space-evenly;
  gap: 8px;
}

/* Centered Author Row below Photo (Exact Image 2) */
.moment-author-center-row {
  position: relative;
  width: 100%;
  padding: 2px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.moment-author-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.moment-author-inline .mini-user-avatar {
  width: 28px;
  height: 28px;
}

.moment-author-inline .moment-author-name {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.moment-author-inline .moment-time {
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.56);
}

.moment-sub-tools {
  position: absolute;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.replies-count-pill {
  height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* Reply + Emoji Capsule Bar ("Tin nhắn... 💛 🫶 😍 😊+") */
.moment-reply-dock {
  position: relative;
  width: 100%;
  padding: 0 14px;
}

.moment-reply-form.v2 {
  height: 50px;
  padding: 0 12px 0 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  gap: 6px;
}

.moment-reply-form.v2 input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  outline: none;
}

.moment-reply-form.v2 input::placeholder {
  color: rgba(255, 255, 255, 0.52);
}

.reply-send-arrow {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--gold);
  color: #16130b;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  flex-shrink: 0;
}

.moment-reply-form.v2 .react-emoji-btn {
  font-size: 24px;
  padding: 3px;
}

.more-emoji-btn {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.86);
  display: grid;
  place-items: center;
  padding: 3px;
  cursor: pointer;
}

/* Popover Extra Emoji Grid */
.extra-emoji-popover {
  position: absolute;
  right: 16px;
  bottom: 60px;
  z-index: 40;
  padding: 10px;
  border-radius: 22px;
  background: rgba(28, 28, 34, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.55);
}

.extra-emoji-opt {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  font-size: 22px;
  cursor: pointer;
}

/* Exact Image 2 History Bottom Bar ([⊞] [ 📅 (◉) 💬 ] [📤]) */
.history-bottom-bar {
  width: 100%;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hist-side-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.hist-side-btn.hist-share-circle {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

.hist-side-btn.hist-share-circle:active {
  transform: scale(0.92);
}

.hist-center-dock {
  width: 214px;
  height: 56px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hist-center-dock .dock-btn {
  width: 48px;
  height: 44px;
}

.hist-cam-circle-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 3px solid #35d6f5;
  padding: 3px;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.hist-cam-circle-btn span {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #ffffff;
}

/* Post Replies Modal */
.post-replies-sheet {
  border-radius: 30px 30px 0 0;
  max-width: 450px;
  padding-bottom: calc(26px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -16px 50px rgba(0, 0, 0, 0.65), 0 140px 0 0 #1f2027;
}

/* ==================== CHÚ THÍCH / CAPTION PICKER SHEET (IMAGES 4-8) ==================== */
.caption-picker-sheet {
  position: relative;
  width: 100%;
  max-width: 450px;
  max-height: 82dvh;
  border-radius: 34px 34px 0 0;
  background: #222325;
  padding: 10px 18px calc(26px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -16px 50px rgba(0, 0, 0, 0.72), 0 140px 0 0 #222325;
}

.caption-sheet-title {
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.caption-custom-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.caption-custom-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--gold-bright);
}

.mini-x-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
}

.caption-color-swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.swatch-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
}

.swatch-dot.active {
  border-color: #fff;
  transform: scale(1.12);
}

.caption-custom-input-row {
  display: flex;
  gap: 8px;
}

.caption-custom-input-row input {
  flex: 1;
  min-width: 0;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  padding: 0 14px;
  font-size: 14px;
  outline: none;
}

.caption-sheet-body {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 12px;
  scrollbar-width: none;
}

.caption-sheet-body::-webkit-scrollbar {
  display: none;
}

.cap-section-head {
  font-size: 15px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 10px;
}

.cap-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 8px;
  align-items: center;
}

/* Shared Styled Caption Badge Pill (Preview + Chú thích Sheet + History Feed + Rewind) */
.caption-pill-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 15px;
  border-radius: 999px;
  border: none;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  color: #ffffff;
  background: rgba(58, 59, 62, 0.92);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.moment-caption-pill.caption-pill-badge,
.rewind-caption.caption-pill-badge {
  padding: 9px 18px;
  font-size: 15px;
  cursor: default;
}

.cap-cnn-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 0.85;
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-right: 3px;
}

.cap-cnn-stack small {
  font-size: 7.5px;
  letter-spacing: 0.05em;
}

.cap-cnn-text {
  font-style: italic;
  font-weight: 900;
}

.cap-s-dark { background: #3b3c3f; color: #fff; }
.cap-s-weather { background: linear-gradient(135deg, #52d1ff 0%, #3aa0f7 100%); color: #fff; }
.cap-s-streak { background: linear-gradient(135deg, #fcd34d 0%, #e09612 100%); color: #1b1506; }
.cap-s-sagittarius {
  background: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.28), transparent 28%),
              linear-gradient(135deg, #a014d9 0%, #c01ef0 55%, #8b12bf 100%);
  color: #fff;
}
.cap-s-poll { background: linear-gradient(135deg, #6b63ff 0%, #5248e5 100%); color: #fff; }
.cap-s-quote { background: #ffffff; color: #161618; }
.cap-s-cnn_live { background: #ee1c25; color: #fff; }
.cap-s-anim_cold {
  background: linear-gradient(135deg, #1d3978 0%, #2b50a8 50%, #1c326e 100%);
  color: #f0f7ff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}
.cap-s-anim_snow {
  background: linear-gradient(135deg, #ccebff 0%, #a5d8fc 100%);
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(14, 74, 128, 0.45);
}

.cap-p-olive { background: linear-gradient(135deg, #647d3d 0%, #3f5228 100%); color: #fff; }
.cap-p-slate { background: linear-gradient(135deg, #253d47 0%, #182931 100%); color: #fff; }
.cap-p-emerald { background: linear-gradient(135deg, #10d866 0%, #098e4c 100%); color: #fff; }
.cap-p-sky { background: linear-gradient(135deg, #00c6ff 0%, #0082df 100%); color: #fff; }
.cap-p-cream { background: linear-gradient(135deg, #f3e4bd 0%, #d2c79d 100%); color: #1d1b16; }
.cap-p-lime { background: linear-gradient(135deg, #95df37 0%, #71b828 100%); color: #162209; }
.cap-p-lavender { background: linear-gradient(135deg, #9b7bf2 0%, #6d55b8 100%); color: #fff; }
.cap-p-peach { background: linear-gradient(135deg, #f79d4e 0%, #c66844 100%); color: #fff; }
.cap-p-blush { background: linear-gradient(135deg, #f4d6ea 0%, #dbc3db 100%); color: #261b23; }
.cap-p-lilac { background: linear-gradient(135deg, #ded1f2 0%, #cbbfe3 100%); color: #221b2b; }
.cap-p-marigold { background: linear-gradient(135deg, #f7ca3e 0%, #ec8e4f 100%); color: #1d160b; }
.cap-p-crimson { background: linear-gradient(135deg, #f01e14 0%, #bd281a 100%); color: #fff; }
.cap-p-teal { background: linear-gradient(135deg, #039bb4 0%, #067d8e 100%); color: #fff; }
.cap-p-slate_lav { background: linear-gradient(135deg, #747892 0%, #5c607a 100%); color: #fff; }
.cap-p-frost { background: linear-gradient(135deg, #e7e4ec 0%, #cfd2e6 100%); color: #1c1a24; }
.cap-p-orchid { background: linear-gradient(135deg, #dca9f7 0%, #ba83de 100%); color: #1f1428; }
.cap-p-cyan_mint { background: linear-gradient(135deg, #6cf1ba 0%, #5ec3fb 100%); color: #102022; }
.cap-p-sunset { background: linear-gradient(135deg, #ffc36a 0%, #f19766 100%); color: #22170d; }
.cap-p-royal { background: linear-gradient(135deg, #5b51de 0%, #4b47ba 100%); color: #fff; }
.cap-p-ocean_teal { background: linear-gradient(135deg, #0ea5b9 0%, #1c587c 100%); color: #fff; }
.cap-p-sakura { background: linear-gradient(135deg, #fcc5dc 0%, #efaec7 100%); color: #2b1520; }
.cap-p-orchid_light { background: linear-gradient(135deg, #d7b2f8 0%, #c89ae8 100%); color: #1f1428; }
.cap-p-coral { background: linear-gradient(135deg, #f996c2 0%, #df7397 100%); color: #fff; }
.cap-p-indigo { background: linear-gradient(135deg, #6154de 0%, #4e3dc2 100%); color: #fff; }

.post-replies-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 55dvh;
  overflow-y: auto;
}

.post-reply-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.post-reply-body {
  flex: 1;
  min-width: 0;
}

.post-reply-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}

.post-reply-head strong {
  font-size: 13.5px;
  color: var(--gold-bright);
}

.post-reply-head span {
  font-size: 11px;
  color: var(--text-soft);
}

.post-reply-text {
  font-size: 14px;
  line-height: 1.4;
  user-select: text;
}

/* ==================== LOCKET PHOTOBOOTH (PTB - IMAGES 1-4) ==================== */
body.ptb-mode .locket-backdrop {
  background:
    radial-gradient(circle at 18% 14%, rgba(58, 92, 168, 0.48), transparent 52%),
    radial-gradient(circle at 84% 72%, rgba(44, 152, 166, 0.42), transparent 58%),
    linear-gradient(180deg, #1b1736 0%, #2a214a 38%, #214056 76%, #183642 100%);
}

body.ptb-mode #micBtn,
body.ptb-mode #hudGalleryBtn,
body.ptb-mode #filterCycleBtn {
  display: none;
}

body.ptb-mode .viewfinder-card:not(.ptb-active-frame) #zoomControl {
  display: none;
}

body.ptb-mode .viewfinder-card.ptb-active-frame #zoomControl {
  bottom: 14px;
}

/* 1-Tap Photobooth Direct Send Mode on Main Shutter Button (Image 6) */
.locket-shutter-ring.ptb-send-mode {
  background: linear-gradient(150deg, #52e8ff 0%, #7d74ff 55%, #ec6ead 100%);
  box-shadow: 0 0 26px rgba(82, 232, 255, 0.45);
}

.locket-shutter-ring.ptb-send-mode .locket-shutter-core {
  background: linear-gradient(160deg, #ffdd59 0%, #f7b928 100%);
  border-color: rgba(24, 20, 32, 0.9);
  color: #17130b;
}

/* Vertical History Swipe Transitions */
@keyframes slideUpFeed {
  from { opacity: 0.45; transform: translateY(28px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes slideDownFeed {
  from { opacity: 0.45; transform: translateY(-28px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.moment-frame.anim-up { animation: slideUpFeed 0.24s cubic-bezier(0.22, 1, 0.36, 1); }
.moment-frame.anim-down { animation: slideDownFeed 0.24s cubic-bezier(0.22, 1, 0.36, 1); }

/* ==================== LOCKET GOLD SHOWCASE MODAL (IMAGES 2 & 3) ==================== */
.locket-gold-sheet {
  position: relative;
  width: 100%;
  max-width: 450px;
  height: 92dvh;
  max-height: 92dvh;
  border-radius: 34px 34px 0 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(164, 114, 18, 0.32), transparent 44%),
    linear-gradient(180deg, #1b1507 0%, #241c09 55%, #120e05 100%);
  padding: 20px 18px calc(22px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 12px;
  box-shadow: 0 -16px 50px rgba(0, 0, 0, 0.72), 0 140px 0 0 #120e05;
}

.gold-sheet-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  flex-shrink: 0;
}

.gold-app-badge {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: linear-gradient(180deg, #272011 0%, #15120a 100%);
  border: 2px solid rgba(255, 209, 92, 0.35);
  box-shadow: 0 10px 26px rgba(247, 185, 40, 0.2);
  display: grid;
  place-items: center;
  font-size: 36px;
}

.gold-sheet-title {
  font-size: 28px;
  font-weight: 800;
  color: #fff2be;
  letter-spacing: -0.02em;
}

.gold-sheet-since {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.7);
}

.gold-perks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}

.gold-perks-list::-webkit-scrollbar {
  display: none;
}

.gold-perk-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #ffffff;
  text-align: left;
}

.gold-perk-card.clickable {
  cursor: pointer;
  transition: background 0.16s ease, transform 0.14s ease;
}

.gold-perk-card.clickable:active {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(0.985);
}

.gold-perk-ico {
  font-size: 26px;
  width: 34px;
  text-align: center;
  flex-shrink: 0;
}

.gold-perk-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.gold-perk-txt strong {
  font-size: 15.5px;
  font-weight: 800;
}

.gold-perk-txt small {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.56);
}

.gold-perk-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.gold-early-pill {
  padding: 3px 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffdf6e 0%, #f5b422 100%);
  color: #1b1404;
  font-size: 11px;
  font-weight: 800;
}

.gold-sheet-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.gold-cta-btn {
  width: 100%;
  height: 54px;
  border-radius: 999px;
  border: none;
  background: #ffbf1a;
  color: #161206;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(255, 191, 26, 0.3);
}

.gold-manage-link {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.66);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* ==================== OUTER PHOTOBOOTH DECORATIONS & UPGRADED WELCOME CARD ==================== */
.ptb-outer-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

body.ptb-mode #screenHome > *:not(.ptb-outer-deco) {
  position: relative;
  z-index: 2;
}

.ptb-out-polaroids {
  position: absolute;
  top: 56px;
  left: 24px;
  display: flex;
  gap: 3px;
  transform: scale(0.84);
  transform-origin: top left;
}

.ptb-mini-pol {
  width: 38px;
  height: 46px;
  padding: 4px 4px 10px;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 4px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  font-size: 16px;
}

.ptb-mini-pol.p-a { transform: rotate(-14deg); background: linear-gradient(135deg, #fff, #ffe7ef); }
.ptb-mini-pol.p-b { transform: rotate(9deg) translateY(6px); background: linear-gradient(135deg, #fff, #e6f4ff); }

.ptb-out-film-tr {
  position: absolute;
  top: 24px;
  right: -12px;
  width: 110px;
  height: 54px;
  border-radius: 8px;
  border: 2px dashed rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  transform: rotate(22deg);
}

.ptb-out-strip-bl {
  position: absolute;
  left: 4px;
  bottom: 84px;
  width: 28px;
  padding: 3px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.86);
  transform: rotate(-11deg);
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 10px;
  text-align: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
  opacity: 0.92;
}

.ptb-out-oval {
  position: absolute;
  left: 8px;
  padding: 2.5px 9px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.72);
  font-size: 8.5px;
  font-weight: 900;
  color: #1b1730;
  background: linear-gradient(135deg, #bef8ec, #e4cbff, #ffd6ea);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.ptb-out-oval.oval-1 { bottom: 52px; transform: rotate(8deg); }
.ptb-out-oval.oval-2 { bottom: 32px; left: 28px; transform: rotate(-8deg); font-size: 9px; }

.ptb-out-card-br {
  position: absolute;
  right: 8px;
  bottom: 100px;
  width: 38px;
  height: 45px;
  padding: 3px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: #201a28;
  transform: rotate(13deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.ptb-out-card-br small {
  font-size: 6px;
  font-weight: 900;
}

.ptb-out-seal-br {
  position: absolute;
  right: 12px;
  bottom: 46px;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  background: linear-gradient(135deg, #ffd4e8 0%, #c8f3ff 52%, #e9ffc4 100%);
  color: #261b34;
  font-size: 9.5px;
  font-weight: 900;
  display: grid;
  place-items: center;
  transform: rotate(12deg);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28);
}

.ptb-out-spark {
  position: absolute;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.65);
}

.ptb-out-spark.sp-1 { top: 64px; left: 112px; font-size: 18px; }
.ptb-out-spark.sp-2 { top: 72px; right: 94px; font-size: 16px; }
.ptb-out-spark.sp-3 { bottom: 170px; left: 56px; font-size: 17px; }
.ptb-out-spark.sp-4 { bottom: 38px; right: 72px; font-size: 20px; }

.ptb-top-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 0 12px 4px;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.ptb-top-row1,
.ptb-top-row2 {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ptb-banner-title {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.ptb-top-vnd-pill {
  padding: 1px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #c3f5ff, #ffd6f1);
  color: #1e1834;
  font-size: 10px;
  font-weight: 900;
}

.ptb-top-row2 strong {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.ptb-banner-spark {
  color: #ffe36e;
  font-size: 14px;
}

.ptb-banner-vn {
  font-size: 8.5px;
  font-weight: 900;
  padding: 2px 5px;
  border-radius: 5px;
  border: 1px dashed rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
}

/* PTB Welcome Card Artwork (Reference Match) */
.ptb-welcome-card {
  position: absolute;
  inset: 0;
  z-index: 6;
  padding: 18px 16px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 16%, rgba(255, 200, 128, 0.94), transparent 50%),
    radial-gradient(circle at 86% 24%, rgba(160, 118, 255, 0.88), transparent 52%),
    radial-gradient(circle at 82% 86%, rgba(92, 232, 224, 0.9), transparent 52%),
    linear-gradient(135deg, #ffa477 0%, #ef7ac4 42%, #8e7ef0 70%, #5fdad8 100%);
}

.ptb-wel-art-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ptb-in-film {
  position: absolute;
  display: flex;
  gap: 4px;
  padding: 5px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.18);
}

.ptb-in-film span {
  width: 24px;
  height: 22px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.ptb-in-film.f-tr { top: 8px; right: -8px; transform: rotate(22deg); }
.ptb-in-film.f-mr { top: 102px; right: 14px; flex-direction: column; transform: rotate(10deg); }
.ptb-in-film.f-mr span { width: 28px; height: 18px; }
.ptb-in-film.f-bl { bottom: 6px; left: -12px; transform: rotate(20deg); }

.ptb-in-smile {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff08d, #f7b838);
  border: 1.5px solid #4a2c40;
  color: #4a2c40;
  font-size: 18px;
  font-weight: 900;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16);
}

.ptb-in-smile.s-tl { top: 82px; left: 48px; transform: rotate(-12deg); }
.ptb-in-smile.s-mr { top: 204px; right: 42px; transform: rotate(12deg); }

.ptb-in-confetti {
  position: absolute;
  width: 14px;
  height: 6px;
  border-radius: 99px;
  background: rgba(145, 240, 224, 0.85);
}
.ptb-in-confetti.c-1 { top: 54px; left: 72px; transform: rotate(62deg); }
.ptb-in-confetti.c-2 { top: 72px; right: 92px; transform: rotate(-35deg); background: #ffd089; }
.ptb-in-confetti.c-3 { top: 185px; left: 32px; transform: rotate(-42deg); background: #ffa6d5; }

.ptb-in-star {
  position: absolute;
  color: #fff4b8;
  font-size: 18px;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
}
.ptb-in-star.st-1 { top: 122px; left: 18px; color: #a7f8ff; font-size: 24px; }
.ptb-in-star.st-2 { top: 74px; right: 56px; font-size: 22px; color: #ffe885; }
.ptb-in-star.st-3 { bottom: 132px; right: 20px; font-size: 20px; color: #ff99d6; }

.ptb-wel-eyebrow {
  position: relative;
  font-size: 14.5px;
  font-weight: 900;
  line-height: 1.25;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  margin-bottom: 4px;
}

.ptb-wel-logo {
  position: relative;
  font-size: 42px;
  font-weight: 900;
  line-height: 0.94;
  letter-spacing: -0.02em;
  color: #fff6fa;
  text-shadow: 0 4px 16px rgba(108, 32, 92, 0.42);
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.75);
}

.ptb-wel-logo span {
  display: block;
  font-size: 31px;
  background: linear-gradient(180deg, #fff4a8 0%, #f7b654 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 0;
  filter: drop-shadow(0 3px 10px rgba(96, 36, 12, 0.38));
}

.ptb-wel-ticket-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 10px;
}

.ptb-wel-cam-svg {
  transform: rotate(-10deg);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.22));
}

.ptb-wel-ticket {
  padding: 5px 24px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(114, 152, 255, 0.85), rgba(242, 136, 224, 0.85));
  border: 2px solid rgba(255, 255, 255, 0.86);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(142, 94, 210, 0.4);
}

.ptb-wel-guide-box {
  position: relative;
  width: 92%;
  padding: 9px 12px;
  border-radius: 16px;
  background: rgba(24, 42, 56, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
  text-align: left;
  font-size: 11px;
  line-height: 1.5;
  color: #f4f7fb;
}

.ptb-wel-guide-title {
  font-weight: 800;
  color: #ffe36e;
  margin-bottom: 2px;
}

.ptb-mini-pill {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 10px;
  color: #15171c;
}

.ptb-mini-pill.p1 { background: #a7f3d0; }
.ptb-mini-pill.p2 { background: #fde68a; }
.ptb-mini-pill.p3 { background: #fbcfe8; }

/* PTB 4-Cut Live Shooting Stage & Composite Result (Images 3 & 4) */
.ptb-stage {
  position: absolute;
  inset: 0;
  z-index: 7;
  background: #0b0c10;
}

.ptb-slots-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.ptb-slot {
  position: absolute;
  overflow: hidden;
  background: #0a0b0e;
  cursor: pointer;
}

.ptb-slot.active-shooting {
  box-shadow: inset 0 0 0 2.5px #3ce8ff;
}

.ptb-slot canvas,
.ptb-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ptb-slot-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.36);
  pointer-events: none;
}

.ptb-frame-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  pointer-events: none;
}

.ptb-composite-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  object-fit: cover;
}

/* In-frame Corner Buttons: PTB Frame Picker + [⋮] Menu (Images 1 & 3) */
.ptb-corner-controls {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  z-index: 28;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.ptb-corner-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(24, 26, 34, 0.68);
  backdrop-filter: blur(14px);
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.ptb-corner-btn:active {
  transform: scale(0.92);
}

.ptb-corner-tag {
  position: absolute;
  right: -3px;
  bottom: 3px;
  padding: 1px 4px;
  border-radius: 5px;
  background: #ffffff;
  color: #16181e;
  font-size: 7.5px;
  font-weight: 900;
  line-height: 1;
}

.ptb-right-menu-anchor {
  position: relative;
  pointer-events: auto;
}

.ptb-action-popover {
  position: absolute;
  right: 0;
  bottom: 52px;
  min-width: 174px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(26, 27, 34, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ptb-menu-item {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.94);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
}

.ptb-menu-item:hover,
.ptb-menu-item:active {
  background: rgba(255, 255, 255, 0.1);
}

.ptb-menu-item.gold {
  color: var(--gold-bright);
}

.ptb-guide-pill {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  font-size: 12px;
  font-weight: 700;
  color: #f4f7fb;
  text-align: center;
  max-width: 92%;
}

/* PTB Frame Picker Modal Sheet (Image 2) */
.ptb-frame-sheet {
  position: relative;
  width: 100%;
  max-width: 450px;
  max-height: 78dvh;
  border-radius: 34px 34px 0 0;
  background: #1d1e22;
  padding: 12px 16px calc(26px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  box-shadow: 0 -16px 50px rgba(0, 0, 0, 0.72), 0 140px 0 0 #1d1e22;
  scrollbar-width: none;
}

.ptb-frame-sheet::-webkit-scrollbar {
  display: none;
}

.ptb-sheet-head h2 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 2px;
}

.ptb-sheet-head p {
  font-size: 12.5px;
  color: var(--text-soft);
}

.ptb-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.ptb-mode-tab {
  height: 36px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.18s ease;
}

.ptb-mode-tab.active {
  background: linear-gradient(135deg, #46e2ff 0%, #7d74ff 100%);
  color: #101218;
}

.ptb-frame-carousel {
  display: flex;
  flex-direction: row;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 4px 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}

.ptb-frame-carousel::-webkit-scrollbar {
  display: none;
}

.ptb-frame-carousel:active {
  cursor: grabbing;
}

.ptb-frame-tile {
  flex: 0 0 132px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  padding: 4px;
  border-radius: 16px;
}

.ptb-swipe-hint {
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
  padding-bottom: 2px;
}

.ptb-frame-thumb-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  background: #0c0d11;
  overflow: hidden;
  border: 2.5px solid rgba(255, 255, 255, 0.14);
  transition: border-color 0.16s ease, transform 0.15s ease;
}

.ptb-frame-tile.selected .ptb-frame-thumb-wrap {
  border-color: #46e2ff;
  box-shadow: 0 0 16px rgba(70, 226, 255, 0.4);
  transform: scale(1.03);
}

.ptb-frame-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ptb-frame-tile span {
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.88);
}

/* ==================== HISTORY SHARE / SAVE / DELETE ACTION SHEET ==================== */
.hist-share-sheet,
.settings-info-sheet {
  position: relative;
  width: 100%;
  max-width: 450px;
  border-radius: 32px 32px 0 0;
  background: #1d1c21;
  padding: 14px 16px calc(24px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 -16px 50px rgba(0, 0, 0, 0.72), 0 140px 0 0 #1d1c21;
  max-height: 82dvh;
  overflow-y: auto;
}

.hist-share-preview-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 4px 2px;
}

.hist-sheet-thumb {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hist-sheet-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.hist-sheet-meta strong {
  font-size: 15px;
  font-weight: 800;
}

.hist-sheet-meta small {
  font-size: 12.5px;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hist-action-group {
  border-radius: 22px;
  background: #2a2930;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hist-action-btn {
  width: 100%;
  padding: 15px 18px;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: #fff;
  font-size: 15.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
}

.hist-action-btn:last-child {
  border-bottom: none;
}

.hist-action-btn:active {
  background: rgba(255, 255, 255, 0.06);
}

.hist-action-btn.danger {
  color: #ff453a;
}

.hist-action-confirm {
  padding: 16px;
  border-radius: 22px;
  background: #2a2930;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hist-action-confirm p {
  font-size: 14.5px;
  font-weight: 700;
}

.hist-confirm-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.hist-confirm-btn {
  height: 44px;
  border-radius: 16px;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 14.5px;
  font-weight: 800;
  cursor: pointer;
}

.hist-confirm-btn.danger {
  background: #ff453a;
}

.hist-cancel-pill {
  width: 100%;
  height: 48px;
  border-radius: 20px;
  border: none;
  background: #2a2930;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

/* Simple Profile Field Editor & Info / Notifications Sheet */
.input-group textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  outline: none;
  resize: vertical;
}

.input-group textarea:focus {
  border-color: var(--gold);
}

.simple-edit-desc {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-soft);
}

.rating-stars-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 4px 0;
}

.rate-star-btn {
  border: none;
  background: transparent;
  font-size: 34px;
  color: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: transform 0.12s ease, color 0.12s ease;
}

.rate-star-btn.active {
  color: var(--gold);
  transform: scale(1.08);
}

.settings-info-title {
  font-size: 19px;
  font-weight: 800;
  padding-right: 36px;
}

.settings-info-body {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.84);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.info-guide-box {
  padding: 14px 16px;
  border-radius: 20px;
  background: #2a2930;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-guide-box strong {
  color: var(--gold-bright);
  font-size: 14px;
}

.notif-ctrl-panel,
.delete-account-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notif-perm-status {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-soft);
  padding: 4px 4px;
}

.danger-solid-btn {
  width: 100%;
  height: 48px;
  border-radius: 20px;
  border: none;
  background: #ff453a;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

/* Friends ID + Quick QR Row & Invite QR Sheet */
.friends-notif-strip {
  width: 100%;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(247, 185, 40, 0.35);
  background: rgba(247, 185, 40, 0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
}

.friends-notif-strip strong {
  color: var(--gold-bright);
  white-space: nowrap;
}

.friends-id-qr-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.friends-id-qr-row .friends-id-card {
  flex: 1;
  min-width: 0;
}

.friends-qr-quick-btn {
  width: 74px;
  border-radius: 20px;
  border: 1px solid rgba(247, 185, 40, 0.42);
  background: rgba(247, 185, 40, 0.12);
  color: var(--gold-bright);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
}

.qr-frame-wrap.small-qr img {
  width: 186px;
  height: 186px;
}

.qr-actions-row,
.invite-quick-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.invite-quick-actions .locket-primary-btn {
  margin-top: 0;
}

.fallback-perm-link {
  border: none;
  background: transparent;
  color: var(--gold-bright);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  margin-top: 4px;
}

/* Modal Z-index layering so QR / Edit / Info sub-sheets stack above Profile & Friends drawers */
#inviteModal,
#editAccountModal,
#customizerModal,
#cameraThemeModal {
  z-index: 90;
}

#qrModal {
  z-index: 98;
}

#simpleEditModal,
#settingsInfoModal,
#histShareMenuModal {
  z-index: 110;
}

/* iOS .mobileconfig Download Button & 2-Step Quick Guide */
.ios-download-btn {
  height: 48px;
  width: 100%;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 207, 74, 0.45);
  background: linear-gradient(180deg, rgba(44, 38, 24, 0.92), rgba(28, 25, 18, 0.95));
  color: #ffd86b;
  font-size: 14.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease;
}

.ios-download-btn:active,
.ios-home-download-btn:active {
  transform: scale(0.975);
}

.ios-guide-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.94);
}

.ios-step-arrow {
  color: #ffcf4a;
  font-weight: 800;
}

.ios-home-download-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  margin: 2px 0 4px;
  position: relative;
  z-index: 25;
}

body.ptb-active .ios-home-download-wrap,
body.is-standalone .ios-home-download-wrap {
  display: none !important;
}

.ios-home-download-btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(24, 24, 30, 0.74);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 207, 74, 0.42);
  color: #ffcf4a;
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

a.prof-setting-row {
  text-decoration: none;
  color: inherit;
}

.ios-sheet-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ios-sheet-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 207, 74, 0.22);
  font-size: 13.5px;
  line-height: 1.45;
  color: #fff;
}

.ios-sheet-num {
  min-width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffcf4a;
  color: #18171c;
  font-size: 12.5px;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}

.ios-retrigger-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 207, 74, 0.16);
  border: 1px solid rgba(255, 207, 74, 0.45);
  color: #ffd86b;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
