/* ═══════════════════════════════════════════════
   Couple Sathi – Design System
   ═══════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────── */
:root {
  --rose:       #E07A7A;
  --rose-dark:  #c9184a;
  --rose-light: #ffd1dc;
  --rose-pale:  #fff5f7;
  --plum:       #7b2d8b;
  --ink:        #1a1a2e;
  --ink-soft:   #374151;
  --muted:      #6b7280;
  --border:     rgba(224,122,122,.18);
  --glass:      rgba(255,255,255,.22);
  --glass-dark: rgba(255,255,255,.12);
  --radius-sm:  10px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-xl:  36px;
  --shadow-sm:  0 4px 14px rgba(0,0,0,.07);
  --shadow-md:  0 12px 36px rgba(0,0,0,.10);
  --shadow-lg:  0 24px 64px rgba(0,0,0,.14);
  --transition: .25s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  /* Prevent pull-to-refresh and overscroll bounce in PWA / WebView.
     NOTE: overscroll-behavior is NOT supported on iOS Safari — it is Chrome/Android only.
     The JS fallback in app.html handles iOS pull-to-refresh prevention. */
  overscroll-behavior: none;
  overscroll-behavior-y: none;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink-soft);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Belt-and-suspenders: also block on body for older Android WebView */
  overscroll-behavior: none;
  overscroll-behavior-y: none;
}

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

/* ── Prevent long-press text selection on touch devices ─────────────────── */
/* Stops accidental text highlight when long-pressing buttons, cards,        */
/* nav items, mood emojis, polaroids, chat bubbles, etc.                     */
/* Re-enabled on all elements where users legitimately need to select text.  */
@media (pointer: coarse) {
  * {
    -webkit-user-select: none;
    user-select: none;
    /* Suppress the iOS long-press context menu (copy/define/share popover) */
    -webkit-touch-callout: none;
  }

  /* Fix 4: Suppress "Open in browser / Copy link / Share" popover on long-press
     of anchor tags and images — a dead giveaway that this is a web page.       */
  a, img {
    -webkit-touch-callout: none !important;
  }

  /* Re-enable selection where users need it */
  input,
  textarea,
  [contenteditable],
  [contenteditable="true"],
  select {
    -webkit-user-select: text !important;
    user-select: text !important;
    -webkit-touch-callout: default !important;
  }

  /* Allow selecting actual content text (e.g. love letters, QOTD answers) */
  .ll-letter-text,
  .qotd-answer-text {
    -webkit-user-select: text !important;
    user-select: text !important;
    -webkit-touch-callout: default !important;
  }

  /* Fix 9: Prevent I-beam text cursor on non-interactive elements on touch devices */
  body { cursor: default; }
  button, [role="button"], .cs-nav-item, a,
  .card, .btn, .mode-card, .feature-card,
  .deck-card, .cs-mob-nav-item { cursor: pointer; }
}

/* ── Page backgrounds ──────────────────────────── */
.bg-app {
  min-height: 100vh;
  min-height: 100dvh; /* iOS 16+: dynamic viewport excludes browser chrome */
  background: #0d0d18;
  color: #fff;
  display: flex;
  flex-direction: column;
  /* Override CSS vars so all --ink/--muted components read correctly on dark */
  --ink:        #ffffff;
  --ink-soft:   rgba(255,255,255,.87);
  --muted:      rgba(255,255,255,.55);
  --border:     rgba(255,255,255,.12);
  --glass:      rgba(255,255,255,.10);
  --glass-dark: rgba(255,255,255,.06);
}

.bg-soft {
  min-height: 100vh;
  min-height: 100dvh; /* iOS 16+: dynamic viewport excludes browser chrome */
  background:
    radial-gradient(900px 600px at 5% 10%, rgba(247,198,195,.7), transparent 30%),
    radial-gradient(900px 600px at 95% 15%, rgba(196,226,232,.7), transparent 30%),
    linear-gradient(180deg, #fff 0%, #fafafa 60%, #f5f5f5 100%);
  padding: 20px;
}

/* ── Container ─────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 480px; margin: 0 auto; padding: 0 20px; }

/* ── Navbar ────────────────────────────────────── */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  /* iOS safe area: when viewport-fit=cover is set (app.html meta tag), content
     renders under the status bar. We must add env(safe-area-inset-top) to the
     top padding so the nav clears the clock/battery row.
     This fixes both standalone PWA mode AND in-browser Safari on iPhone. */
  padding-top: calc(18px + env(safe-area-inset-top, 0px));
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-bottom: 1px solid rgba(255,255,255,.2);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: .5px;
}

.brand img { width: 46px; filter: drop-shadow(0 4px 12px rgba(0,0,0,.3)); }

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  font-weight: 500;
  font-size: 15px;
  opacity: .9;
  position: relative;
  transition: opacity var(--transition);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0; right: 100%;
  height: 2px;
  background: #fff;
  transition: right var(--transition);
}

.nav-links a:hover,
.nav-links a.active { opacity: 1; }

.nav-links a:hover::after,
.nav-links a.active::after { right: 0; }

/* ── Buttons ───────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }

.btn-primary {
  background: var(--rose);
  color: #fff;
  box-shadow: 0 8px 24px rgba(224,122,122,.35);
}

.btn-primary:hover { box-shadow: 0 12px 32px rgba(224,122,122,.45); }

.btn-ghost {
  background: rgba(255,255,255,.2);
  color: #fff;
  border: 1px solid rgba(255,255,255,.35);
}

.btn-ghost:hover { background: rgba(255,255,255,.3); }

.btn-soft {
  background: #fff;
  color: var(--rose-dark);
  box-shadow: var(--shadow-sm);
}

.btn-outline {
  background: transparent;
  color: var(--rose);
  border: 2px solid var(--rose);
}

.btn-outline:hover { background: var(--rose-pale); }

.btn-gold {
  background: linear-gradient(135deg, #FFD700, #FFB800);
  color: #5a3e00;
  box-shadow: 0 6px 20px rgba(255,200,0,.4);
}

.btn-logout {
  background: linear-gradient(135deg, var(--rose-light), #ff6f91);
  color: var(--rose-dark);
  font-weight: 700;
  /* Ensure adequate touch target on iOS — min 44px per Apple HIG.
     position:relative + z-index ensures it sits above any iOS system
     touch-interception layer that was swallowing taps near the status bar. */
  position: relative;
  z-index: 10;
  min-height: 44px;
  min-width: 44px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  cursor: pointer;
}

/* ── Glass card ────────────────────────────────── */
.glass-card {
  background: linear-gradient(145deg, var(--glass), var(--glass-dark));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 32px 80px rgba(0,0,0,.3);
}

/* ── White card ────────────────────────────────── */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ── Form elements ─────────────────────────────── */
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e5e7eb;
  border-radius: var(--radius-md);
  font-size: 16px; /* 16px prevents iOS auto-zoom */
  background: #fff;
  color: var(--ink-soft);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  margin-bottom: 18px;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(224,122,122,.15);
}

/* ── Auth page ─────────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,182,193,.45), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255,240,245,.4), transparent 40%),
    linear-gradient(145deg, #ff6f91, #e64980);
  padding: 20px;
  gap: 0;
}

/* Referral invite banner — always full width, above auth box */
#rfInviteBanner {
  width: 100%;
  max-width: 420px;
  margin-bottom: 16px;
}

.auth-box {
  background: rgba(255,255,255,.97);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 40px 100px rgba(0,0,0,.3);
  animation: slideUp .4s ease;
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo img { width: 70px; margin: 0 auto 12px; }
.auth-logo h1 { font-size: 22px; color: var(--ink); }
.auth-logo p { font-size: 14px; color: var(--muted); margin-top: 4px; }

.auth-tabs {
  display: flex;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 28px;
  gap: 4px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--muted);
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.auth-tab.active {
  background: #fff;
  color: var(--rose);
  box-shadow: var(--shadow-sm);
}

.auth-message {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}

.auth-message.error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.auth-message.success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.auth-message.show { display: block; }

/* ── Dashboard ─────────────────────────────────── */
.dashboard-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 48px 20px 60px;
}

.dashboard-inner {
  max-width: 1100px;
  width: 100%;
}

.couple-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 44px;
}

.couple-hero h1 {
  font-size: 36px;
  font-weight: 700;
  margin: 16px 0 6px;
  letter-spacing: .5px;
}

.couple-hero p { font-size: 16px; opacity: .9; }

.avatar-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  position: relative;
}

.avatar-ring {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,.75);
  box-shadow: 0 16px 48px rgba(0,0,0,.35);
  transition: transform var(--transition);
  cursor: pointer;
}

.avatar-ring:hover { transform: scale(1.06); }
.avatar-ring + .avatar-ring { margin-left: -30px; }

/* Ensure solo avatar stays perfectly circular */
#dashboardAvatar {
  display: block;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* Partner avatar wrapper — needed to position online dot */
.partner-avatar-wrap {
  position: relative;
  display: inline-block;
  /* No default margin — overlap is applied only when partner is visible (via JS) */
  margin-left: 0;
}

/* When partner is visible, overlap the two avatars */
.partner-avatar-wrap.partner-visible {
  margin-left: -30px;
}

/* Online / offline presence dot */
.partner-online-dot {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid rgba(201,24,74,.6);
  z-index: 10;
  transition: background .4s ease, box-shadow .4s ease;
}

.partner-online-dot.online {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,.3);
  animation: onlinePulse 2.5s ease-in-out infinite;
}

.partner-online-dot.offline {
  background: #9ca3af;
  box-shadow: none;
}

@keyframes onlinePulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34,197,94,.3); }
  50%       { box-shadow: 0 0 0 7px rgba(34,197,94,.08); }
}

/* Partner just-came-online notification banner */
.partner-online-notif {
  position: fixed;
  /* Safe area aware: in PWA standalone mode on iPhone, top:20px sits under
     the status bar (clock/battery). env(safe-area-inset-top) adds the exact
     height of the status bar so the pill always appears below it. */
  top: calc(20px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(calc(-60px - env(safe-area-inset-top, 0px)));
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  z-index: 99999;
  white-space: nowrap;
  box-shadow: 0 8px 28px rgba(0,0,0,.25);
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transition: transform .35s cubic-bezier(.175,.885,.32,1.275), opacity .35s ease;
  pointer-events: none;
}

.partner-online-notif.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.partner-online-notif .notif-dot {
  width: 9px;
  height: 9px;
  background: #fff;
  border-radius: 50%;
  animation: onlinePulse 1.5s ease-in-out infinite;
}

.heart-badge {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose-light), #ff6f91);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 10px 28px rgba(0,0,0,.3);
  animation: heartbeat 2.5s ease-in-out infinite;
}

.connected-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.25);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 10px;
  border: 1px solid rgba(255,255,255,.4);
}

/* ── Connect-partner pill ─────────────────────────────────────────────────── */
.cs-connect-pill-wrap {
  display: flex;
  justify-content: center;
  margin: 0 auto 28px;
}

.cs-connect-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 999px;
  padding: 10px 20px 10px 16px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 18px rgba(0,0,0,.18);
}

.cs-connect-pill:active { transform: scale(.97); }
.cs-connect-pill:hover  { background: rgba(255,255,255,.26); box-shadow: 0 6px 24px rgba(0,0,0,.22); }

.cs-connect-pill-icon { font-size: 16px; }
.cs-connect-pill-arrow {
  font-size: 18px;
  opacity: .7;
  margin-left: 2px;
  line-height: 1;
}

/* ── Connect-partner bottom sheet ────────────────────────────────────────── */
.cs-connect-sheet-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 9500; /* above mobile nav (9000) */
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity .28s ease;
}
.cs-connect-sheet-backdrop.open { display: block; opacity: 1; }

.cs-connect-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 9501; /* above mobile nav (9000) and backdrop */
  background: #1a0a2e;
  border-radius: 28px 28px 0 0;
  /* bottom padding clears the mobile nav (64px) + safe area */
  padding: 12px 24px calc(80px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform .32s cubic-bezier(.32,1,.4,1);
  max-width: 560px;
  margin: 0 auto;
  box-shadow: 0 -12px 48px rgba(0,0,0,.5);
}
.cs-connect-sheet.open { transform: translateY(0); }

.cs-connect-sheet-handle {
  width: 40px; height: 4px;
  background: rgba(255,255,255,.25);
  border-radius: 999px;
  margin: 0 auto 18px;
}

.cs-connect-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.cs-connect-sheet-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}

.cs-connect-sheet-close {
  background: rgba(255,255,255,.12);
  border: none;
  color: rgba(255,255,255,.7);
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.cs-connect-sheet-close:hover { background: rgba(255,255,255,.22); }

/* Tab switcher */
.cs-connect-tabs {
  display: flex;
  background: rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 22px;
  gap: 4px;
}

.cs-connect-tab {
  flex: 1;
  padding: 9px 0;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: rgba(255,255,255,.55);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.cs-connect-tab.active {
  background: rgba(255,255,255,.18);
  color: #fff;
}

/* Panel */
.cs-connect-panel { animation: csFadeIn .2s ease; }
@keyframes csFadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.cs-connect-desc {
  font-size: 13px;
  color: rgba(255,255,255,.6);
  margin-bottom: 16px;
  line-height: 1.5;
}

.cs-connect-action-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #ff4d6d, #c9184a);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
  box-shadow: 0 6px 20px rgba(201,24,74,.4);
}
.cs-connect-action-btn:active { transform: scale(.97); opacity: .9; }

.cs-connect-input {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid rgba(255,255,255,.2);
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 16px;
  font-family: inherit;
  letter-spacing: 1px;
  outline: none;
  margin-bottom: 12px;
  transition: border-color .2s;
}
.cs-connect-input::placeholder { color: rgba(255,255,255,.3); letter-spacing: 0; }
.cs-connect-input:focus { border-color: rgba(255,255,255,.5); }

.cs-sheet-code-display {
  margin-top: 14px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 3px;
  color: #fff;
  text-align: center;
  display: none;
}

.cs-sheet-status {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.75);
  text-align: center;
  min-height: 20px;
}

/* Legacy stubs — kept so desktop standalone pages still render correctly */
.invite-code-display { display: none; }
.join-status { display: none; }

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.feature-card {
  background: linear-gradient(155deg, rgba(255,255,255,.32), rgba(255,255,255,.14));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  border: 1px solid rgba(255,255,255,.22);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 0%, rgba(255,255,255,.3), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.feature-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 32px 80px rgba(0,0,0,.35); }
.feature-card:hover::before { opacity: 1; }

.feature-card .icon { font-size: 28px; margin-bottom: 12px; }
.feature-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 13px; opacity: .9; margin-bottom: 18px; line-height: 1.55; }

.feature-card .card-link {
  display: inline-block;
  padding: 9px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rose-light), #ff6f91);
  color: var(--rose-dark);
  font-weight: 700;
  font-size: 13px;
  transition: transform var(--transition);
  position: relative;
  z-index: 2;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.feature-card .card-link:hover { transform: scale(1.06); }
.feature-card .card-link:active { transform: scale(0.97); }
/* ── Cards page ────────────────────────────────── */
.cards-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.page-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.brand-logo { width: 38px; }
.brand-text { font-size: 17px; font-weight: 700; color: var(--ink); }

.plan-badge {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.plan-free { background: #f3f4f6; color: var(--muted); }
.plan-paid { background: linear-gradient(135deg, #FFD700, #FFC94D); color: #5a3e00; }

.product-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 4px;
}

/* Entry container */
.entry-section {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 0 0 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  overflow: hidden;
}

/* warm rose header band at the top of the entry card */
.entry-section-header {
  background: linear-gradient(135deg, #c9184a 0%, #ff4d6d 55%, #ff7a9c 100%);
  padding: 28px 28px 22px;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
}

/* decorative hearts pattern */
.entry-section-header::before {
  content: '♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥';
  position: absolute;
  inset: 0;
  padding: 10px 14px;
  font-size: 15px;
  line-height: 2.2;
  color: rgba(255,255,255,.08);
  letter-spacing: 6px;
  word-spacing: 6px;
  pointer-events: none;
  overflow: hidden;
}

/* soft arc at the bottom of the header */
.entry-section-header::after {
  content: '';
  position: absolute;
  bottom: -18px; left: -5%; right: -5%;
  height: 36px;
  background: #fff;
  border-radius: 50%;
}

.entry-section-body {
  padding: 0 24px;
}

.entry-title {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 8px rgba(100,0,30,.2);
}

.entry-subtitle {
  color: rgba(255,255,255,.78);
  font-size: 13px;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}

/* Mood pills */
.mood-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.mood-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .22s cubic-bezier(.34,1.4,.64,1);
  letter-spacing: .1px;
  position: relative;
  overflow: hidden;
}

/* individual resting colours — soft tinted backgrounds */
.mood-pill[data-mood="close"]   { background: #fff3f7; color: #c9184a; border-color: rgba(201,24,74,.2); }
.mood-pill[data-mood="playful"] { background: #fff8ec; color: #c07010; border-color: rgba(240,160,20,.25); }
.mood-pill[data-mood="distant"] { background: #eef4ff; color: #1a60b0; border-color: rgba(26,96,176,.2); }
.mood-pill[data-mood="conflict"]{ background: #f0faf4; color: #1a7a48; border-color: rgba(26,122,72,.2); }

.mood-pill:hover { transform: translateY(-3px) scale(1.04); }
.mood-pill[data-mood="close"]:hover   { background: #ffe4ef; box-shadow: 0 6px 18px rgba(201,24,74,.18); border-color: rgba(201,24,74,.35); }
.mood-pill[data-mood="playful"]:hover { background: #ffefd4; box-shadow: 0 6px 18px rgba(240,160,20,.18); border-color: rgba(240,160,20,.4); }
.mood-pill[data-mood="distant"]:hover { background: #ddeaff; box-shadow: 0 6px 18px rgba(26,96,176,.15); border-color: rgba(26,96,176,.35); }
.mood-pill[data-mood="conflict"]:hover{ background: #d8f4e4; box-shadow: 0 6px 18px rgba(26,122,72,.14); border-color: rgba(26,122,72,.35); }

/* active states — solid bold fills */
.mood-pill.active { color: #fff; border-color: transparent; transform: translateY(-2px); }
.mood-pill[data-mood="close"].active   { background: linear-gradient(135deg, #c9184a, #ff4d6d); box-shadow: 0 8px 22px rgba(201,24,74,.38); }
.mood-pill[data-mood="playful"].active { background: linear-gradient(135deg, #d07010, #f5a623); box-shadow: 0 8px 22px rgba(220,130,20,.38); }
.mood-pill[data-mood="distant"].active { background: linear-gradient(135deg, #1a5fb0, #3a8edf); box-shadow: 0 8px 22px rgba(26,96,176,.35); }
.mood-pill[data-mood="conflict"].active{ background: linear-gradient(135deg, #1a7848, #2db870); box-shadow: 0 8px 22px rgba(26,120,72,.32); }

.mood-pill:active { transform: scale(.95); }

/* Deck row */
.deck-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.deck-section-head h3 { font-size: 15px; color: var(--ink); font-weight: 600; }
.view-all { font-size: 13px; color: var(--rose); cursor: pointer; font-weight: 600; }
.view-all:hover { text-decoration: underline; }

.all-decks-section { margin-top: 20px; }

/* ── Deck band list ─────────────────────────────── */
.deck-band-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}

.deck-band {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 14px 12px 12px;
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(201,24,74,.13);
  background: linear-gradient(108deg, #fff8fa 0%, #fff 100%);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow var(--transition);
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

/* shimmer stripe in background */
.deck-band::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,180,200,.10) 60%, transparent 70%);
  pointer-events: none;
}

/* left accent bar */
.deck-band::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--deck-accent-light, #ffb3c6), var(--deck-accent, #c9184a));
  border-radius: 4px 0 0 4px;
  opacity: .55;
  transform: scaleY(1);
  transition: opacity var(--transition), transform var(--transition);
}

.deck-band:hover {
  border-color: rgba(201,24,74,.28);
  background: linear-gradient(108deg, #fff0f4 0%, #fff5f8 100%);
  transform: translateX(3px);
  box-shadow: 0 4px 18px rgba(201,24,74,.12);
}

.deck-band:hover::before { opacity: .85; }

.deck-band:active { transform: scale(.97) translateX(2px); }

.deck-band.locked {
  opacity: .42;
  cursor: not-allowed;
  background: #fafafa;
}

.deck-band.locked::before { opacity: .2; }
.deck-band.locked:hover { transform: none; box-shadow: none; border-color: rgba(201,24,74,.13); background: #fafafa; }

.deck-band.selected {
  border-color: var(--rose-dark);
  border-width: 2px;
  background: linear-gradient(108deg, #fff0f4 0%, #ffdce8 100%);
  transform: translateX(5px);
  box-shadow: 0 6px 24px rgba(201,24,74,.18);
}

.deck-band.selected::before { opacity: 1; width: 5px; }

/* bounce in on select */
@keyframes bandPop {
  0%   { transform: translateX(5px) scale(1); }
  45%  { transform: translateX(7px) scale(1.015); }
  100% { transform: translateX(5px) scale(1); }
}
.deck-band.selected { animation: bandPop .3s cubic-bezier(.34,1.56,.64,1); }

/* ── Emoji bubble ───────────────────────────────── */
.deck-band-emoji-wrap {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--deck-accent-light, #ffd1dc) 0%, var(--deck-accent-mid, #ffb3c6) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow var(--transition), background var(--transition);
  box-shadow: 0 3px 10px rgba(0,0,0,.08);
  position: relative;
}

.deck-band:hover .deck-band-emoji-wrap {
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 5px 16px rgba(201,24,74,.2);
  background: linear-gradient(135deg, var(--deck-accent-mid, #ffb3c6) 0%, var(--deck-accent, #ff7a9c) 100%);
}

.deck-band.selected .deck-band-emoji-wrap {
  transform: scale(1.14) rotate(-7deg);
  background: linear-gradient(135deg, var(--deck-accent, #ff7a9c) 0%, var(--deck-accent-dark, #c9184a) 100%);
  box-shadow: 0 6px 18px rgba(201,24,74,.32);
}

.deck-band-body { flex: 1; min-width: 0; }

.deck-band-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 3px;
  transition: color var(--transition);
}

.deck-band.selected .deck-band-name { color: var(--rose-dark); }

.deck-band-teaser {
  font-size: 12px;
  color: #a07080;
  font-style: italic;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--transition);
}

.deck-band.selected .deck-band-teaser {
  color: #8b2e4a;
  white-space: normal;
}

/* ── Check circle ───────────────────────────────── */
.deck-band-check {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid rgba(201,24,74,.25);
  background: rgba(255,255,255,.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: transparent;
  transition: all .25s cubic-bezier(.34,1.56,.64,1);
}

.deck-band.selected .deck-band-check {
  background: var(--rose-dark);
  border: 2px solid var(--rose-dark);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(201,24,74,.18);
  transform: scale(1.12);
}

/* ── Per-deck colour accents ──────────────────────
   CSS custom props inherited by emoji-wrap + accent bar.
   Groups: warm-pink (default), purple, teal, amber, blue ── */
.deck-band[data-key="everyday"]         { --deck-accent-light:#fff0c2; --deck-accent-mid:#ffd966; --deck-accent:#f5a623; --deck-accent-dark:#c97d00; }
.deck-band[data-key="flirty"]           { --deck-accent-light:#ffd6e8; --deck-accent-mid:#ff9ec4; --deck-accent:#e0528a; --deck-accent-dark:#b03070; }
.deck-band[data-key="truth_dare"]       { --deck-accent-light:#ffe3cc; --deck-accent-mid:#ffb87a; --deck-accent:#e07020; --deck-accent-dark:#b05010; }
.deck-band[data-key="mini_games"]       { --deck-accent-light:#e0f0ff; --deck-accent-mid:#90c8ff; --deck-accent:#3a8edf; --deck-accent-dark:#1a60b0; }
.deck-band[data-key="deep"]             { --deck-accent-light:#d0eeff; --deck-accent-mid:#78c0f8; --deck-accent:#1a80d0; --deck-accent-dark:#0a55a0; }
.deck-band[data-key="love_language"]    { --deck-accent-light:#ffe0f8; --deck-accent-mid:#f8a0e0; --deck-accent:#d050a8; --deck-accent-dark:#a03080; }
.deck-band[data-key="emotional_safety"] { --deck-accent-light:#ddf5ec; --deck-accent-mid:#7ddcb8; --deck-accent:#1aaa78; --deck-accent-dark:#0a7850; }
.deck-band[data-key="comfort_breaker"]  { --deck-accent-light:#e8e0ff; --deck-accent-mid:#b8a0f8; --deck-accent:#7050e0; --deck-accent-dark:#4828b8; }
.deck-band[data-key="valentine"]        { --deck-accent-light:#ffd8e4; --deck-accent-mid:#ff9ab8; --deck-accent:#d04070; --deck-accent-dark:#a02050; }
.deck-band[data-key="red_green"]        { --deck-accent-light:#e8f8e0; --deck-accent-mid:#90d870; --deck-accent:#3a9830; --deck-accent-dark:#1a6818; }
.deck-band[data-key="long_distance"]    { --deck-accent-light:#e0f0f8; --deck-accent-mid:#80c8e8; --deck-accent:#2888c0; --deck-accent-dark:#105890; }
.deck-band[data-key="reconnection"]     { --deck-accent-light:#f0e8ff; --deck-accent-mid:#c8a8f8; --deck-accent:#8848d8; --deck-accent-dark:#5828a8; }
.deck-band[data-key="fight_recovery"]   { --deck-accent-light:#fff0e8; --deck-accent-mid:#ffc09a; --deck-accent:#e07040; --deck-accent-dark:#b04820; }
.deck-band[data-key="unsaid"]           { --deck-accent-light:#f0f0f8; --deck-accent-mid:#b0b0d8; --deck-accent:#6060a8; --deck-accent-dark:#404080; }
.deck-band[data-key="apology"]          { --deck-accent-light:#ffe8f4; --deck-accent-mid:#ffb0d8; --deck-accent:#d058a0; --deck-accent-dark:#a03878; }
.deck-band[data-key="boundaries"]       { --deck-accent-light:#f8f0e8; --deck-accent-mid:#e8c890; --deck-accent:#b08030; --deck-accent-dark:#805810; }
.deck-band[data-key="expectations"]     { --deck-accent-light:#e8f8f0; --deck-accent-mid:#88d8b0; --deck-accent:#1a9868; --deck-accent-dark:#0a6840; }
.deck-band[data-key="future"]           { --deck-accent-light:#f0e8ff; --deck-accent-mid:#c890f8; --deck-accent:#9030e0; --deck-accent-dark:#6010b0; }
.deck-band[data-key="money"]            { --deck-accent-light:#f0f8e8; --deck-accent-mid:#b8e070; --deck-accent:#68a810; --deck-accent-dark:#407800; }
.deck-band[data-key="values"]           { --deck-accent-light:#fff8e8; --deck-accent-mid:#f8d880; --deck-accent:#c89820; --deck-accent-dark:#986800; }
.deck-band[data-key="slow_intimacy"]    { --deck-accent-light:#e8e8ff; --deck-accent-mid:#a0a0f0; --deck-accent:#4848c8; --deck-accent-dark:#2020a0; }
.deck-band[data-key="just_married"]     { --deck-accent-light:#fff0d8; --deck-accent-mid:#ffc878; --deck-accent:#e08010; --deck-accent-dark:#b05800; }
.deck-band[data-key="intimacy"]         { --deck-accent-light:#ffe8e8; --deck-accent-mid:#ff9898; --deck-accent:#d03030; --deck-accent-dark:#a00808; }

/* ── Selection status bar ───────────────────────── */
.deck-selection-bar {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(224,122,122,.18);
}

.deck-selection-count {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 14px;
  transition: color var(--transition), font-weight var(--transition);
  min-height: 20px;
}

.deck-selection-count.has-selection {
  color: var(--rose-dark);
  font-weight: 700;
}

/* Keep old deck-circle-wrap/deck-circle for any other pages still using them */
.deck-circle-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: transform var(--transition);
}
.deck-circle-wrap:hover { transform: translateY(-3px); }
.deck-circle-wrap.locked { opacity: .45; cursor: not-allowed; }
.deck-circle-wrap.locked:hover { transform: none; }
.deck-circle {
  width: 56px; height: 56px; border-radius: 50%;
  background: #f3f4f6; display: flex; align-items: center;
  justify-content: center; font-size: 22px; position: relative;
  border: 2.5px solid transparent; transition: all var(--transition);
}
.deck-circle-wrap.selected .deck-circle {
  background: linear-gradient(135deg, #ffd1dc, #ff9ab3);
  border-color: var(--rose);
  box-shadow: 0 6px 20px rgba(224,122,122,.3);
}
.lock-badge { position: absolute; bottom: -2px; right: -2px; font-size: 12px; }
.deck-name { font-size: 11px; font-weight: 600; color: var(--muted); text-align: center; max-width: 64px; }
.deck-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }
.deck-row--wrap { flex-wrap: wrap !important; overflow-x: visible !important; }
.deck-row--wrap .deck-circle-wrap { flex-shrink: 1 !important; }


/* Entry actions */
.entry-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.entry-actions .btn { min-width: 180px; }

/* Player names box */
.names-box {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

/* Card table */
.card-table {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.turn-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.turn-pill {
  background: rgba(224,122,122,.12);
  color: var(--rose);
  padding: 7px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
}

#turnAvatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--rose);
  box-shadow: var(--shadow-md);
  transition: all .4s ease;
}

/* ════════════════════════════════════════════
   CARD STAGE — portrait orientation, both
   faces same fixed size, no mismatch
   ════════════════════════════════════════════ */
.card-stage {
  width: 260px !important;
  height: 370px !important;
  perspective: 1200px;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .card-stage {
    width: 240px !important;
    height: 340px !important;
  }
}

@media (max-width: 360px) {
  .card-stage {
    width: 220px !important;
    height: 314px !important;
  }
}

.playing-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform .72s cubic-bezier(.4,0,.2,1);
  transform: rotateY(180deg); /* back shown by default */
}

.playing-card.show-front { transform: rotateY(0deg); }

.card-face {
  position: absolute;
  inset: 0;
  border-radius: 22px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ── Card Front — matches Gemini reference ── */
.card-front {
  /* Purple gradient matching the reference */
  background: linear-gradient(160deg, #6a1b9a 0%, #8e24aa 30%, #ab47bc 60%, #ce93d8 100%);
  box-shadow:
    0 24px 60px rgba(106,27,154,.5),
    0 0 0 2px rgba(255,255,255,.18),
    inset 0 1px 0 rgba(255,255,255,.25);
  flex-direction: column;
  gap: 10px;
  text-align: center;
  padding: 20px 20px 16px;
  position: relative;
}

/* Scattered hearts background — like the reference */
.card-front::before {
  content: '♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥';
  position: absolute;
  inset: 0;
  padding: 12px;
  font-size: 13px;
  line-height: 2;
  word-spacing: 8px;
  color: rgba(255,255,255,.12);
  letter-spacing: 3px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

/* Inner border frame — like the reference rounded rect */
.card-front::after {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 14px;
  border: 1.5px solid rgba(255,255,255,.22);
  pointer-events: none;
  z-index: 0;
}

/* ── Front inner elements — all z-index 2 to sit above patterns ── */
.card-front-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
  z-index: 2;
}

/* Logo on card front */
.card-front-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 3px 10px rgba(0,0,0,.25));
}

/* Brand name under birds */
.card-front-brand {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,.85);
  letter-spacing: 0.5px;
  font-style: italic;
}

/* Deck icon (dice emoji) */
.card-front-icon {
  font-size: 22px;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.25));
}

/* Deck category label — "Playful Challenge" style from reference */
.card-front-category {
  position: relative;
  z-index: 2;
  line-height: 1.2;
}
.card-front-category .cat-line1 {
  display: block;
  font-size: 15px;
  font-weight: 400;
  color: rgba(255,255,255,.9);
  font-style: italic;
}
.card-front-category .cat-line2 {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: #ffd54f;
  text-shadow: 0 2px 8px rgba(0,0,0,.25);
}

/* The question text */
#cardText {
  font-size: 15px;
  font-weight: 500;
  color: rgba(255,255,255,.95);
  line-height: 1.55;
  padding: 0 4px;
  position: relative;
  z-index: 2;
  text-align: center;
}

/* Highlighted words in question (yellow, like reference "three words") */
#cardText em {
  font-style: normal;
  color: #ffd54f;
  font-weight: 700;
}

#cardsLeft {
  font-size: 11px;
  color: rgba(255,255,255,.5);
  position: relative;
  z-index: 2;
}

/* Deck label pill — keep for deckLabel element fallback */
#deckLabel {
  display: none; /* handled by card-front-category now */
}

/* ── Card Back — rose-red with brand ─────── */
.card-back {
  transform: rotateY(180deg);
  background: linear-gradient(145deg, #ff6f91 0%, #ff4d6d 38%, #c9184a 68%, #a4133c 100%);
  position: relative;
  flex-direction: column;
  gap: 0;
}

/* Diagonal heart pattern */
.card-back::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 50% 40%, rgba(255,255,255,.14) 0%, transparent 55%),
    repeating-linear-gradient(
      -45deg,
      transparent 0px, transparent 18px,
      rgba(255,255,255,.05) 18px, rgba(255,255,255,.05) 19px
    );
  pointer-events: none;
}

/* Inner border frame */
.card-back::after {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 14px;
  border: 1.5px solid rgba(255,255,255,.28);
  pointer-events: none;
}

/* Logo centred on card back */
.card-back-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  opacity: .92;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,.3));
  position: relative;
  z-index: 2;
  margin-bottom: 8px;
}

.card-back-brand {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,.8);
  z-index: 2;
  position: relative;
}



.card-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

/* Save button */
#saveBtn {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  transition: transform var(--transition);
  padding: 0;
  line-height: 1;
}

#saveBtn:hover { transform: scale(1.2); }
#saveBtn.saved span { color: #8B0000 !important; }

/* Audio button */
.audio-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  opacity: .6;
  transition: opacity var(--transition), transform var(--transition);
  padding: 0;
}

.audio-btn:hover { opacity: 1; transform: scale(1.1); }

/* Skip button */
.skip-btn {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
/* On light-bg pages (direct load), use a visible dark style */
body.bg-soft .skip-btn {
  background: #f3f4f6;
  color: #6b7280;
  border-color: transparent;
}
.skip-btn:hover { opacity: 0.85; }
.skip-btn:disabled { opacity: .35; cursor: not-allowed; }

/* Pass overlay */
.pass-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
}

.pass-card {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 48px 36px;
  text-align: center;
  max-width: 380px;
  width: 90%;
  animation: slideUp .35s ease;
}

.pass-card h2 { font-size: 22px; color: #1a1a2e; margin-bottom: 10px; }
.pass-card p { color: #6b7280; margin-bottom: 28px; font-size: 15px; }
.pass-card .btn { width: 100%; }

/* Summary overlay */
.summary-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(8px);
  z-index: 600;
  display: none;
  align-items: center;
  justify-content: center;
}

.summary-card {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 48px 36px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  animation: slideUp .35s ease;
}

.summary-card h2 { font-size: 24px; color: #1a1a2e; margin-bottom: 20px; }
.summary-stat { font-size: 15px; color: #374151; margin-bottom: 10px; }
.summary-romantic-msg {
  font-size: 14px;
  font-style: italic;
  color: var(--rose-dark);
  line-height: 1.7;
  margin: 20px 0;
  padding: 16px;
  background: var(--rose-pale);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--rose);
}
.summary-card .btn { margin-top: 8px; width: 100%; }

/* ── Saved Cards Button ────────────────────────── */
.btn-saved-cards {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,.9);
  color: #000;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s, transform .15s, box-shadow .15s;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.btn-saved-cards:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
}

/* Saved cards drawer */
.saved-panel {
  position: fixed;
  top: 0; right: -100%;
  width: min(420px, 96vw);
  height: 100%;
  background: #ffffff;
  box-shadow: -24px 0 80px rgba(0,0,0,.18);
  z-index: 400;
  transition: right .38s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(0,0,0,.06);
}

.saved-panel.open { right: 0; }

/* Backdrop overlay */
.saved-panel-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 399;
  opacity: 0; pointer-events: none;
  transition: opacity .35s;
}
.saved-panel-backdrop.open { opacity: 1; pointer-events: all; }

.saved-panel-header {
  padding: 22px 22px 18px;
  border-bottom: 1px solid rgba(0,0,0,.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #fff5f7 0%, #fff 100%);
  flex-shrink: 0;
}

.saved-panel-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a2e;
  letter-spacing: -.2px;
}

.saved-close {
  cursor: pointer;
  font-size: 18px;
  color: #6b7280;
  background: rgba(0,0,0,.06);
  border: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
  padding: 0;
}
.saved-close:hover { background: rgba(201,24,74,.12); color: #c9184a; }

.saved-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.saved-list::-webkit-scrollbar { width: 4px; }
.saved-list::-webkit-scrollbar-track { background: transparent; }
.saved-list::-webkit-scrollbar-thumb { background: rgba(201,24,74,.2); border-radius: 4px; }

.saved-item {
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px 13px;
  font-size: 14px;
  line-height: 1.5;
  position: relative;
  border: 1.5px solid rgba(224,122,122,.18);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  box-shadow: 0 2px 8px rgba(201,24,74,.06);
}
.saved-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201,24,74,.12);
  border-color: rgba(201,24,74,.35);
}

.saved-item .deck-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #c9184a;
  background: rgba(201,24,74,.08);
  border-radius: 999px;
  padding: 2px 8px;
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 9px;
}

.saved-item .saved-card-text {
  font-size: 14.5px;
  color: #1a1a2e;
  line-height: 1.65;
  font-weight: 500;
}

/* ── Dark mode: saved panel inside app.html (body.bg-app) ── */
body.bg-app .saved-panel {
  background: #151528;
  border-left: 1px solid rgba(255,255,255,.08);
  box-shadow: -24px 0 80px rgba(0,0,0,.55);
}
body.bg-app .saved-panel-header {
  background: linear-gradient(135deg, #1c1030 0%, #151528 100%);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
body.bg-app .saved-panel-header h3 { color: #fff; }
body.bg-app .saved-close { background: rgba(255,255,255,.08); color: rgba(255,255,255,.6); }
body.bg-app .saved-close:hover { background: rgba(201,24,74,.25); color: #ff6b8a; }
body.bg-app .saved-list::-webkit-scrollbar-thumb { background: rgba(255,100,130,.3); }
body.bg-app .saved-item {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.1);
  box-shadow: none;
}
body.bg-app .saved-item:hover {
  background: rgba(255,255,255,.09);
  border-color: rgba(255,100,130,.4);
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
}
body.bg-app .saved-item .deck-tag {
  background: rgba(255,100,130,.15);
  color: #ff8aa8;
}
body.bg-app .saved-item .saved-card-text { color: rgba(255,255,255,.9); }

/* ── Dark mode: saved cards trigger button ── */
body.bg-app .btn-saved-cards {
  border-color: rgba(255,100,130,.35);
  background: rgba(255,100,130,.1);
  color: #ff8aa8;
}
body.bg-app .btn-saved-cards:hover {
  background: rgba(255,100,130,.2);
  border-color: rgba(255,100,130,.6);
}

/* ── Leaderboard ───────────────────────────────── */
.leaderboard-page { flex: 1; display: flex; justify-content: center; align-items: flex-start; padding: 48px 20px; }
.lb-inner { max-width: 800px; width: 100%; }
.lb-inner header { text-align: center; margin-bottom: 32px; }
.lb-inner header h1 { font-size: 34px; font-weight: 700; }
.lb-inner header p { opacity: .9; font-size: 15px; }

.lb-tabs {
  display: flex;
  background: rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 4px;
  width: fit-content;
  margin: 0 auto 28px;
  gap: 4px;
}

.lb-tab {
  padding: 9px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  background: transparent;
  color: rgba(255,255,255,.75);
  transition: all var(--transition);
}

.lb-tab.active { background: #fff; color: var(--rose-dark); box-shadow: var(--shadow-sm); }

.table-head {
  display: flex;
  padding: 12px 22px;
  font-weight: 700;
  font-size: 13px;
  opacity: .8;
  border-bottom: 1px solid rgba(255,255,255,.3);
  margin-bottom: 10px;
  letter-spacing: .3px;
}

.table-head .col-rank  { flex: 0 0 80px; }
.table-head .col-names { flex: 1; text-align: center; }
.table-head .col-score { flex: 0 0 100px; text-align: right; }

.leaderboard-row {
  display: flex;
  align-items: center;
  padding: 16px 22px;
  margin-bottom: 10px;
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, rgba(255,255,255,.3), rgba(255,255,255,.14));
  backdrop-filter: blur(12px);
  transition: transform var(--transition);
}

.leaderboard-row:hover { transform: translateX(4px); }
.leaderboard-row.highlight { border: 2px solid rgba(255,255,255,.6); }

.rank { flex: 0 0 80px; font-weight: 700; font-size: 15px; }
.names { flex: 1; text-align: center; font-weight: 600; font-size: 14px; }
.score { flex: 0 0 100px; text-align: right; font-weight: 700; font-size: 15px; }

/* skeleton */
.leaderboard-row.skeleton { pointer-events: none; }
.shimmer {
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,.2) 25%, rgba(255,255,255,.4) 50%, rgba(255,255,255,.2) 75%);
  background-size: 400% 100%;
  animation: shimmerAnim 1.2s ease-in-out infinite;
  height: 18px;
}

.rank.shimmer { width: 40px; }
.names.shimmer { height: 18px; }
.score.shimmer { width: 60px; }

.my-rank-section { margin-top: 32px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.3); }
.my-rank-section h3 { font-size: 15px; font-weight: 700; margin-bottom: 12px; opacity: .9; }

/* ── Tonight & simple feature pages ───────────── */
.feature-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.feature-page h1 { font-size: 26px; color: var(--ink); margin-bottom: 6px; }
.feature-page > p { color: var(--muted); margin-bottom: 24px; }

.prompt-card {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 24px;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prompt-text {
  font-size: 20px;
  line-height: 1.65;
  color: var(--ink);
  text-align: center;
  font-weight: 500;
}

/* ── Roulette ──────────────────────────────────── */
.roulette-page {
  min-height: 100vh;
  min-height: 100dvh; /* iOS 16+: dynamic viewport excludes browser chrome */
  background: radial-gradient(circle at top, #1a1a2e, #0d0d0d);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.roulette-app { max-width: 480px; width: 100%; }

.wheel-container {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto;
}

.wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(
    #ff4d6d 0deg 72deg,
    #ff8fa3 72deg 144deg,
    #ffd166 144deg 216deg,
    #06d6a0 216deg 288deg,
    #118ab2 288deg 360deg
  );
  box-shadow: inset 0 0 40px rgba(0,0,0,.5), 0 20px 60px rgba(0,0,0,.7);
  border: 6px solid rgba(255,255,255,.08);
  transition: transform 3s cubic-bezier(.17,.67,.83,.67);
  position: relative;
}

.wheel::before {
  content: "";
  position: absolute;
  width: 60px; height: 60px;
  background: radial-gradient(circle, #fff 0%, #ccc 100%);
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  box-shadow: inset 0 4px 10px rgba(0,0,0,.3), 0 4px 12px rgba(0,0,0,.5);
  z-index: 2;
}

.wheel-arrow {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-bottom: 22px solid #fff;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.5));
  z-index: 5;
}

.roulette-result {
  background: linear-gradient(145deg, #1f1f3a, #141428);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  margin-top: 24px;
  border: 1px solid rgba(255,255,255,.08);
  text-align: center;
  display: none;
}

.roulette-result.show { display: block; animation: slideUp .3s ease; }
.result-category { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; opacity: .6; margin-bottom: 10px; }
.result-text { font-size: 18px; line-height: 1.6; font-weight: 500; }

/* ── Pricing ───────────────────────────────────── */
.pricing-page { max-width: 1100px; margin: 0 auto; padding: 40px 20px 60px; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; margin-top: 36px; }
.pricing-card {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  box-shadow: var(--shadow-md);
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1.5px solid #f1f1f1;
}
.pricing-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.pricing-card.fade-out { opacity: 0; transform: translateY(20px) scale(.96); pointer-events: none; transition: all .35s ease; }
.pricing-title { font-size: 20px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.pricing-price { font-size: 34px; font-weight: 800; color: var(--ink); margin: 14px 0; }
.original-price { text-decoration: line-through; color: var(--muted); font-size: 18px; margin-right: 8px; }
.diff-box { background: linear-gradient(135deg, #fff7ed, #ffe4d6); border: 1px solid #ffd2bd; color: #c2410c; font-weight: 600; padding: 5px 10px; border-radius: var(--radius-sm); font-size: 13px; display: inline-block; margin-top: 5px; }
.savings-badge { background: linear-gradient(135deg, #ecfdf5, #d1fae5); border: 1px solid #a7f3d0; color: #065f46; font-weight: 700; padding: 5px 10px; border-radius: var(--radius-sm); font-size: 12px; display: inline-block; margin-top: 6px; }
.popular-badge { position: absolute; top: 14px; right: 14px; background: linear-gradient(135deg, #ff7a9c, #ff9ab3); color: #fff; padding: 5px 12px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.pricing-features { list-style: none; margin: 16px 0 22px; color: var(--muted); font-size: 14px; }
.pricing-features li { padding: 6px 0; padding-left: 18px; position: relative; }
.pricing-features li::before { content: "✓"; position: absolute; left: 0; color: var(--rose); font-weight: 700; }

/* ── Utility ───────────────────────────────────── */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }

/* ── Animations ────────────────────────────────── */
@keyframes heartbeat { 0%,100%{transform:translateX(-50%) scale(1)} 50%{transform:translateX(-50%) scale(1.15)} }
@keyframes slideUp { from{opacity:0;transform:translateY(22px)} to{opacity:1;transform:translateY(0)} }
@keyframes shimmerAnim { 0%{background-position:100% 50%} 100%{background-position:0% 50%} }
@keyframes spin { to{transform:rotate(360deg)} }

.spinning { animation: spin .8s linear infinite; }
.fade-in { animation: slideUp .4s ease; }

/* ── Floating hearts (dashboard) ──────────────── */
@keyframes floatHeart {
  0%   { transform: translateY(0) scale(1); opacity: .8; }
  100% { transform: translateY(-110vh) scale(1.5); opacity: 0; }
}

/* ── Chat widget ───────────────────────────────── */
@keyframes chatPopIn { from{opacity:0;transform:scale(.8)} to{opacity:1;transform:scale(1)} }
@keyframes chatPulse { 0%{box-shadow:0 0 0 0 rgba(224,122,122,.6)} 70%{box-shadow:0 0 0 10px transparent} 100%{box-shadow:0 0 0 0 transparent} }
@keyframes heartRise { 0%{opacity:0;transform:translateY(0) scale(.5)} 20%{opacity:1} 60%{opacity:1;transform:translateY(-70px) scale(1.2)} 100%{opacity:0;transform:translateY(-160px) scale(1.8)} }

/* ── Page fade transition ──────────────────────── */
body { animation: fadeIn .25s ease; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
body.fade-out { opacity: 0; transition: opacity .25s ease; }

/* ── Mobile ────────────────────────────────────── */
@media (max-width: 768px) {
  .top-nav { padding: 14px 16px; flex-wrap: wrap; gap: 10px; }
  .nav-links { gap: 16px; flex-wrap: wrap; }
  .nav-links a { font-size: 13px; }

  .couple-compact { grid-template-columns: 1fr; }
  .couple-hero h1 { font-size: 26px; }

  .feature-grid { grid-template-columns: 1fr; gap: 14px; }

  .dashboard-wrap { padding: 28px 12px 40px; }

  .lb-inner header h1 { font-size: 26px; }
  .lb-tab { padding: 8px 16px; font-size: 13px; }

  .auth-box { padding: 32px 24px; }

  .entry-section { padding: 24px 18px; }

  .pricing-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════
   INVITE POPUP (in-house, no browser confirm())
   ═══════════════════════════════════════════════════════════ */
.invite-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,10,20,.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.invite-popup-overlay.visible {
  opacity: 1;
  pointer-events: all;
}
.invite-popup {
  background: #fff;
  border-radius: 28px;
  padding: 40px 32px 32px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 40px 100px rgba(0,0,0,.25);
  transform: scale(.88) translateY(20px);
  transition: transform .35s cubic-bezier(.175,.885,.32,1.275);
}
.invite-popup-overlay.visible .invite-popup {
  transform: scale(1) translateY(0);
}
.invite-popup .popup-icon { font-size: 52px; margin-bottom: 14px; }
.invite-popup h2 { font-size: 22px; font-weight: 800; color: #1a1a2e; margin-bottom: 10px; }
.invite-popup p  { font-size: 15px; color: #6b7280; margin-bottom: 28px; line-height: 1.55; }
.invite-popup-actions { display: flex; gap: 12px; }
.invite-popup-actions .btn { flex: 1; padding: 14px; font-size: 15px; font-weight: 700; }
.btn-accept {
  background: linear-gradient(135deg, #E07A7A, #c9184a);
  color: #fff;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  touch-action: manipulation;
}
.btn-decline {
  background: #f3f4f6;
  color: #6b7280;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  touch-action: manipulation;
}
.btn-accept:active { transform: scale(.97); }
.btn-decline:active { transform: scale(.97); }

/* Pulse ring around popup */
.invite-popup-overlay.visible::before {
  content: '';
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  border: 2px solid rgba(224,122,122,.4);
  animation: inviteRing 2s ease-in-out infinite;
}
@keyframes inviteRing {
  0%   { transform: scale(.7); opacity: 0; }
  50%  { opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════
   MOBILE BOTTOM NAV (replaces top nav links on mobile)
   ═══════════════════════════════════════════════════════════ */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 64px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(224,122,122,.15);
  z-index: 9000;
  box-shadow: 0 -4px 24px rgba(0,0,0,.08);
}
.mobile-nav-inner {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-around;
}
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  color: #9ca3af;
  font-size: 9px;
  font-weight: 600;
  padding: 6px 6px;
  border-radius: 10px;
  transition: color .2s, transform .2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-width: 46px;
  flex: 1;
}
.mobile-nav-item .nav-icon { font-size: 22px; line-height: 1; }
.mobile-nav-item.active { color: #E07A7A; }
.mobile-nav-item:active { transform: scale(.88); }
.mobile-nav-item.active .nav-icon { filter: drop-shadow(0 2px 6px rgba(224,122,122,.5)); }

@media (max-width: 768px) {
  .mobile-nav { display: block; }
  .top-nav .nav-links { display: none; }
  .top-nav {
    padding: 12px 16px;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
  }
}

/* ═══════════════════════════════════════════════════════════
   COMPREHENSIVE MOBILE OVERHAUL
   ═══════════════════════════════════════════════════════════ */
/* Touch-friendly tap targets everywhere */
button, a, [onclick], .mood-pill, .deck-circle-wrap, .card-link {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button { min-height: 44px; }

/* Prevent double-tap zoom on buttons */
button, a { touch-action: manipulation; }

@media (max-width: 768px) {
  /* Top nav */
  .top-nav {
    padding: 12px 16px;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
  }
  .brand { font-size: 15px; }
  .brand img { width: 28px; height: 28px; }
  .btn-logout { font-size: 12px; padding: 7px 14px; }

  /* Dashboard */
  .dashboard-wrap { padding: 20px 14px 80px; }
  .couple-hero h1 { font-size: 24px; }
  .couple-hero p  { font-size: 14px; }
  .avatar-ring { width: 68px; height: 68px; }
  .heart-badge { font-size: 20px; }

  /* Feature grid - 2 col on mobile */
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .feature-card {
    padding: 18px 14px 16px;
  }
  .feature-card .icon { font-size: 24px; margin-bottom: 8px; }
  .feature-card h3 { font-size: 14px; margin-bottom: 6px; }
  .feature-card p  { font-size: 12px; margin-bottom: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .feature-card .card-link { font-size: 12px; padding: 8px 16px; }
  .feature-card:hover { transform: none; } /* disable hover animation on touch */

  /* Cards page */
  .cards-page { padding: 0 12px 80px; }
  .page-topbar { margin-bottom: 12px; }
  .entry-section { padding: 0 0 18px; }
  .entry-section-header { padding: 22px 18px 20px; }
  .entry-section-body { padding: 0 16px; }
  .entry-title { font-size: 18px; }
  .entry-subtitle { font-size: 13px; }
  .mood-pills { gap: 8px; flex-wrap: wrap; }
  .mood-pill { padding: 8px 16px; font-size: 13px; }

  /* Deck bands - mobile */
  .deck-band { padding: 12px 13px; gap: 12px; }
  .deck-band-emoji { font-size: 24px; width: 30px; }
  .deck-band-name { font-size: 14px; }
  .deck-band-teaser { font-size: 12px; }
  .deck-band.selected .deck-band-teaser { white-space: normal; }
  .deck-selection-count { font-size: 13px; }

  /* Card actions - bigger touch targets */
  .card-actions { gap: 10px; flex-wrap: wrap; justify-content: center; }
  .card-actions button { min-height: 48px; min-width: 48px; }

  /* Couple section */
  .couple-compact { grid-template-columns: 1fr; gap: 12px; }
  .connect-card { padding: 18px 16px; }
  .connect-card h3 { font-size: 16px; }

  /* Auth */
  .auth-box { padding: 28px 20px; margin: 0 8px; }
  .auth-tabs { gap: 0; }
  .auth-tab { font-size: 14px; padding: 12px 20px; }

  /* Profile */
  .entry-section input, .entry-section select, .entry-section textarea {
    font-size: 16px; /* prevent iOS zoom */
    min-height: 48px;
  }

  /* Leaderboard */
  .lb-inner { padding: 20px 14px 80px; }
  .lb-inner header h1 { font-size: 22px; }
  .lb-row { padding: 12px 14px; gap: 10px; }

  /* Pricing */
  .pricing-grid { grid-template-columns: 1fr; gap: 14px; padding: 0 14px 80px; }
  .pricing-card { padding: 24px 20px; }

  /* Pass overlay */
  .pass-card { padding: 32px 24px; margin: 0 16px; }
  .pass-card h2 { font-size: 20px; }

  /* Summary overlay */
  .summary-card { padding: 32px 24px; margin: 0 16px; }

  /* Saved panel */
  .saved-panel { width: 100%; border-radius: 24px 24px 0 0; bottom: 0; top: auto; }

  /* Chat widget mobile */
  #cs-window {
    position: fixed !important;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-height: calc(100dvh - 80px - env(safe-area-inset-bottom, 0px)) !important;
    height: 70svh !important;
    border-radius: 24px 24px 0 0 !important;
  }
  #cs-bubble {
    bottom: 76px !important;
  }

  /* Roulette canvas */
  #rouletteCanvas { max-width: 100%; height: auto !important; }

  /* Tonight page */
  .tonight-card { margin: 0 12px; }

  /* Fix-it, Date, Occasion pages */
  .tool-wrap { padding: 16px 14px 80px; }
}

/* Extra small (iPhone SE) */
@media (max-width: 375px) {
  .feature-grid { gap: 10px; }
  .feature-card { padding: 14px 10px 14px; }
  .feature-card h3 { font-size: 13px; }
  .feature-card .card-link { padding: 7px 12px; font-size: 11px; }
}

/* ═══════════════════════════════════════════════════════════
   STREAK WIDGET
   ═══════════════════════════════════════════════════════════ */
.streak-bar {
  background: linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.1));
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 18px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.streak-fire { font-size: 36px; flex-shrink: 0; animation: heartbeat 2s ease-in-out infinite; }
.streak-info h3 { font-size: 16px; font-weight: 800; color: #fff; margin: 0 0 3px; }
.streak-info p  { font-size: 13px; color: rgba(255,255,255,.8); margin: 0; }
.streak-count {
  margin-left: auto;
  font-size: 32px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 12px rgba(224,122,122,.7);
}

/* ═══════════════════════════════════════════════════════════
   MOOD CHECK-IN WIDGET
   ═══════════════════════════════════════════════════════════ */
.mood-checkin {
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 18px;
  padding: 20px 22px;
  margin-bottom: 24px;
}
.mood-checkin h3 { font-size: 15px; font-weight: 700; color: #fff; margin: 0 0 14px; }
.mood-emoji-row {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: space-between;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 0 4px;
}
.mood-emoji-row::-webkit-scrollbar { display: none; }
.mood-emoji-btn {
  background: rgba(255,255,255,.15);
  border: 1.5px solid transparent;
  border-radius: 14px;
  padding: 8px 10px 6px;
  cursor: pointer;
  transition: all .2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex: 1;
  min-width: 52px;
  max-width: 70px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.mood-bird-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
/* Label under each bird */
.mood-emoji-btn > span:last-child {
  font-size: 10px;
  color: rgba(255,255,255,.8);
  font-weight: 700;
  letter-spacing: .2px;
  white-space: nowrap;
}
.mood-emoji-btn:hover,
.mood-emoji-btn.selected {
  background: rgba(255,255,255,.3);
  border-color: rgba(255,255,255,.5);
  transform: scale(1.06);
}
.mood-emoji-btn.selected .mood-bird-wrap { filter: drop-shadow(0 2px 8px rgba(255,255,255,.4)); }
.mood-emoji-btn:active { transform: scale(.92); }
.mood-emoji-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
/* Status row after selection */
.mood-status {
  font-size: 13px;
  color: rgba(255,255,255,.75);
  margin-top: 10px;
  min-height: 20px;
}
.mood-status--selected {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #fff;
}
.mood-status--selected .mood-bird-wrap {
  width: 28px;
  height: 28px;
}

/* ═══════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: min(360px, calc(100vw - 32px));
}
.toast {
  background: #1a1a2e;
  color: #fff;
  padding: 14px 20px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn .35s cubic-bezier(.175,.885,.32,1.275) forwards;
  pointer-events: all;
}
.toast.success { border-left: 4px solid #10b981; }
.toast.error   { border-left: 4px solid #ef4444; }
.toast.info    { border-left: 4px solid #E07A7A; }
.toast.out     { animation: toastOut .3s ease forwards; }
@keyframes toastIn  { from { opacity:0; transform:translateY(-12px) scale(.9); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes toastOut { to   { opacity:0; transform:translateY(-8px) scale(.95); } }

/* ═══════════════════════════════════════════════════════════
   SAFE AREA (iPhone notch / home bar support)
   ═══════════════════════════════════════════════════════════ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .mobile-nav { padding-bottom: env(safe-area-inset-bottom); height: calc(64px + env(safe-area-inset-bottom)); }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}


/* ── Partner mood display ─────────────────────────────────── */
.mood-section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: rgba(255,255,255,.6);
  margin-bottom: 10px;
}

.partner-mood-row {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.partner-mood-label {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,.85);
  white-space: nowrap;
}
.partner-mood-display {
  display: flex;
  align-items: center;
  gap: 8px;
}
.partner-mood-emoji {
  font-size: 28px;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.2));
}
.partner-mood-display .mood-bird-wrap {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.2));
}
.partner-mood-text {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.partner-mood-waiting {
  font-size: 13px;
  color: rgba(255,255,255,.55);
  font-style: italic;
}


/* ── Coming Soon / Locked feature cards ──────────────────────── */
.feature-card--locked {
  opacity: .65;
  pointer-events: none;
  position: relative;
  filter: grayscale(30%);
}
.feature-card--locked::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(10,10,20,.35);
  pointer-events: none;
}
.coming-soon-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #7209b7, #3a0ca3);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  z-index: 2;
  pointer-events: none;
}
.card-link--locked {
  display: inline-block;
  background: rgba(255,255,255,.08) !important;
  color: rgba(255,255,255,.4) !important;
  border: 1px solid rgba(255,255,255,.1);
  cursor: not-allowed;
  font-size: 13px;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════
   Love Letters Widget
   ═══════════════════════════════════════════════ */

.ll-widget {
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.ll-header { text-align: center; margin-bottom: 18px; }
.ll-header .ll-icon { font-size: 32px; display: block; margin-bottom: 6px; }
.ll-header h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.ll-header p { font-size: 13px; opacity: .7; }

.ll-textarea {
  width: 100%;
  background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.2);
  border-radius: 14px;
  padding: 14px;
  color: #fff;
  font-size: 16px; /* 16px prevents iOS auto-zoom on focus */
  font-family: inherit;
  resize: vertical;
  min-height: 90px;
  outline: none;
  transition: border-color .2s;
}
.ll-textarea::placeholder { color: rgba(255,255,255,.4); }
.ll-textarea:focus { border-color: rgba(255,255,255,.5); }

.ll-write-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}
.ll-charcount { font-size: 11px; opacity: .5; }

.ll-send-btn {
  background: linear-gradient(135deg, #ff6b9d, #c9184a);
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s;
  touch-action: manipulation;
}
.ll-send-btn:hover { transform: scale(1.04); box-shadow: 0 8px 24px rgba(201,24,74,.4); }
.ll-send-btn:active { transform: scale(.96); }
.ll-send-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.ll-lane-btn {
  display: block;
  width: 100%;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.8);
  padding: 11px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 14px;
  transition: background .2s;
  touch-action: manipulation;
}
.ll-lane-btn:hover { background: rgba(255,255,255,.14); }

/* Unread envelope */
.ll-unread { margin-bottom: 16px; }

.ll-envelope {
  background: linear-gradient(135deg, rgba(255,182,193,.25), rgba(255,105,135,.15));
  border: 1.5px solid rgba(255,182,193,.4);
  border-radius: 18px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  animation: llPulse 2s ease-in-out infinite;
  margin-bottom: 10px;
}
.ll-envelope:hover { transform: scale(1.02); }
.ll-envelope:active { transform: scale(.97); }
.ll-envelope-icon { font-size: 36px; margin-bottom: 6px; animation: llWobble 1.5s ease-in-out infinite; }
.ll-envelope-text { font-size: 15px; font-weight: 700; }
.ll-envelope-hint { font-size: 11px; opacity: .6; margin-top: 4px; }

@keyframes llPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,182,193,.4); }
  50% { box-shadow: 0 0 0 10px rgba(255,182,193,0); }
}
@keyframes llWobble {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-6deg); }
  75% { transform: rotate(6deg); }
}

/* Letter reveal */
.ll-reveal {
  position: relative;
  overflow: hidden;
  animation: llRevealIn .6s ease;
}
@keyframes llRevealIn {
  from { opacity: 0; transform: scale(.85) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.ll-reveal-paper {
  background: linear-gradient(170deg, #fff9f0, #fff5f7, #fff0f5);
  border-radius: 18px;
  padding: 28px 22px;
  color: #3a2a2f;
  position: relative;
  box-shadow: 0 12px 40px rgba(0,0,0,.12);
}
.ll-reveal-seal {
  text-align: center;
  font-size: 28px;
  margin-bottom: 10px;
}
.ll-reveal-date {
  text-align: center;
  font-size: 11px;
  color: #b8a0a6;
  margin-bottom: 14px;
}
.ll-reveal-body {
  font-size: 15px;
  line-height: 1.75;
  color: #4a3040;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.ll-reveal-sign {
  text-align: right;
  font-style: italic;
  font-size: 13px;
  color: #c9184a;
  margin-top: 16px;
  opacity: .8;
}

.ll-float-heart {
  position: absolute;
  bottom: 0;
  font-size: 18px;
  pointer-events: none;
  animation: llHeartFloat 3s ease forwards;
  opacity: 0;
}
@keyframes llHeartFloat {
  0% { opacity: 0; transform: translateY(0) scale(.5); }
  15% { opacity: 1; }
  70% { opacity: .8; }
  100% { opacity: 0; transform: translateY(-180px) scale(1.1) rotate(15deg); }
}

/* Memory lane */
.ll-lane {
  margin-top: 14px;
  max-height: 400px;
  overflow-y: auto;
  border-radius: 14px;
}
.ll-loading, .ll-empty {
  text-align: center;
  padding: 28px;
  font-size: 14px;
  opacity: .6;
}
.ll-empty span { font-size: 28px; display: block; margin-bottom: 8px; }

.ll-memory {
  padding: 16px;
  border-radius: 16px;
  margin-bottom: 10px;
}
.ll-memory--sent {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
}
.ll-memory--received {
  background: linear-gradient(135deg, rgba(255,182,193,.15), rgba(255,105,135,.08));
  border: 1px solid rgba(255,182,193,.25);
}
.ll-memory-tag {
  font-size: 11px;
  font-weight: 700;
  opacity: .6;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.ll-memory-body {
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.ll-memory-date {
  font-size: 11px;
  opacity: .4;
  margin-top: 8px;
  text-align: right;
}

/* Sent animation */
.ll-sent-anim {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  pointer-events: none;
  animation: llSentFade 2.5s ease forwards;
}
.ll-sent-letter { font-size: 64px; animation: llSentFly 1.2s ease forwards; }
.ll-sent-text {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 4px 16px rgba(0,0,0,.3);
  opacity: 0;
  animation: llSentTextIn .6s ease .8s forwards;
}
@keyframes llSentFly {
  0% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.3) translateY(-40px) rotate(-10deg); }
  100% { transform: scale(.6) translateY(-120px) rotate(5deg); opacity: 0; }
}
@keyframes llSentTextIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes llSentFade {
  0%, 70% { opacity: 1; }
  100% { opacity: 0; }
}

.ll-no-partner {
  text-align: center;
  padding: 20px;
  opacity: .6;
}
.ll-no-partner span { font-size: 28px; display: block; margin-bottom: 8px; }
.ll-no-partner p { font-size: 13px; }

/* ═══════════════════════════════════════════════
   Sale Banner
   ═══════════════════════════════════════════════ */

.sale-banner {
  background: linear-gradient(135deg, #ff6b35, #c9184a, #7209b7);
  color: #fff;
  text-align: center;
  padding: 14px 20px;
  border-radius: 16px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  animation: salePulse 3s ease-in-out infinite;
}
.sale-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent);
  animation: saleShimmer 2.5s ease infinite;
}
@keyframes salePulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(201,24,74,.3); }
  50% { box-shadow: 0 4px 30px rgba(201,24,74,.5); }
}
@keyframes saleShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.sale-banner strong { font-size: 16px; display: block; }
.sale-banner span { font-size: 12px; opacity: .9; }

.price-original {
  text-decoration: line-through;
  opacity: .5;
  font-size: 18px;
  font-weight: 400;
  margin-right: 6px;
}
.price-sale-tag {
  display: inline-block;
  background: #ff6b35;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
  animation: saleTagBounce 1.5s ease-in-out infinite;
}
@keyframes saleTagBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}


/* ═══════════════════════════════════════════════════════════
   DASHBOARD BANNER SLIDER (Amazon-style horizontal)
   ═══════════════════════════════════════════════════════════ */
.dash-banner-section {
  margin: 24px 0;
  position: relative;
}
.dash-banner-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: rgba(255,255,255,.7);
  margin-bottom: 12px;
}
.dash-banner-track-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
}
.dash-banner-track {
  display: flex;
  gap: 0;
  transition: transform .5s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
.dash-banner-slide {
  flex: 0 0 100%;
  height: 170px;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, rgba(255,77,109,.35), rgba(201,24,74,.35));
  border: 1px solid rgba(255,255,255,.15);
  display: flex;
  align-items: center;
  justify-content: center;
}
@media(max-width:480px){ .dash-banner-slide { height: 140px; } }
.dash-banner-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 18px;
}
.dash-banner-slide .banner-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(0,0,0,.55) 40%, transparent 80%);
  border-radius: 18px;
  display: flex; flex-direction: column;
  justify-content: center; padding: 24px 28px;
}
.dash-banner-slide .banner-title {
  font-size: 20px; font-weight: 800;
  color: #fff; line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
}
@media(max-width:480px){ .dash-banner-slide .banner-title { font-size: 16px; } }
.dash-banner-slide .banner-sub {
  font-size: 13px; color: rgba(255,255,255,.85);
  margin-top: 6px;
}
.dash-banner-slide .banner-cta {
  display: inline-block; margin-top: 12px;
  background: #fff; color: #c9184a;
  padding: 8px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 700;
  text-decoration: none;
}
.dash-banner-dots {
  display: flex; justify-content: center; gap: 6px; margin-top: 10px;
}
.dash-banner-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,.3); cursor: pointer;
  transition: all .25s;
}
.dash-banner-dot.active { background: #fff; width: 20px; border-radius: 4px; }
.dash-banner-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,.45); border: none; color: #fff;
  width: 34px; height: 34px; border-radius: 50%;
  font-size: 15px; cursor: pointer; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
}
.dash-banner-arrow.prev { left: 10px; }
.dash-banner-arrow.next { right: 10px; }

/* ═══════════════════════════════════════════════════════════
   SHOP PAGE
   ═══════════════════════════════════════════════════════════ */
.shop-page { max-width: 1100px; margin: 0 auto; padding: 24px 16px 80px; }
.shop-topbar { display:flex; align-items:center; justify-content:space-between; margin-bottom:24px; flex-wrap:wrap; gap:10px; }
.shop-title { font-size: 26px; font-weight: 800; color:#fff; }
.cart-btn {
  position: relative; background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25); color:#fff;
  padding: 10px 18px; border-radius: 999px; font-size: 14px;
  font-weight: 700; cursor: pointer; display:flex; align-items:center; gap:8px;
}
.cart-badge {
  background: #ff4d6d; color:#fff; border-radius: 50%;
  width:20px; height:20px; font-size:11px; font-weight:700;
  display:flex; align-items:center; justify-content:center;
  position: absolute; top:-6px; right:-6px;
}
.shop-categories { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:20px; }
.shop-cat-pill {
  padding: 8px 18px; border-radius: 999px; font-size: 13px; font-weight: 600;
  border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.1);
  color:#fff; cursor:pointer; transition: all .2s;
}
.shop-cat-pill.active, .shop-cat-pill:hover {
  background: linear-gradient(135deg,#ff4d6d,#c9184a); border-color: transparent;
}
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
@media(max-width:480px){ .shop-grid { grid-template-columns: repeat(2, 1fr); gap:12px; } }
.shop-product-card {
  background: linear-gradient(155deg, rgba(255,255,255,.18), rgba(255,255,255,.08));
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 20px; overflow: hidden;
  cursor: pointer; transition: transform .25s, box-shadow .25s;
  text-decoration: none; color: inherit;
}
.shop-product-card:hover { transform: translateY(-6px); box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.shop-product-img {
  width: 100%;
  /* iOS 14 fallback: padding-top creates the 1:1 ratio before aspect-ratio was supported */
  padding-top: 100%;
  position: relative;
  height: 0;
  object-fit: cover; background: rgba(255,255,255,.1);
  display: flex; align-items:center; justify-content:center;
  font-size: 48px;
}
/* iOS 15+ / modern browsers: use native aspect-ratio and undo the padding hack */
@supports (aspect-ratio: 1) {
  .shop-product-img {
    aspect-ratio: 1;
    padding-top: 0;
    height: auto;
    position: static;
  }
}
.shop-product-img img { width:100%; height:100%; object-fit:cover; }
.shop-product-info { padding: 14px 14px 16px; }
.shop-product-name { font-size: 14px; font-weight: 700; color:#fff; margin-bottom:4px; line-height:1.3; }
.shop-product-price { font-size: 16px; font-weight: 800; color:#ff8fa3; }
.shop-product-price .original-price { font-size:12px; color:rgba(255,255,255,.45); text-decoration:line-through; margin-right:4px; }
.shop-add-btn {
  width: 100%; margin-top: 10px; padding: 9px;
  background: linear-gradient(135deg,#ff4d6d,#c9184a);
  border: none; border-radius: 12px; color:#fff;
  font-size: 13px; font-weight: 700; cursor:pointer;
}

/* ═══════════════════════════════════════════════════════════
   PRODUCT DETAIL PAGE
   ═══════════════════════════════════════════════════════════ */
.product-detail-page { max-width: 900px; margin: 0 auto; padding: 24px 16px 100px; }
.product-breadcrumb { font-size: 13px; color: rgba(255,255,255,.55); margin-bottom: 20px; }
.product-breadcrumb a { color: #ff8fa3; text-decoration: none; }
.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
@media(max-width:640px){ .product-layout { grid-template-columns: 1fr; gap: 16px; } }

.product-media-section {}

/* Desktop: square image filling the grid column */
.product-main-media {
  border-radius: 20px; overflow: hidden;
  position: relative;
  aspect-ratio: 1;
  background: rgba(255,255,255,.1);
  margin-bottom: 12px;
}

/* Mobile: fixed compact height, not full-width square */
@media(max-width:640px) {
  .product-main-media {
    aspect-ratio: unset;
    height: 300px;
    max-width: 100%;
    border-radius: 16px;
  }
}

/* Swipeable carousel */
.pcs-track { display:flex; width:100%; height:100%; position:absolute; top:0; left:0; will-change:transform; }
.pcs-slide { flex:0 0 100%; width:100%; height:100%; overflow:hidden; }
.pcs-slide img, .pcs-slide video { width:100%; height:100%; object-fit:cover; display:block; }
.pcs-dots { position:absolute; bottom:10px; left:0; right:0; display:flex; justify-content:center; gap:6px; z-index:2; }
.pcs-dot { width:6px; height:6px; border-radius:50%; background:rgba(255,255,255,.4); transition:background .2s,transform .2s; cursor:pointer; }
.pcs-dot.active { background:#fff; transform:scale(1.3); }

.product-main-media img, .product-main-media video {
  width: 100%; height: 100%; object-fit: cover;
}
.product-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.product-thumb {
  width: 68px; height: 68px; border-radius: 12px;
  overflow:hidden; cursor:pointer; border: 2px solid transparent;
  transition: border-color .2s; flex-shrink:0;
  background: rgba(255,255,255,.1);
  display:flex; align-items:center; justify-content:center;
}
.product-thumb.active { border-color: #ff4d6d; }
.product-thumb img, .product-thumb video { width:100%; height:100%; object-fit:cover; }
.product-thumb .thumb-video-icon {
  position: absolute; font-size: 20px;
}

.product-info-section {}
.product-detail-name { font-size: 22px; font-weight: 800; color:#fff; margin-bottom: 10px; }
@media(max-width:480px){ .product-detail-name { font-size: 18px; } }
.product-rating { display:flex; align-items:center; gap:8px; margin-bottom:12px; color: #fbbf24; font-size:14px; }
.product-detail-price { margin-bottom: 16px; }
.product-price-main { font-size: 28px; font-weight: 800; color:#fff; }
.product-price-original { font-size: 16px; color: rgba(255,255,255,.45); text-decoration:line-through; margin-right:8px; }
.product-price-discount { background: #22c55e; color:#fff; padding: 3px 10px; border-radius: 6px; font-size:13px; font-weight:700; }
.product-description { color: rgba(255,255,255,.75); font-size: 14px; line-height: 1.7; margin-bottom: 20px; }
.product-qty-row { display:flex; align-items:center; gap:16px; margin-bottom:20px; }
.qty-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25);
  color:#fff; font-size: 18px; cursor:pointer; display:flex; align-items:center; justify-content:center;
}
.qty-count { font-size: 18px; font-weight: 700; color:#fff; min-width:24px; text-align:center; }
.product-actions { display:flex; flex-direction:column; gap:12px; }
.btn-add-cart {
  padding: 14px; border-radius: 14px;
  background: rgba(255,77,109,.2); border: 1.5px solid #ff4d6d;
  color: #ff8fa3; font-size: 15px; font-weight: 700; cursor:pointer;
}
.btn-buy-now {
  padding: 14px; border-radius: 14px;
  background: linear-gradient(135deg,#ff4d6d,#c9184a);
  border: none; color:#fff; font-size: 15px; font-weight: 700; cursor:pointer;
}

/* ═══════════════════════════════════════════════════════════
   CART DRAWER
   ═══════════════════════════════════════════════════════════ */
.cart-drawer-overlay {
  position: fixed; inset:0; background:rgba(0,0,0,.55);
  z-index: 9000; opacity:0; pointer-events:none;
  transition: opacity .3s;
}
.cart-drawer-overlay.open { opacity:1; pointer-events:all; }
.cart-drawer {
  position: fixed; right:-100%; top:0;
  bottom: 0;
  width: min(420px, 100vw);
  background: linear-gradient(180deg, #1a0a12 0%, #0d0d18 100%);
  border-left: 1px solid rgba(255,255,255,.15);
  z-index: 9001; transition: right .35s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}
@media (max-width: 768px) {
  .cart-drawer {
    /* Sit above mobile nav bar on small screens */
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    padding-bottom: 0;
  }
}
.cart-drawer.open { right: 0; }
.cart-drawer-header {
  display:flex; align-items:center; justify-content:space-between;
  padding: 20px 20px 16px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.cart-drawer-title { font-size: 18px; font-weight: 800; color:#fff; }
.cart-close-btn {
  background: rgba(255,255,255,.1); border:none; color:#fff;
  width:34px; height:34px; border-radius:50%; font-size:18px;
  cursor:pointer; display:flex; align-items:center; justify-content:center;
}
.cart-items-list { flex:1; overflow-y:auto; padding: 16px 20px; display:flex; flex-direction:column; gap:14px; }
.cart-item {
  display:flex; gap:14px; align-items:flex-start;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px; padding: 12px;
}
.cart-item-img {
  width: 64px; height: 64px; border-radius: 10px;
  background: rgba(255,255,255,.1); flex-shrink:0;
  overflow:hidden; display:flex; align-items:center; justify-content:center; font-size:28px;
}
.cart-item-img img { width:100%; height:100%; object-fit:cover; }
.cart-item-info { flex:1; min-width:0; }
.cart-item-name { font-size: 13px; font-weight: 700; color:#fff; margin-bottom:4px; }
.cart-item-price { font-size: 14px; font-weight: 800; color:#ff8fa3; }
.cart-item-controls { display:flex; align-items:center; gap:10px; margin-top:8px; }
.cart-item-qty-btn { background:rgba(255,255,255,.15); border:none; color:#fff; width:28px; height:28px; border-radius:50%; font-size:14px; cursor:pointer; }
.cart-item-qty { font-size: 14px; font-weight: 700; color:#fff; }
.cart-item-remove { background:none; border:none; color:#ef4444; font-size:18px; cursor:pointer; margin-left:auto; }
.cart-empty { text-align:center; padding:60px 20px; color:rgba(255,255,255,.4); }
.cart-empty .cart-empty-icon { font-size:48px; margin-bottom:12px; }
.cart-footer {
  padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.1);
  background: rgba(0,0,0,.2);
}
.cart-total-row { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
.cart-total-label { font-size:14px; color:rgba(255,255,255,.7); }
.cart-total-amount { font-size:22px; font-weight:800; color:#fff; }
.cart-checkout-btn {
  width:100%; padding: 16px; border-radius:14px;
  background: linear-gradient(135deg,#ff4d6d,#c9184a);
  border:none; color:#fff; font-size:16px; font-weight:700; cursor:pointer;
}
.cart-checkout-btn:disabled { opacity:.5; cursor:not-allowed; }

/* ═══════════════════════════════════════════════════════════
   ADDRESS PAGE
   ═══════════════════════════════════════════════════════════ */
.address-page { max-width: 560px; margin: 0 auto; padding: 24px 16px 80px; }
.address-page h1 { font-size: 24px; font-weight: 800; color:#fff; margin-bottom: 6px; }
.address-page p { color: rgba(255,255,255,.6); font-size:14px; margin-bottom: 24px; }
.address-form { display:flex; flex-direction:column; gap:16px; }
.addr-field { display:flex; flex-direction:column; gap:6px; }
.addr-field label { font-size:13px; font-weight:700; color:rgba(255,255,255,.75); }
.addr-field input, .addr-field select, .addr-field textarea {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px; color:#fff; padding: 12px 14px;
  font-size: 16px; /* must be 16px — iOS Safari auto-zooms any input below 16px */
  outline:none; transition: border-color .2s;
}
.addr-field input:focus, .addr-field select:focus, .addr-field textarea:focus {
  border-color: #ff4d6d;
}
.addr-field select option { background: #1a0a12; color:#fff; }
.addr-row { display:grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media(max-width:480px){ .addr-row { grid-template-columns: 1fr; } }
.addr-saved-list { display:flex; flex-direction:column; gap:12px; margin-bottom:20px; }
.addr-saved-card {
  padding: 14px 16px;
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.15);
  border-radius: 14px; cursor:pointer; transition: border-color .2s;
}
.addr-saved-card.selected { border-color: #ff4d6d; background: rgba(255,77,109,.1); }
.addr-saved-card .addr-name { font-size: 14px; font-weight: 700; color:#fff; margin-bottom: 2px; }
.addr-saved-card .addr-detail { font-size: 13px; color: rgba(255,255,255,.6); line-height: 1.5; }
.addr-submit-btn {
  padding: 16px; border-radius: 14px;
  background: linear-gradient(135deg,#ff4d6d,#c9184a);
  border:none; color:#fff; font-size:16px; font-weight:700; cursor:pointer; margin-top:8px;
}
.addr-submit-btn:disabled { opacity:.5; }

/* ═══════════════════════════════════════════════════════════
   ORDER CONFIRMATION
   ═══════════════════════════════════════════════════════════ */
.order-confirm-page { max-width:560px; margin:0 auto; padding:24px 16px 80px; text-align:center; }
.order-confirm-icon { font-size:72px; margin:40px 0 20px; }
.order-confirm-title { font-size:24px; font-weight:800; color:#fff; margin-bottom:8px; }
.order-confirm-sub { color:rgba(255,255,255,.65); font-size:15px; line-height:1.6; margin-bottom:28px; }
.order-id-box {
  background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.2);
  border-radius:12px; padding:14px; font-size:13px; color:rgba(255,255,255,.7); margin-bottom:28px;
}
.order-id-box strong { color:#fff; }

/* Love letter notif variant */
.love-letter-notif { background: linear-gradient(135deg, #22c55e, #16a34a) !important; }

/* ── Product size selector ─────────────────────────────────────────── */
.size-btn {
  min-width: 44px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,.3);
  background: transparent;
  color: rgba(255,255,255,.7);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s ease;
}
.size-btn:hover {
  border-color: #ff4d6d;
  color: #fff;
}
.size-btn.active {
  background: linear-gradient(135deg, #ff4d6d, #c9184a);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(201,24,74,.35);
}

/* ═══════════════════════════════════════════════
   Question of the Day Widget
   ═══════════════════════════════════════════════ */

.qotd-widget {
  background: linear-gradient(145deg, rgba(255,255,255,.14), rgba(255,255,255,.07));
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 24px;
  padding: 24px 22px;
  margin: 16px 0;
  backdrop-filter: blur(14px);
}

.qotd-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.qotd-icon {
  font-size: 28px;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(255,255,255,.2), rgba(255,255,255,.1));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.2);
}

.qotd-header h3 { font-size: 16px; font-weight: 800; color: #fff; margin: 0; }
.qotd-date { font-size: 12px; color: rgba(255,255,255,.55); margin-top: 2px; }

.qotd-badge {
  margin-left: auto;
  background: linear-gradient(135deg, #ffd166, #f9a825);
  color: #5a3a00;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

.qotd-question {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  line-height: 1.55;
  text-align: center;
  padding: 16px 12px;
  background: rgba(255,255,255,.08);
  border-radius: 16px;
  margin-bottom: 18px;
  border: 1px solid rgba(255,255,255,.12);
  font-style: italic;
}

.qotd-textarea {
  width: 100%;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 14px;
  padding: 14px 16px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  outline: none;
  line-height: 1.6;
  transition: border-color .2s, background .2s;
}
.qotd-textarea::placeholder { color: rgba(255,255,255,.4); }
.qotd-textarea:focus { border-color: rgba(255,255,255,.45); background: rgba(255,255,255,.16); }

.qotd-input-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.qotd-charcount { font-size: 11px; color: rgba(255,255,255,.4); }

.qotd-submit-btn {
  background: linear-gradient(135deg, #ff4d6d, #c9184a);
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 6px 20px rgba(201,24,74,.35);
}
.qotd-submit-btn:hover  { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(201,24,74,.45); }
.qotd-submit-btn:active { transform: translateY(0); }
.qotd-submit-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.qotd-no-partner {
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,.55);
  margin-top: 12px;
}

/* Waiting state */
.qotd-waiting { display: flex; flex-direction: column; gap: 14px; }

.qotd-answered-mine {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 14px;
  padding: 14px 16px;
}

.qotd-wait-msg {
  text-align: center;
  padding: 16px;
  background: rgba(255,166,0,.1);
  border: 1px solid rgba(255,166,0,.2);
  border-radius: 14px;
}
.qotd-wait-icon { font-size: 28px; margin-bottom: 8px; }
.qotd-wait-msg p { font-size: 14px; color: rgba(255,255,255,.8); font-weight: 600; margin: 0; }
.qotd-wait-sub { font-size: 12px; color: rgba(255,255,255,.5); margin-top: 4px !important; font-weight: 400 !important; }

/* Reveal state */
.qotd-reveal { display: flex; flex-direction: column; gap: 10px; }

.qotd-answer-card {
  border-radius: 14px;
  padding: 14px 16px;
}
.qotd-answer-card.mine   { background: rgba(255,77,109,.15); border: 1px solid rgba(255,77,109,.25); }
.qotd-answer-card.theirs { background: rgba(96,165,250,.12); border: 1px solid rgba(96,165,250,.22); }

.qotd-answer-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: rgba(255,255,255,.55);
  margin-bottom: 6px;
}
.qotd-answer-text {
  font-size: 15px;
  color: #fff;
  font-weight: 500;
  line-height: 1.6;
}

.qotd-heart-divider {
  text-align: center;
  font-size: 20px;
  animation: heartbeat 2s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════
   Batch 2 — visual polish additions
   ═══════════════════════════════════════════════ */

/* QOTD reveal: blur-to-sharp animation */
@keyframes cs-answer-reveal {
  from { filter: blur(10px); opacity: 0; transform: translateY(10px); }
  to   { filter: blur(0);    opacity: 1; transform: none; }
}
.cs-answer-reveal {
  animation: cs-answer-reveal .5s cubic-bezier(.2,0,.6,1) both;
}
.cs-qotd-reveal-anim { overflow: hidden; }

/* Streak bar: animated flame sizing */
.streak-fire svg { display: block; }

/* Mood chart wrapper inside dark widget */
.mood-chart-wrap canvas { border-radius: 8px; }

/* Partner share button on invite code */
.cs-share-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: linear-gradient(135deg, #ff6f91, #c9184a);
  color: #fff; border: none; border-radius: 999px;
  padding: 10px 20px; font-weight: 700; font-size: 14px;
  cursor: pointer; margin-top: 10px;
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 6px 20px rgba(201,24,74,.3);
}
.cs-share-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(201,24,74,.4); }
.cs-share-btn:active { transform: scale(.96); }


/* ═══════════════════════════════════════════════════════════════════════
   DARK THEME — .bg-app standalone pages
   Matches the exact dark look of app.html (#0d0d18 base).
   All selectors scoped to .bg-app so landing/auth pages are unaffected.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Inputs & forms ──────────────────────────────────────────────────── */
.bg-app input[type="text"],
.bg-app input[type="email"],
.bg-app input[type="password"],
.bg-app input[type="number"],
.bg-app textarea {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.15);
  color: #fff;
}
/* select needs a SOLID background — rgba is transparent in the OS dropdown picker */
.bg-app select {
  background: #1e1e2e;
  border-color: rgba(255,255,255,.15);
  color: #fff;
}
.bg-app input::placeholder,
.bg-app textarea::placeholder { color: rgba(255,255,255,.35); }
.bg-app input:focus,
.bg-app textarea:focus,
.bg-app select:focus {
  border-color: rgba(201,24,74,.6);
  box-shadow: 0 0 0 3px rgba(201,24,74,.15);
}

/* ── Generic white card ──────────────────────────────────────────────── */
.bg-app .card {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.10);
  color: #fff;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}

/* ── Entry section (cards start screen, etc.) ────────────────────────── */
.bg-app .entry-section {
  background: rgba(30,10,20,.55);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.bg-app .entry-section-header {
  background: linear-gradient(135deg, #7b0828 0%, #c9184a 55%, #ff4d6d 100%);
}
.bg-app .entry-section-header::after {
  background: rgba(30,10,20,.55);
}
.bg-app .entry-section-body { /* unchanged — body items handle their own dark overrides */ }

/* ── Names box (cards player names) ─────────────────────────────────── */
.bg-app .names-box {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}

/* ── Auth page ───────────────────────────────────────────────────────── */
.bg-app .auth-tabs {
  background: rgba(255,255,255,.10);
}
.bg-app .auth-tab {
  color: rgba(255,255,255,.6);
}
.bg-app .auth-tab.active {
  background: rgba(255,255,255,.16);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
}

/* ── Mood pills (dark bg) ────────────────────────────────────────────── */
.bg-app .mood-pill[data-mood="close"]    { background: rgba(201,24,74,.18);  color: #ffb3c6; border-color: rgba(201,24,74,.35); }
.bg-app .mood-pill[data-mood="playful"]  { background: rgba(240,160,20,.15); color: #ffd080; border-color: rgba(240,160,20,.3); }
.bg-app .mood-pill[data-mood="distant"]  { background: rgba(26,96,176,.18);  color: #90c4ff; border-color: rgba(26,96,176,.35); }
.bg-app .mood-pill[data-mood="conflict"] { background: rgba(26,122,72,.18);  color: #80e0a8; border-color: rgba(26,122,72,.32); }
.bg-app .mood-pill[data-mood="close"].active    { background: linear-gradient(135deg,#a01038,#e03858); box-shadow:0 6px 18px rgba(160,16,56,.5); }
.bg-app .mood-pill[data-mood="playful"].active  { background: linear-gradient(135deg,#a06008,#d09020); box-shadow:0 6px 18px rgba(160,96,8,.45); }
.bg-app .mood-pill[data-mood="distant"].active  { background: linear-gradient(135deg,#0a3880,#1a68c0); box-shadow:0 6px 18px rgba(10,56,128,.5); }
.bg-app .mood-pill[data-mood="conflict"].active { background: linear-gradient(135deg,#0a5830,#189858); box-shadow:0 6px 18px rgba(10,88,48,.45); }

/* ── Deck circles ────────────────────────────────────────────────────── */
/* ── Deck bands (dark bg / app shell) */
.bg-app .deck-band {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.12);
}
.bg-app .deck-band::before {
  background: linear-gradient(180deg, #ff7a9c, #ff4d6d);
}
.bg-app .deck-band:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.22);
}
.bg-app .deck-band.selected {
  background: rgba(201,24,74,.2);
  border-color: rgba(255,109,145,.55);
}
.bg-app .deck-band-emoji-wrap {
  background: rgba(255,255,255,.12);
}
.bg-app .deck-band:hover .deck-band-emoji-wrap {
  background: rgba(255,122,156,.3);
}
.bg-app .deck-band.selected .deck-band-emoji-wrap {
  background: linear-gradient(135deg, rgba(255,122,156,.5), rgba(201,24,74,.6));
  box-shadow: 0 4px 14px rgba(201,24,74,.35);
}
.bg-app .deck-band-name { color: rgba(255,255,255,.92); }
.bg-app .deck-band.selected .deck-band-name { color: #ffd1dc; }
.bg-app .deck-band-teaser { color: rgba(255,255,255,.48); }
.bg-app .deck-band.selected .deck-band-teaser { color: rgba(255,209,220,.7); }
.bg-app .deck-band-check { border-color: rgba(255,255,255,.2); }
.bg-app .deck-band.selected .deck-band-check { background: #c9184a; border-color: #ff4d6d; box-shadow: 0 0 0 4px rgba(201,24,74,.25); }
.bg-app .deck-section-head h3 { color: rgba(255,255,255,.9); }
.bg-app .deck-selection-count { color: rgba(255,255,255,.5); }
.bg-app .deck-selection-count.has-selection { color: #ffd1dc; }
.bg-app .deck-selection-bar { border-top-color: rgba(255,255,255,.10); }

/* ── Plan / brand elements ───────────────────────────────────────────── */
.bg-app .plan-free {
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.6);
}
.bg-app .brand-text {
  color: #fff;
}

/* ── btn-soft on dark ────────────────────────────────────────────────── */
.bg-app .btn-soft {
  background: rgba(255,255,255,.14);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.bg-app .btn-soft:hover {
  background: rgba(255,255,255,.22);
}
.bg-app .btn-outline {
  color: #ff6b8a;
  border-color: #ff6b8a;
}
.bg-app .btn-outline:hover {
  background: rgba(255,107,138,.12);
}

/* ── Pass card & summary card (overlays on cards page) ───────────────── */
.bg-app .pass-card {
  background: #1a1a2e;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
}
.bg-app .pass-card h2 { color: #fff; }
.bg-app .pass-card p  { color: rgba(255,255,255,.6); }

.bg-app .summary-card {
  background: #1a1a2e;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
}
.bg-app .summary-card h2  { color: #fff; }
.bg-app .summary-stat     { color: rgba(255,255,255,.75); }
.bg-app .summary-romantic-msg {
  background: rgba(201,24,74,.15);
  border-left-color: #ff6b8a;
  color: #ff9ab3;
}

/* ── Invite popup ────────────────────────────────────────────────────── */
.bg-app .invite-popup {
  background: #1a1a2e;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 40px 100px rgba(0,0,0,.6);
}
.bg-app .invite-popup h2 { color: #fff; }
.bg-app .invite-popup p  { color: rgba(255,255,255,.6); }
.bg-app .btn-decline {
  background: rgba(255,255,255,.10);
  color: rgba(255,255,255,.7);
}

/* ── Leaderboard tab active ──────────────────────────────────────────── */
.bg-app .lb-tab.active {
  background: rgba(255,255,255,.16);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
}

/* ── Feature page (prompt-card) ──────────────────────────────────────── */
.bg-app .prompt-card {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 8px 40px rgba(0,0,0,.4);
}
.bg-app .prompt-text { color: #fff; }
.bg-app .feature-page h1 { color: #fff; }

/* ── Pricing cards ───────────────────────────────────────────────────── */
.bg-app .pricing-card {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.10);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.bg-app .pricing-card:hover {
  background: rgba(255,255,255,.10);
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.bg-app .pricing-title { color: #fff; }
.bg-app .pricing-price { color: #fff; }
.bg-app .diff-box {
  background: rgba(194,65,12,.2);
  border-color: rgba(194,65,12,.3);
  color: #fb923c;
}
.bg-app .savings-badge {
  background: rgba(6,95,70,.25);
  border-color: rgba(6,95,70,.3);
  color: #6ee7b7;
}

/* ── Saved panel (drawer) ────────────────────────────────────────────── */
.bg-app .saved-panel {
  background: #13131f;
  border-left-color: rgba(255,255,255,.08);
}
.bg-app .saved-panel-header {
  background: linear-gradient(135deg, #1f0a1a 0%, #1a1a2e 100%);
  border-bottom-color: rgba(255,255,255,.08);
}
.bg-app .saved-panel-header h3 { color: #fff; }
.bg-app .saved-close {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.6);
}
.bg-app .saved-close:hover {
  background: rgba(201,24,74,.25);
  color: #ff6b8a;
}
.bg-app .saved-item {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
}
.bg-app .saved-item:hover {
  background: rgba(255,255,255,.10);
}
.bg-app .saved-item .saved-card-text { color: rgba(255,255,255,.88); }
.bg-app .saved-item .deck-tag {
  background: rgba(201,24,74,.2);
  color: #ff9ab3;
}

/* ── Skip button on dark ─────────────────────────────────────────────── */
.bg-app .skip-btn {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.6);
  border-color: rgba(255,255,255,.12);
}

/* ── Top-nav on standalone dark pages ────────────────────────────────── */
.bg-app .top-nav {
  background: rgba(13,13,24,.85);
  border-bottom-color: rgba(255,255,255,.08);
}

/* ── Scrollbar on dark ───────────────────────────────────────────────── */
.bg-app ::-webkit-scrollbar-track { background: rgba(255,255,255,.04); }
.bg-app ::-webkit-scrollbar-thumb { background: rgba(201,24,74,.35); }
.bg-app ::-webkit-scrollbar-thumb:hover { background: rgba(201,24,74,.55); }

/* ═══════════════════════════════════════════════════════════════════════════
   REFERRAL SYSTEM STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Dashboard referral banner ──────────────────────────────────────────── */
.db-referral-banner {
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(120deg, #7b0828 0%, #c9184a 45%, #ff4d6d 100%);
  position: relative;
  transition: transform .2s cubic-bezier(.34,1.4,.64,1), box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 8px 28px rgba(201,24,74,.32);
}

.db-referral-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -55deg, transparent 0px, transparent 20px,
    rgba(255,255,255,.03) 20px, rgba(255,255,255,.03) 21px
  );
  pointer-events: none;
}

.db-referral-banner:hover  { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(201,24,74,.42); }
.db-referral-banner:active { transform: scale(.985); }

/* ── Inner layout: text left, wave+arrow right ───────────────────────────── */
.db-referral-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px 18px 20px;
  position: relative;
  z-index: 1;
}

.db-referral-left {
  flex: 1;
  min-width: 0;
}

.db-referral-right {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.db-referral-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 5px;
  line-height: 1.25;
  letter-spacing: -.2px;
}

.db-referral-sub {
  font-size: 12.5px;
  color: rgba(255,255,255,.82);
  line-height: 1.5;
}

.db-referral-sub strong { color: #fff; }

/* ── Wave SVG animation ──────────────────────────────────────────────────── */
.db-referral-wave-svg rect {
  animation: dbWaveBar 1.3s ease-in-out infinite;
  transform-origin: 50% 100%;
}
.db-referral-wave-svg rect:nth-child(1) { animation-delay: 0s; }
.db-referral-wave-svg rect:nth-child(2) { animation-delay: .13s; }
.db-referral-wave-svg rect:nth-child(3) { animation-delay: .26s; }
.db-referral-wave-svg rect:nth-child(4) { animation-delay: .39s; }
.db-referral-wave-svg rect:nth-child(5) { animation-delay: .26s; }
.db-referral-wave-svg rect:nth-child(6) { animation-delay: .13s; }

@keyframes dbWaveBar {
  0%,100% { transform: scaleY(.3); opacity: .55; }
  50%      { transform: scaleY(1);  opacity: 1;   }
}

/* ── Arrow ───────────────────────────────────────────────────────────────── */
.db-referral-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: 1.5px solid rgba(255,255,255,.32);
  color: #fff;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s, transform .18s;
}

.db-referral-banner:hover .db-referral-arrow {
  background: rgba(255,255,255,.3);
  transform: translateX(2px);
}
