:root {
  --bg: #000000;
  --bg-panel: #111111;
  --cyan: #5C00FF;        /* purple accent #5C00FF */
  --cyan-dim: #4A00CC;    /* darker purple */
  --teal-bar: #000000;    /* top bar */
  --pink: #ff6b9d;
  --text: #ffffff;
  --text-dim: #9a9a9a;
  --border: #2a2a2a;
  --danger: #ff5563;
  --pane-bg: #111111;     /* dark panel */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.hidden { display: none !important; }

/* Visibility helpers */
.desktop-only { display: none !important; }
.mobile-only { display: flex; }

/* ========== PROFILE ========== */
#screen-profile {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
}
.profile-wrap { width: 100%; max-width: 380px; }
.logo-top {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 28px; font-weight: 700; font-size: 20px;
}
#screen-profile h1 { font-size: 28px; font-weight: 700; line-height: 1.2; margin-bottom: 10px; }
.sub { color: var(--text-dim); font-size: 14px; line-height: 1.5; margin-bottom: 28px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; font-size: 13px; color: var(--text-dim); }
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"] {
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; color: var(--text); font-size: 16px; outline: none; width: 100%;
}
input:focus { border-color: var(--cyan); }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-dim); margin: 18px 0 24px; line-height: 1.4; }
.checkbox input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--cyan);
  -webkit-appearance: checkbox !important;
  appearance: checkbox !important;
  width: 20px;
  height: 20px;
  cursor: pointer;
  pointer-events: auto !important;
}
.btn-primary {
  width: 100%; background: var(--cyan); color: #fff; border: none; border-radius: 12px;
  padding: 15px 18px; font-weight: 700; font-size: 15px; cursor: pointer;
}
.btn-primary:hover { opacity: 0.92; }
.btn-primary:active { transform: scale(0.98); }

/* ========== MAIN SCREEN ========== */
.screen-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: #000;
  position: relative;
}

/* Desktop topnav — hidden on mobile */
.desktop-topnav {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: var(--teal-bar);
  border-bottom: 2px solid var(--cyan);
  padding: 0 24px;
  height: 52px;
  flex: none;
  z-index: 20;
}
.dtn-logo {
  display: flex; align-items: center; gap: 8px;
  color: #FFF; text-decoration: none; font-weight: 700; font-size: 20px;
}
.dtn-links { display: flex; align-items: center; gap: 22px; }
.dtn-links a {
  color: #fff; text-decoration: none; font-size: 14px; font-weight: 500; opacity: 0.95;
}
.dtn-links a:hover { opacity: 1; text-decoration: underline; }
.dtn-join {
  background: #fff !important; color: #0a0a0a !important;
  padding: 8px 18px; border-radius: 6px; font-weight: 700 !important;
  opacity: 1 !important; text-decoration: none !important;
}

/* Mobile watermark logo — top left corner */
.mobile-watermark {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 5px;
  pointer-events: none;
  opacity: 0.85;
}
.mobile-watermark span {
  font-size: 13px;
  font-weight: 600;
  color: var(--cyan);
  letter-spacing: 0.2px;
}

/* Mobile header */
.app-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  flex: none;
  z-index: 10;
}
.icon-btn {
  background: transparent; border: none; color: #ccc; padding: 6px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.icon-btn:hover { color: #fff; }
.brand-right {
  display: flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 17px;
}

/* Main layout: column on mobile, row on desktop */
.main-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.video-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Partner area */
.partner-area {
  flex: 1 1 42%;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  overflow: hidden;
}
.partner-status {
  display: flex; flex-direction: column; align-items: center; gap: 16px; z-index: 2;
}
.gender-circle {
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(92, 0, 255, 0.12);
  display: flex; align-items: center; justify-content: center;
}
.status-main {
  font-size: 14px; color: #bbb; text-align: center; max-width: 260px; line-height: 1.4;
}
.remote-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; background: #000; z-index: 1;
}
.noise-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 1; mix-blend-mode: screen; opacity: 0.45;
}
.noise-canvas.flicker { animation: flicker 0.6s steps(6) infinite; }
@keyframes flicker {
  0% { opacity: 0.12; } 20% { opacity: 0.5; } 35% { opacity: 0.18; }
  50% { opacity: 0.55; } 65% { opacity: 0.22; } 80% { opacity: 0.45; } 100% { opacity: 0.15; }
}
.pane-logo {
  position: absolute; top: 10px; right: 12px; z-index: 5;
  display: flex; align-items: center; gap: 4px; opacity: 0.7;
  font-size: 12px; font-weight: 600; color: var(--cyan); pointer-events: none;
}

/* Status bar (mobile) */
.status-bar {
  flex: none;
  display: none; align-items: center; justify-content: space-between;
  padding: 8px 16px; background: #0a0a0a;
  border-top: 1px solid #1a1a1a; border-bottom: 1px solid #1a1a1a;
  min-height: 40px;
}
.status-left { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #ccc; }
.status-emoji { font-size: 16px; }
.flag-btn { color: #888; }
.flag-btn:hover { color: var(--danger); }

/* Self area */
.self-area {
  flex: 1 1 44%;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  overflow: hidden;
}
.local-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; background: #000; z-index: 1;
}
.local-video.mirrored { transform: scaleX(-1); }
.camera-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: 18px; z-index: 2;
}
.self-gender { background: rgba(92, 0, 255, 0.1); }
.btn-start-camera {
  background: transparent; color: var(--cyan);
  border: 1.5px solid var(--cyan); border-radius: 10px;
  padding: 10px 22px; font-weight: 600; font-size: 15px; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
}
.btn-start-camera:hover { background: rgba(92, 0, 255, 0.12); }
.btn-start-camera:active { transform: scale(0.97); }

.gender-fab {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: transparent; border: none; color: #ccc;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 11px; cursor: pointer; z-index: 5; padding: 6px;
}
.gender-fab:hover { color: #fff; }
.gender-fab span { color: #aaa; }

/* Mobile Back / Next — fixed above bottom nav so always visible */
.nav-row {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(56px + env(safe-area-inset-bottom));
  z-index: 95;
  display: flex;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(10, 10, 12, 0.96);
  border-top: 1px solid #1a1a1a;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #161616;
  color: #eee;
  border: 1.5px solid #3a3a3a;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
}
.btn-nav:hover:not(:disabled) {
  border-color: var(--cyan);
  color: #fff;
  background: rgba(92, 0, 255, 0.1);
}
.btn-nav:disabled {
  opacity: 0.4;
  cursor: default;
}
/* Leave room in video layout for fixed back/next + bottom nav */
@media (max-width: 899px) {
  #screen-video .main-layout {
    padding-bottom: calc(56px + 64px + env(safe-area-inset-bottom));
  }
}

/* Mobile bottom nav — fixed so it stays visible over Shorts */
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: space-around;
  padding: 6px 4px max(10px, env(safe-area-inset-bottom));
  background: rgba(10, 10, 12, 0.96);
  border-top: 1px solid #1a1a1a;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
/* Space for fixed bottom nav + back/next row on mobile */
#screen-video {
  padding-bottom: 0;
}

.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: transparent; border: none; color: #888; font-size: 10px;
  cursor: pointer; padding: 4px 8px; min-width: 52px;
}
.nav-item:hover { color: #ccc; }
.nav-item.nav-plus { color: var(--cyan); }

/* Chat column — hidden on mobile by default */
.chat-column {
  display: none;
  flex-direction: column;
  background: #0a0a0a;
  min-height: 0;
  border-left: 1px solid #1a1a1a;
}
.chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid #1a1a1a; flex: none;
}
.chat-status { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #ddd; }
.gender-select-btn {
  display: flex; align-items: center; gap: 6px;
  background: transparent; border: 1.5px solid var(--cyan); border-radius: 20px;
  padding: 6px 12px; color: #fff; font-size: 13px; cursor: pointer;
}
.gender-select-btn:hover { background: rgba(92, 0, 255, 0.1); }
.chat-messages {
  flex: 1; overflow-y: auto; padding: 16px; min-height: 0;
}
.chat-msg {
  margin-bottom: 10px; font-size: 14px; line-height: 1.4;
  padding: 8px 12px; border-radius: 10px; max-width: 85%;
}
.chat-msg.me { background: rgba(92, 0, 255, 0.15); margin-left: auto; text-align: right; }
.chat-msg.them { background: #1a1a1a; }
.chat-msg.system {
  background: rgba(92, 0, 255, 0.08);
  border: 1px solid rgba(92, 0, 255, 0.25);
  color: #8F5CFF;
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
  max-width: 100%;
  margin: 0 auto 8px;
}
.chat-footer {
  flex: none; padding: 10px 12px 14px; border-top: 1px solid #1a1a1a;
  display: flex; flex-direction: column; gap: 10px;
}
.btn-next-desk {
  display: block;

  align-self: flex-start;
  background: #3a3a3a; color: #fff; border: none; border-radius: 8px;
  padding: 10px 18px; font-weight: 600; font-size: 13px; cursor: pointer;
  letter-spacing: 0.5px;
}
.btn-next-desk:hover { background: #4a4a4a; }
.btn-next-desk:disabled { opacity: 0.4; cursor: default; }
.chat-input-row {
  display: flex; align-items: center; gap: 6px;
  background: #151515; border: 1px solid #2a2a2a; border-radius: 24px;
  padding: 6px 8px 6px 16px;
}
.chat-input-row input {
  flex: 1; background: transparent; border: none; outline: none;
  color: #fff; font-size: 14px; padding: 6px 0;
}
.chat-icon-btn {
  background: transparent; border: none; color: #888; cursor: pointer;
  padding: 4px; font-size: 16px; display: flex; align-items: center;
}
.chat-icon-btn:hover { color: #ccc; }
.chat-send-btn {
  width: 34px; height: 34px; border-radius: 50%; border: none;
  background: var(--cyan); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.chat-send-btn:hover { opacity: 0.9; }

.btn-tap-audio {
  position: absolute; bottom: 140px; left: 50%; transform: translateX(-50%);
  z-index: 20; background: rgba(92, 0, 255, 0.15); color: var(--cyan);
  border: 1.5px solid var(--cyan); border-radius: 10px;
  padding: 10px 20px; font-weight: 600; font-size: 13px; cursor: pointer;
}

.toast {
  /* top of screen + above everything (was hidden behind the mobile Next/Back bar) */
  position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  background: #111; border: 1px solid var(--cyan); color: #fff;
  padding: 12px 20px; border-radius: 10px; font-size: 13px; z-index: 100000;
  max-width: 90vw; text-align: center; pointer-events: none;
  box-shadow: 0 6px 24px rgba(0,0,0,0.6);
}

/* Camera help (shown when camera fails, e.g. iPhone permissions) */
.cam-help {
  max-width: 320px; margin: 0 16px; padding: 12px 14px;
  background: rgba(0,0,0,0.85); border: 1px solid var(--cyan); border-radius: 12px;
  color: #eee; font-size: 13px; line-height: 1.5; text-align: center;
}
.cam-help strong { color: var(--cyan); }
.cam-help-btn {
  margin-top: 10px; background: var(--cyan); color: #fff; border: none;
  border-radius: 8px; padding: 8px 14px; font-weight: 700; font-size: 13px; cursor: pointer;
}

@media (max-height: 640px) {
  .gender-circle { width: 56px; height: 56px; }
  .status-main { font-size: 13px; }
  .btn-start-camera { padding: 8px 18px; font-size: 14px; }
}

/* ================================================================
   DESKTOP (≥ 900px) — Camgo split layout
   ================================================================ */
@media (min-width: 900px) {
  .mobile-only { display: none !important; }
  .desktop-only { display: flex !important; }
  .mobile-watermark { display: none !important; }

  .desktop-topnav { display: flex; }

  .screen-main { background: #0a0a0a; }

  .main-layout {
    flex-direction: row;
    flex: 1;
    min-height: 0;
  }

  .video-column {
    flex: 0 0 42%;
    max-width: 480px;
    border-right: 1px solid #1a1a1a;
  }

  .partner-area {
    flex: 1 1 50%;
    background: #090909;
    border-bottom: 1px solid #0a0a0a;
  }
  .self-area {
    flex: 1 1 50%;
    background: #060606;
  }

  .chat-column {
    display: flex;
    flex: 1;
    min-width: 0;
  }

  .status-main { color: #a0c0c0; }
  .gender-circle {
    background: rgba(92, 0, 255, 0.15);
    width: 80px; height: 80px;
  }

  .btn-tap-audio { bottom: 80px; }
}

/* Extra wide desktops */
@media (min-width: 1200px) {
  .video-column { flex: 0 0 38%; max-width: 520px; }
}

/* ================= Connected-with badge (top-right of partner video) ============= */
.connected-badge {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 6;
  max-width: 70%;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(92, 0, 255, 0.16);
  border: 1px solid rgba(92, 0, 255, 0.5);
  color: #eafffb;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.connected-badge::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: #5C00FF; box-shadow: 0 0 8px #5C00FF; flex: none;
}
@media (min-width: 900px) {
  .connected-badge { top: 12px; right: 14px; font-size: 13px; }
}

/* ================= Chat message name + body ============= */
.chat-msg { display: flex; flex-direction: column; gap: 2px; }
.chat-name {
  font-size: 11px; font-weight: 700; letter-spacing: .2px; opacity: .85;
  color: var(--cyan);
}
.chat-msg.me .chat-name { color: #7fe9df; }
.chat-body { font-size: 14px; line-height: 1.4; word-break: break-word; }

/* Unread dot on the mobile Chat button */
.nav-item.has-unread { position: relative; }
.nav-item.has-unread::after {
  content: ""; position: absolute; top: 2px; right: 12px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--pink); box-shadow: 0 0 6px var(--pink);
}

/* ================= Mobile chat overlay popup ============= */
.chat-overlay {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 150;
  height: 72vh;
  height: 72dvh;
  display: flex;
  flex-direction: column;
  background: #0b0b0b;
  border-top: 1px solid #1f1f1f;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .6);
  animation: chatSlideUp .22s ease-out;
}
@keyframes chatSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.chat-overlay-head {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid #1a1a1a;
}
.chat-overlay-name {
  font-size: 15px; font-weight: 700; color: #fff;
  display: flex; align-items: center; gap: 8px;
}
.chat-overlay-name::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: #5C00FF; box-shadow: 0 0 8px #5C00FF;
}
.chat-overlay-close {
  background: transparent; border: none; color: #999; cursor: pointer; padding: 4px;
  display: flex; align-items: center;
}
.chat-overlay-close:hover { color: #fff; }
.chat-overlay-messages {
  flex: 1; overflow-y: auto; padding: 14px 16px; min-height: 0;
  display: flex; flex-direction: column;
}
.chat-overlay-messages .chat-msg {
  margin-bottom: 10px; padding: 8px 12px; border-radius: 12px; max-width: 85%;
}
.chat-overlay-messages .chat-msg.me { background: rgba(92, 0, 255, 0.16); margin-left: auto; }
.chat-overlay-messages .chat-msg.them { background: #1a1a1a; }
.chat-overlay-messages .chat-msg.system {
  background: rgba(92, 0, 255, 0.08);
  border: 1px solid rgba(92, 0, 255, 0.25);
  color: #8F5CFF;
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
  max-width: 100%;
  margin: 0 auto 8px;
}
.chat-overlay-input-row {
  flex: none; display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; padding-bottom: max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid #1a1a1a; background: #0b0b0b;
}
.chat-overlay-input-row input {
  flex: 1; background: #161616; border: 1px solid #2a2a2a; border-radius: 22px;
  padding: 12px 16px; color: #fff; font-size: 15px; outline: none;
}
.chat-overlay-input-row input:focus { border-color: var(--cyan); }

/* The overlay is a mobile affordance; never show it on the desktop split layout. */
@media (min-width: 900px) {
  .chat-overlay { display: none !important; }
}

/* VIP + Tip link badges on partner video */
.partner-vip-badge {
  position: absolute;
  bottom: 14px;
  right: 12px;
  left: auto;
  top: auto;
  z-index: 12;
  background: linear-gradient(135deg, #5C00FF, #4A00CC);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(92, 0, 255, 0.45);
  pointer-events: none;
}
.partner-tip {
  position: absolute;
  bottom: 48px;
  right: 12px;
  left: auto;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  text-decoration: none;
  border: 1px solid rgba(251, 191, 36, 0.55);
  backdrop-filter: blur(6px);
}
.partner-tip:hover {
  background: rgba(251, 191, 36, 0.22);
  border-color: #fbbf24;
}
.partner-tip svg { flex: none; }


/* Partner avatar chip on video (opens profile) */
.partner-avatar-chip {
  position: absolute;
  bottom: 14px;
  left: 12px;
  top: auto;
  z-index: 13;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.72);
  border: 1px solid rgba(92, 0, 255, 0.45);
  border-radius: 999px;
  padding: 4px 12px 4px 4px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  max-width: min(70%, 220px);
}
.partner-avatar-chip:hover {
  border-color: #5C00FF;
  background: rgba(92, 0, 255, 0.35);
}
.partner-avatar-chip img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: #222;
}
.partner-avatar-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
input[type="file"] {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--text-dim);
  font-size: 13px;
  width: 100%;
}


/* Edit profile modal */
.edit-profile-modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.78);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
  padding-bottom: env(safe-area-inset-bottom);
}
.edit-profile-sheet {
  width: 100%; max-width: 440px;
  background: #121212;
  border-radius: 20px 20px 0 0;
  padding: 18px 20px calc(24px + env(safe-area-inset-bottom));
  border-top: 1px solid #2a2a2a;
  max-height: min(88dvh, 100% - 40px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 0;
}
.edit-profile-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.edit-profile-head h2 { font-size: 18px; font-weight: 700; }
.edit-profile-close {
  background: transparent; border: none; color: #999;
  font-size: 18px; cursor: pointer; padding: 4px 8px;
}
.edit-photo-row {
  display: flex; align-items: center; gap: 14px; margin-bottom: 18px;
}
.ep-photo {
  width: 72px; height: 72px; border-radius: 50%;
  object-fit: cover; background: #222;
  border: 2px solid var(--cyan);
}
.ep-photo-btn {
  background: rgba(92, 0, 255,0.12);
  color: var(--cyan);
  border: 1px solid rgba(92, 0, 255,0.35);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
}
@media (min-width: 900px) {
  .edit-profile-modal { align-items: center; padding: 24px; }
  .edit-profile-sheet { border-radius: 16px; max-height: 80vh; }
}

.partner-block-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 13;
  background: rgba(255, 85, 99, 0.15);
  color: #ff5563;
  border: 1px solid rgba(255, 85, 99, 0.5);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.partner-block-btn:hover {
  background: rgba(255, 85, 99, 0.3);
}

/* Tokens */
.token-balance-badge {
  position: fixed; top: 12px; right: 12px; z-index: 40;
  background: rgba(0,0,0,0.75); border: 1px solid rgba(92, 0, 255,0.45);
  color: #fff; border-radius: 20px; padding: 6px 12px; font-size: 13px; font-weight: 700;
  backdrop-filter: blur(8px);
}
@media (min-width: 900px) {
  .token-balance-badge { top: 64px; right: 24px; }
}

.send-gift-btn {
  position: absolute; top: 12px; right: 80px; z-index: 13;
  background: rgba(92, 0, 255,0.15); color: #8F5CFF;
  border: 1px solid rgba(92, 0, 255,0.5); border-radius: 20px;
  padding: 6px 12px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.send-gift-btn:hover { background: rgba(92, 0, 255,0.3); }

.gift-modal {
  position: fixed; inset: 0; z-index: 110;
  background: rgba(0,0,0,0.75);
  display: flex; align-items: flex-end; justify-content: center;
}
.gift-sheet {
  width: 100%; max-width: 440px; background: #121212;
  border-radius: 20px 20px 0 0; padding: 18px 16px max(20px, env(safe-area-inset-bottom));
  max-height: 80dvh; overflow-y: auto;
}
.gift-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.gift-head h2 { font-size: 17px; }
.gift-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.gift-item {
  background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 14px;
  padding: 12px 8px; text-align: center; cursor: pointer; color: #fff;
}
.gift-item:hover { border-color: var(--cyan); }
.gift-item img { width: 48px; height: 48px; object-fit: contain; margin-bottom: 6px; }
.gift-item .g-name { font-size: 12px; font-weight: 600; }
.gift-item .g-cost { font-size: 11px; color: #5C00FF; margin-top: 4px; }

.gift-toast {
  position: fixed; left: 50%; top: 20%; transform: translateX(-50%);
  z-index: 120; background: rgba(10,10,10,0.92);
  border: 1px solid rgba(92, 0, 255,0.5); border-radius: 16px;
  padding: 12px 18px; color: #fff; font-weight: 600; font-size: 14px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 32px rgba(92, 0, 255,0.35);
  pointer-events: none;
}
.gift-toast img { width: 36px; height: 36px; object-fit: contain; }

/* Shorts */
.shorts-screen {
  /* above Back/Next (95) and bottom-nav (100) when open — see z-index below */
  position: fixed;
  top: 0; left: 0; right: 0;
  bottom: 0;
  z-index: 140;
  background: #000;
  display: flex;
  flex-direction: column;
  /* leave space for bottom nav on mobile */
  padding-bottom: calc(56px + env(safe-area-inset-bottom));
}
.shorts-top {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(10px, env(safe-area-inset-top)) 14px 10px;
  background: rgba(0,0,0,0.88);
  z-index: 2;
  font-weight: 700;
  font-size: 15px;
}
.back-btn-inline {
  background: transparent; border: 1px solid #333; color: #fff;
  border-radius: 999px; padding: 8px 14px; font-size: 14px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.shorts-bal { font-size: 13px; color: #8F5CFF; }
.shorts-feed {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
.short-card {
  position: relative;
  height: calc(100dvh - 52px - 56px - env(safe-area-inset-bottom) - env(safe-area-inset-top));
  min-height: calc(100dvh - 52px - 56px - env(safe-area-inset-bottom) - env(safe-area-inset-top));
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.short-card video, .short-card .short-thumb {
  width: 100%; height: 100%; object-fit: cover;
  background: #000;
}
.short-card .short-thumb.blurred {
  filter: blur(18px) brightness(0.55); transform: scale(1.08);
}
.short-lock {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  background: rgba(0,0,0,0.4); z-index: 2;
  padding: 20px;
}
.short-lock button {
  background: linear-gradient(135deg, #5C00FF, #4A00CC);
  color: #fff; border: none; border-radius: 14px;
  padding: 14px 22px; font-weight: 700; font-size: 16px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  max-width: 90%;
}
.short-meta {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 20px;
  z-index: 3;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.short-meta .sm-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  object-fit: cover; flex: none;
  border: 2px solid rgba(92, 0, 255,0.7);
  background: #222;
}
.short-meta .sm-text { min-width: 0; flex: 1; }
.short-meta .sm-name { font-weight: 700; font-size: 15px; }
.short-meta .sm-title { font-size: 13px; opacity: 0.9; margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Desktop: no bottom nav padding */
@media (min-width: 900px) {
  .shorts-screen { padding-bottom: 0; }
  .short-card {
    height: calc(100dvh - 52px);
    min-height: calc(100dvh - 52px);
  }
}

/* Prevent iOS input zoom + tight mobile (do NOT strip checkbox appearance) */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
select,
textarea {
  font-size: 16px !important;
  border-radius: 12px;
}
select {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 14px;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}
input[type="checkbox"] {
  -webkit-appearance: checkbox !important;
  appearance: checkbox !important;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px;
  min-height: 20px;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--cyan);
  pointer-events: auto !important;
  opacity: 1 !important;
  position: relative;
  z-index: 2;
}
.checkbox {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: auto;
}
.checkbox span {
  pointer-events: none;
}
* { -webkit-tap-highlight-color: transparent; }


@media (min-width: 900px) {
  .gift-modal { align-items: center; }
  .gift-sheet { border-radius: 16px; }
}

.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.password-wrap input {
  width: 100%;
  padding-right: 48px;
}
.password-toggle {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 6px;
  opacity: 0.75;
}
.password-toggle:hover { opacity: 1; }

.nav-item.active { color: var(--cyan); }
.nav-item.active svg path,
.nav-item.active svg rect { stroke: var(--cyan); }

/* Desktop header tokens + profile */
.dtn-tokens {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.dtn-tokens:hover { background: rgba(255,255,255,0.2); }
.dtn-profile {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff; border-radius: 999px;
  padding: 4px 12px 4px 4px;
  font-weight: 600; font-size: 13px; cursor: pointer;
}
.dtn-profile:hover { background: rgba(255,255,255,0.18); }
.dtn-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  object-fit: cover; background: #333;
}
.token-balance-badge {
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
}
.token-buy-label {
  font-size: 11px; opacity: 0.85; font-weight: 600;
  border-left: 1px solid rgba(255,255,255,0.2);
  padding-left: 8px; margin-left: 2px;
}

/* Reels-style shorts */
.short-card video {
  pointer-events: auto;
  -webkit-touch-callout: none;
  user-select: none;
}
.short-play-overlay {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.25);
  cursor: pointer;
  transition: opacity 0.2s;
}
.short-play-overlay.hidden-ov {
  opacity: 0; pointer-events: none;
}
.short-play-btn {
  width: 68px; height: 68px; border-radius: 50%;
  background: rgba(0,0,0,0.45);
  border: 2px solid rgba(255,255,255,0.85);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.short-play-btn svg { margin-left: 3px; }
.short-card .short-thumb {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 1;
}
.short-card video.reel-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 1;
  background: #000;
}
.short-progress {
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: rgba(255,255,255,0.15); z-index: 4;
}
.short-progress > i {
  display: block; height: 100%; width: 0%;
  background: #fff;
}

.btn-logout {
  width: 100%; margin-top: 12px;
  background: transparent;
  border: 1px solid #444;
  color: #f87171;
  border-radius: 12px;
  padding: 12px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}
.btn-logout:hover { border-color: #f87171; background: rgba(248,113,113,0.08); }

.paywall-overlay {
  position: fixed; inset: 0; z-index: 180;
  background: rgba(0,0,0,0.82);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(8px);
}
.paywall-card {
  width: 100%; max-width: 360px;
  background: #141414;
  border: 1px solid rgba(92, 0, 255,0.4);
  border-radius: 20px;
  padding: 28px 22px;
  text-align: center;
  box-shadow: 0 16px 48px rgba(92, 0, 255,0.25);
}
.paywall-ico { font-size: 40px; margin-bottom: 10px; }
.paywall-card h2 { font-size: 22px; margin-bottom: 10px; color: #fff; }
.paywall-card p { color: #a3a3a3; font-size: 14px; line-height: 1.5; margin-bottom: 20px; }
.paywall-btn { display: block; text-align: center; text-decoration: none; margin-bottom: 12px; }
.paywall-dismiss {
  background: transparent; border: none; color: #888;
  font-size: 14px; cursor: pointer; padding: 8px;
}
.paywall-dismiss:hover { color: #ccc; }

/* Hide Back/Next when chat or shorts is open so they don't block input */
body.shorts-open .nav-row,
body.chat-open .nav-row {
  display: none !important;
  pointer-events: none !important;
}
body.shorts-open .bottom-nav {
  z-index: 145;
}
body.chat-open .bottom-nav {
  z-index: 155;
}
.chat-overlay {
  /* ensure input area is above everything in the sheet */
  padding-bottom: calc(56px + env(safe-area-inset-bottom));
}

/* Removed: connected banner + buy-tokens paywall popup */
.connected-badge, .paywall-overlay { display: none !important; }
/* Removed: gender icons in video panes */
.partner-area .gender-circle, .self-area .gender-circle, .gender-fab { display: none !important; }

/* ===== Mobile: partner full-screen + own camera as draggable PiP (WhatsApp-style) ===== */
@media (max-width: 899px) {
  .video-column { position: relative; }
  .video-column .partner-area { flex: 1 1 100%; }
  /* Before camera starts: self-area covers the video pane with the Start button */
  .video-column:not(.pip-on) .self-area {
    position: absolute; inset: 0; z-index: 25;
    background: #000;
  }
  /* Camera on: small floating window */
  .video-column.pip-on .self-area {
    position: absolute;
    flex: none;
    width: 30vw; max-width: 132px; min-width: 96px;
    aspect-ratio: 3 / 4;
    height: auto;
    left: 12px; top: 48px;
    z-index: 25;
    border-radius: 14px;
    border: 2px solid rgba(255,255,255,0.85);
    box-shadow: 0 8px 24px rgba(0,0,0,0.55);
    background: #000;
    touch-action: none;
    cursor: grab;
    -webkit-user-select: none; user-select: none;
    transition: left .22s ease, top .22s ease, box-shadow .2s ease;
  }
  .video-column.pip-on .self-area.dragging {
    transition: none;
    cursor: grabbing;
    box-shadow: 0 12px 32px rgba(0,0,0,0.7), 0 0 0 2px var(--cyan);
  }
  .video-column.pip-on .self-area .local-video { border-radius: 12px; pointer-events: none; }
  .video-column.pip-on .camera-placeholder { display: none !important; }
  /* keep partner badges clear of the PiP a bit */
  .video-column.pip-on .mobile-watermark { opacity: 0.6; }
  /* gift / block buttons below the token badge (was hidden behind it) */
  .send-gift-btn { top: 54px; right: 12px; }
  .partner-block-btn { top: 54px; right: 12px; }
}

/* Sound unlock button: always visible above video + nav */
.btn-tap-audio {
  position: fixed !important; left: 50%; transform: translateX(-50%);
  top: 40%; bottom: auto !important; z-index: 9000 !important;
  background: var(--cyan) !important; color: #fff !important; border: none !important;
  padding: 14px 26px !important; font-size: 16px !important; border-radius: 999px !important;
  box-shadow: 0 8px 30px rgba(0,0,0,0.6);
}
#remote-audio { display: none; }

/* ===== Partner actions: Gift / Report / Block (top of partner video) ===== */
.partner-actions {
  position: absolute; top: 12px; right: 12px; z-index: 14;
  display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end;
}
@media (max-width: 899px) { .partner-actions { top: 54px; } }
.partner-actions.hidden { display: none; }
.pa-btn {
  border-radius: 20px; padding: 6px 11px; font-size: 12px; font-weight: 700; cursor: pointer;
  backdrop-filter: blur(6px); background: rgba(0,0,0,0.6); color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
}
.pa-btn.hidden { display: none; }
.pa-gift { border-color: rgba(92,0,255,0.7); background: rgba(92,0,255,0.35); }
.pa-block { color: #ff6b76; border-color: rgba(255,85,99,0.6); }
.pa-btn:active { transform: scale(0.96); }

/* No black box while waiting for the first video frame */
.remote-video.no-frames { opacity: 0; }

/* Report modal */
.report-modal { position: fixed; inset: 0; z-index: 12000; background: rgba(0,0,0,0.7);
  display: flex; align-items: flex-end; justify-content: center; }
.report-modal.hidden { display: none; }
.report-sheet { width: 100%; max-width: 420px; background: #111; border: 1px solid #262626;
  border-radius: 18px 18px 0 0; padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .report-modal { align-items: center; } .report-sheet { border-radius: 16px; } }
.report-sheet h3 { margin: 0 0 4px; font-size: 17px; }
.report-sheet .sub { margin: 0 0 12px; font-size: 13px; color: #999; }
.report-reason, .report-cancel { display: block; width: 100%; text-align: left; margin-top: 8px;
  background: #1a1a1a; color: #fff; border: 1px solid #2a2a2a; border-radius: 12px;
  padding: 13px 14px; font-size: 15px; cursor: pointer; }
.report-reason:hover { border-color: var(--cyan); }
.report-cancel { text-align: center; background: transparent; color: #aaa; }

/* Page overlay (profile / buy) */
.page-overlay { position: fixed; inset: 0; z-index: 11000; background: #000; }
.page-overlay.hidden { display: none; }
.page-overlay iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.page-overlay-close { position: absolute; z-index: 2; right: 12px; top: calc(10px + env(safe-area-inset-top));
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.3);
  background: rgba(0,0,0,0.7); color: #fff; font-size: 18px; cursor: pointer; }

/* Delete button on own shorts */
.short-del-btn { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border-radius: 50%;
  border: none; background: rgba(0,0,0,0.75); color: #fff; font-size: 14px; cursor: pointer; }
.short-del-btn:disabled { opacity: 0.4; }

/* Banned */
.banned-screen { position: fixed; inset: 0; z-index: 200000; background: #000; color: #fff;
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.banned-screen h2 { color: #ff5563; margin: 0 0 8px; }

/* ===== Blur (women) + King ===== */
.remote-video.blurred { filter: blur(28px) brightness(0.8); transform: scale(1.12); }
.local-video.self-blurred { filter: blur(8px); }
.self-blur-tag { position: absolute; left: 6px; bottom: 6px; z-index: 3; font-size: 10px; font-weight: 700;
  background: rgba(0,0,0,0.7); color: #fff; padding: 3px 7px; border-radius: 8px; pointer-events: none; }
.self-blur-tag.hidden { display: none; }
.blur-lock { position: absolute; inset: 0; z-index: 12; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(0,0,0,0.25); }
.blur-lock.hidden { display: none; }
.blur-card { max-width: 300px; text-align: center; color: #fff; background: rgba(0,0,0,0.65);
  border: 1px solid rgba(255,255,255,0.15); border-radius: 18px; padding: 20px 18px; backdrop-filter: blur(6px); }
.blur-ico { font-size: 30px; margin-bottom: 6px; }
.blur-card strong { font-size: 17px; display: block; }
.blur-card p { font-size: 13px; color: #ccc; margin: 6px 0 14px; line-height: 1.4; }
.unlock-btn, .btn-king { width: 100%; border: none; border-radius: 999px; padding: 13px 16px; font-weight: 800; font-size: 15px;
  cursor: pointer; color: #1a1200; background: linear-gradient(135deg, #ffd54a, #f5a623);
  box-shadow: 0 6px 20px rgba(245,166,35,0.35); }
.unlock-btn:active, .btn-king:active { transform: scale(0.98); }
.pa-blur.on { background: rgba(92,0,255,0.6); border-color: #5C00FF; }
.partner-king-badge { position: absolute; left: 12px; bottom: 60px; z-index: 13; font-size: 11px; font-weight: 800;
  color: #1a1200; background: linear-gradient(135deg, #ffd54a, #f5a623); padding: 4px 10px; border-radius: 20px; }
.partner-king-badge.hidden { display: none; }
.king-badge { position: fixed; z-index: 41; top: 50px; right: 12px; font-size: 11px; font-weight: 800; color: #1a1200;
  background: linear-gradient(135deg, #ffd54a, #f5a623); padding: 4px 10px; border-radius: 20px; pointer-events: none; }
.king-badge.hidden { display: none; }
@media (min-width: 900px) { .king-badge { top: 104px; right: 24px; } }
@media (max-width: 899px) { body.is-king .partner-actions { top: 84px; } }
.ep-king-section { margin-top: 22px; padding: 14px; border: 1px solid rgba(245,166,35,0.35); border-radius: 14px;
  background: rgba(245,166,35,0.06); }
.ep-king-title { font-weight: 800; color: #ffd54a; }

/* ===== King trailer (replaces her video for non-Kings) ===== */
.remote-video.paused-by-her { visibility: hidden; }
.king-trailer { background: #000; padding: 0; overflow: hidden; }
.kt-bg { position: absolute; inset: -40%; z-index: 0;
  background: conic-gradient(from 0deg, #1a0050, #5C00FF, #2a0070, #f5a623, #1a0050);
  filter: blur(60px); opacity: 0.55; animation: kt-spin 12s linear infinite; }
@keyframes kt-spin { to { transform: rotate(360deg); } }
.kt-inner { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 24px; gap: 14px; color: #fff; }
.kt-crown { font-size: 58px; animation: kt-bounce 2.4s ease-in-out infinite; filter: drop-shadow(0 6px 18px rgba(245,166,35,0.6)); }
@keyframes kt-bounce { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-10px) rotate(4deg); } }
.kt-slides { position: relative; height: 34px; width: 100%; max-width: 320px; }
.kt-slide { position: absolute; inset: 0; font-size: 20px; font-weight: 700; opacity: 0;
  animation: kt-slide 12s infinite; }
.kt-slide b { color: #ffd54a; }
.kt-slide:nth-child(2) { animation-delay: 3s; }
.kt-slide:nth-child(3) { animation-delay: 6s; }
.kt-slide:nth-child(4) { animation-delay: 9s; }
@keyframes kt-slide { 0% { opacity: 0; transform: translateY(12px); } 4%,21% { opacity: 1; transform: none; }
  25%,100% { opacity: 0; transform: translateY(-12px); } }
.king-trailer .unlock-btn { max-width: 300px; animation: kt-pulse 1.8s ease-in-out infinite; }
@keyframes kt-pulse { 0%,100% { box-shadow: 0 6px 20px rgba(245,166,35,0.35); } 50% { box-shadow: 0 6px 34px rgba(245,166,35,0.75); } }
.kt-sub { font-size: 12px; color: #bbb; }

/* Trailer text may wrap; actions stack vertically on mobile so they never hide under the PiP */
.kt-slides { height: 58px; }
.kt-slide { display: flex; align-items: center; justify-content: center; line-height: 1.25; }
@media (max-width: 899px) {
  .partner-actions { flex-direction: column; align-items: flex-end; }
}

/* PiP resize buttons (mobile, only when floating) */
.pip-size { display: none; }
@media (max-width: 899px) {
  .video-column.pip-on .pip-size { display: flex; gap: 5px; position: absolute; top: 5px; right: 5px; z-index: 4; }
  .video-column.pip-on .self-area { transition: left .22s ease, top .22s ease, width .22s ease, box-shadow .2s ease; }
}
.pip-size-btn { width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.35);
  background: rgba(0,0,0,0.6); color: #fff; display: flex; align-items: center; justify-content: center;
  padding: 0; cursor: pointer; backdrop-filter: blur(4px); touch-action: manipulation; }
.pip-size-btn:active { transform: scale(0.9); background: var(--cyan); }
.pip-size-btn:disabled { opacity: 0.3; pointer-events: none; }

/* ===== Partner tag: 👑 KING + name, or "Guest" (bottom-left of partner video) ===== */
.partner-tag { position: absolute; left: 12px; bottom: 14px; z-index: 13; display: flex; flex-direction: column;
  align-items: flex-start; gap: 5px; pointer-events: none; }
.partner-tag.hidden { display: none; }
.partner-tag .pt-king { font-size: 11px; font-weight: 800; color: #1a1200; padding: 4px 10px; border-radius: 20px;
  background: linear-gradient(135deg, #ffd54a, #f5a623); box-shadow: 0 2px 10px rgba(245,166,35,0.45); }
.partner-tag .pt-king.hidden { display: none; }
.partner-tag .pt-name { font-size: 13px; font-weight: 700; color: #fff; padding: 5px 12px; border-radius: 20px;
  background: rgba(0,0,0,0.65); border: 1px solid rgba(255,255,255,0.18); backdrop-filter: blur(6px);
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.partner-tag.is-king .pt-name { border-color: rgba(245,166,35,0.6); }
.partner-king-badge { display: none !important; }   /* replaced by .partner-tag */

/* ===== King nav + desktop link ===== */
.nav-item.nav-king span { color: #f5a623; }
.desktop-topnav a.dtn-king { color: #ffd54a; font-weight: 700; }
body.is-woman #king-nav-btn, body.is-woman #dtn-king { display: none !important; }

/* ===== King promo screen (king.jpg + Become King) ===== */
.king-promo { position: fixed; inset: 0; z-index: 11500; background: #000; overflow: hidden; }
.king-promo.hidden { display: none; }
.king-promo .kp-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.king-promo .kp-overlay { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; text-align: center; color: #fff;
  padding: 90px 22px calc(28px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.75) 35%, rgba(0,0,0,0.95) 100%); }
.king-promo .kp-crown { font-size: 44px; filter: drop-shadow(0 6px 18px rgba(245,166,35,0.6)); }
.king-promo h2 { font-size: 30px; margin: 4px 0 6px; }
.king-promo p { color: #ddd; margin: 0 auto 16px; max-width: 360px; font-size: 15px; line-height: 1.45; }
.king-promo .unlock-btn { max-width: 360px; margin: 0 auto; display: block; font-size: 17px; padding: 15px 18px;
  animation: kt-pulse 1.8s ease-in-out infinite; }
.king-promo .kp-note { font-size: 12px; color: #aaa; margin-top: 10px; }
.king-promo .page-overlay-close { z-index: 2; }

/* ===== Tap partner video → full screen (CSS; works on iPhone too) ===== */
.partner-area { cursor: pointer; -webkit-tap-highlight-color: transparent; }
body.fs-video .video-column {
  position: fixed; inset: 0; z-index: 9500; width: 100%; max-width: none; height: 100%;
  background: #000; border: 0; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom);
}
body.fs-video .partner-area { flex: 1 1 100%; }
body.fs-video .remote-video { object-fit: cover; }
@media (min-width: 900px) {
  body.fs-video .self-area { position: absolute; right: 18px; bottom: 18px; width: 260px; height: 195px; flex: none;
    z-index: 25; border-radius: 14px; border: 2px solid rgba(255,255,255,0.8); overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,0.6); }
}
.fs-hint { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 20; pointer-events: none;
  background: rgba(0,0,0,0.65); color: #fff; font-size: 13px; padding: 8px 14px; border-radius: 20px; }
.fs-hint.hidden { display: none; }

/* King promo: perks list (desktop), split layout ≥ 900px — image left, info right */
.king-promo .kp-perks { display: none; }
@media (min-width: 900px) {
  .king-promo { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, 0.9fr); background: #050505; }
  .king-promo.hidden { display: none; }
  .king-promo .kp-img { position: relative; inset: auto; width: 100%; height: 100vh; object-fit: contain; display: block; }
  .king-promo .kp-overlay { position: relative; inset: auto; display: flex; flex-direction: column; justify-content: center;
    align-items: flex-start; text-align: left; padding: 48px 56px; height: 100vh; overflow-y: auto;
    background: radial-gradient(circle at 20% 0%, rgba(92,0,255,0.28), transparent 55%),
                radial-gradient(circle at 100% 100%, rgba(245,166,35,0.18), transparent 50%), #050505;
    border-left: 1px solid #1f1f1f; }
  .king-promo .kp-crown { font-size: 56px; }
  .king-promo h2 { font-size: 44px; margin: 8px 0 10px; letter-spacing: -0.5px; }
  .king-promo p { margin: 0 0 22px; max-width: 460px; font-size: 17px; color: #cfcfcf; }
  .king-promo .kp-perks { display: block; list-style: none; padding: 0; margin: 0 0 28px; max-width: 460px; width: 100%; }
  .king-promo .kp-perks li { display: flex; gap: 12px; align-items: center; padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08); font-size: 15px; color: #eee; }
  .king-promo .kp-perks li span { width: 34px; height: 34px; flex: none; border-radius: 10px; display: flex;
    align-items: center; justify-content: center; background: rgba(245,166,35,0.12); font-size: 17px; }
  .king-promo .unlock-btn { margin: 0; max-width: 420px; width: 100%; font-size: 18px; padding: 17px 20px; }
  .king-promo .kp-note { text-align: left; }
  .king-promo .page-overlay-close { top: 18px; right: 18px; }
}
@media (min-width: 900px) and (max-height: 640px) {
  .king-promo .kp-overlay { justify-content: flex-start; padding-top: 32px; }
  .king-promo h2 { font-size: 34px; }
}

/* ===== Tokens removed — King only ===== */
.token-balance-badge, .dtn-tokens, #dtn-buy, .gift-modal, .pa-gift { display: none !important; }
.king-badge { top: calc(12px + env(safe-area-inset-top)); }
@media (min-width: 900px) { .king-badge { top: 64px; right: 24px; } }
@media (max-width: 899px) {
  .partner-actions { top: 12px; }
  body.is-king .partner-actions { top: 44px; }
}
.shorts-king { border: none; border-radius: 999px; padding: 6px 12px; font-weight: 800; font-size: 13px; cursor: pointer;
  color: #1a1200; background: linear-gradient(135deg, #ffd54a, #f5a623); }
.short-lock-text { font-weight: 800; font-size: 16px; color: #ffd54a; margin: 2px 0 10px; }
.short-lock .unlock-short { color: #1a1200 !important; background: linear-gradient(135deg, #ffd54a, #f5a623) !important;
  border: none !important; font-weight: 800; }

/* ===== King gifts ===== */
.chat-gift-btn { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(245,166,35,0.55);
  background: rgba(245,166,35,0.12); font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.chat-gift-btn:active { transform: scale(0.92); }
body.is-woman .chat-gift-btn { display: none !important; }
.gift-picker { position: fixed; inset: 0; z-index: 12500; background: rgba(0,0,0,0.6); display: flex; align-items: flex-end; justify-content: center; }
.gift-picker.hidden { display: none; }
.gp-sheet { width: 100%; max-width: 460px; background: #0f0f0f; border: 1px solid #262626; border-radius: 18px 18px 0 0;
  padding: 16px 14px calc(16px + env(safe-area-inset-bottom)); max-height: 70vh; overflow-y: auto; }
@media (min-width: 900px) { .gift-picker { align-items: center; } .gp-sheet { border-radius: 16px; } }
.gp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; color: #ffd54a; font-size: 16px; }
.gp-close { background: transparent; border: 1px solid #333; color: #ccc; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; }
.gp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.gp-item { background: #181818; border: 1px solid #2a2a2a; border-radius: 14px; padding: 10px 6px 8px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px; color: #eee; }
.gp-item:hover, .gp-item:active { border-color: #f5a623; background: rgba(245,166,35,0.1); }
.gp-item img { width: 56px; height: 56px; object-fit: contain; }
.gp-emoji { font-size: 40px; line-height: 56px; }
.gp-name { font-size: 12px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gift-fly { position: fixed; left: 50%; top: 42%; z-index: 13000; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.gift-fly.hidden { display: none; }
.gift-fly img, .gift-fly .gf-emoji { width: 150px; height: 150px; object-fit: contain; font-size: 110px; text-align: center; line-height: 150px;
  filter: drop-shadow(0 10px 30px rgba(245,166,35,0.6)); }
.gift-fly .gf-cap { background: rgba(0,0,0,0.75); color: #fff; font-weight: 700; font-size: 15px; padding: 8px 14px;
  border-radius: 20px; border: 1px solid rgba(245,166,35,0.6); max-width: 80vw; text-align: center; }
.gift-fly.go img, .gift-fly.go .gf-emoji { animation: gf-pop 3.1s ease forwards; }
.gift-fly.go .gf-cap { animation: gf-cap 3.1s ease forwards; }
@keyframes gf-pop { 0% { transform: scale(0.2) rotate(-20deg); opacity: 0; } 15% { transform: scale(1.25) rotate(8deg); opacity: 1; }
  25% { transform: scale(1) rotate(0); } 80% { transform: scale(1) translateY(0); opacity: 1; } 100% { transform: scale(0.8) translateY(-60px); opacity: 0; } }
@keyframes gf-cap { 0%, 10% { opacity: 0; transform: translateY(10px); } 20%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.chat-msg.gift { display: flex; align-items: center; gap: 8px; }
.chat-gift-img { width: 34px; height: 34px; object-fit: contain; flex: none; }

/* ===== Who's online ===== */
.online-screen { position: fixed; inset: 0; z-index: 99; background: #000; display: flex; flex-direction: column;
  padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
.online-screen.hidden { display: none; }
@media (min-width: 900px) { .online-screen { padding-bottom: 0; top: 56px; } }
.os-top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: max(10px, env(safe-area-inset-top)) 14px 10px; border-bottom: 1px solid #161616; }
.os-title { font-weight: 800; font-size: 17px; }
.os-count { color: #f918c1; font-weight: 700; font-size: 14px; }
.os-spacer { width: 70px; }
.os-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 12px; }
.os-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 600px) { .os-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .os-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; max-width: 1200px; margin: 0 auto; } }
@media (min-width: 1300px) { .os-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 1400px; } }
.oc { position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; padding: 0;
  border: 1px solid #1d1d1d; background: #111; cursor: pointer; text-align: left; color: #fff;
  transition: transform .15s ease, box-shadow .2s ease; animation: oc-in .35s ease both; }
.oc:active { transform: scale(0.98); }
@media (hover: hover) { .oc:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(92,0,255,0.25); } }
@keyframes oc-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.oc img, .oc .oc-ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.oc .oc-ph { display: flex; align-items: center; justify-content: center; font-size: 56px; font-weight: 800; color: rgba(255,255,255,0.8);
  background: linear-gradient(135deg, #2a0a6e, #5C00FF 55%, #b0306a); }
.oc::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0) 50%, rgba(0,0,0,0.85)); }
.oc.is-live { border-color: rgb(78, 0, 217); box-shadow: 0 0 0 1px rgb(70, 4, 191), 0 6px 22px rgba(255,59,79,0.18); }
.oc:not(.is-live) img { filter: saturate(0.8) brightness(0.85); }
.oc-live { position: absolute; z-index: 2; top: 8px; left: 8px; display: flex; align-items: center; gap: 5px;
  background: #f918c1; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .5px; padding: 3px 8px; border-radius: 6px; }
.oc-live i { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: oc-pulse 1.2s ease-in-out infinite; }
@keyframes oc-pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.oc-vip { position: absolute; z-index: 2; top: 8px; right: 8px; background: rgba(92,0,255,0.85); color: #fff;
  font-size: 10px; font-weight: 800; padding: 3px 7px; border-radius: 6px; }
.oc-info { position: absolute; z-index: 2; left: 10px; right: 10px; bottom: 9px; display: flex; flex-direction: column; gap: 2px; }
.oc-name { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-age { font-weight: 600; opacity: 0.9; }
.oc-status { font-size: 11px; color: #aaa; }
.oc.is-live .oc-status { color: #4ade80; font-weight: 700; }
.os-sentinel { display: flex; justify-content: center; padding: 22px 0 30px; }
.os-sentinel.hidden { display: none; }
.os-spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid #222; border-top-color: #5C00FF; animation: os-spin .8s linear infinite; }
@keyframes os-spin { to { transform: rotate(360deg); } }
.os-empty, .os-err { color: #888; text-align: center; padding: 40px 0; grid-column: 1 / -1; }
.os-empty.hidden { display: none; }
.nav-item.nav-plus { position: relative; }
.nav-online-dot { position: absolute; top: 4px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%;
  background: #ff2d46; box-shadow: 0 0 0 2px #0a0a0a; animation: oc-pulse 1.4s ease-in-out infinite; }

/* ===== Free trial ===== */
.trial-timer { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 14; pointer-events: none;
  background: rgba(0,0,0,0.7); color: #fff; font-weight: 800; font-size: 13px; padding: 5px 12px; border-radius: 20px;
  border: 1px solid rgba(245,166,35,0.6); }
.trial-timer.low { color: #ffd54a; border-color: #ff4d5e; animation: oc-pulse 1s ease-in-out infinite; }
.trial-timer.hidden { display: none; }
.trial-banner { position: absolute; left: 12px; right: 12px; bottom: 70px; z-index: 15; background: rgba(0,0,0,0.82);
  border: 1px solid rgba(245,166,35,0.6); border-radius: 16px; padding: 12px 14px; color: #fff; backdrop-filter: blur(6px); }
.trial-banner.hidden { display: none; }
.tb-text { font-size: 13px; line-height: 1.4; }
.tb-text b { color: #ffd54a; }
.tb-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.tb-next { border: none; border-radius: 999px; padding: 9px 18px; font-weight: 800; background: var(--cyan); color: #fff; cursor: pointer; }
.tb-auto { font-size: 12px; color: #aaa; }

/* ===== Women photo gallery (edit profile) ===== */
.ep-gallery-section { margin-top: 22px; padding-top: 16px; border-top: 1px solid #2a2a2a; }
.ep-gal-title { font-weight: 800; margin-bottom: 10px; }
.ep-gal-sub { font-weight: 500; color: #888; font-size: 12px; }
.ep-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ep-gal-slot { position: relative; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: #141414;
  border: 1px dashed #333; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #999; cursor: pointer; padding: 0; }
.ep-gal-slot.add span { font-size: 30px; line-height: 1; color: var(--cyan); }
.ep-gal-slot.add small { font-size: 11px; margin-top: 4px; }
.ep-gal-slot.add:hover { border-color: var(--cyan); }
.ep-gal-slot.has { border: 1px solid #2a2a2a; cursor: default; }
.ep-gal-slot img { width: 100%; height: 100%; object-fit: cover; }
.ep-gal-del { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 50%; border: none;
  background: rgba(0,0,0,0.75); color: #fff; font-size: 14px; cursor: pointer; }
.ep-gal-msg { font-size: 12px; color: #4ade80; min-height: 16px; margin-top: 8px; }
.ep-gal-msg.err { color: #ff6b76; }
