/* ═══════════════════════════════════════════════
   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; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink-soft);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ── Page backgrounds ──────────────────────────── */
.bg-app {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,182,193,.5) 0%, transparent 38%),
    radial-gradient(circle at 80% 30%, rgba(255,240,245,.4) 0%, transparent 40%),
    linear-gradient(145deg, #ff6f91, #ff4d6d, #c9184a);
  color: #fff;
  display: flex;
  flex-direction: column;
}

.bg-soft {
  min-height: 100vh;
  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;
  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;
}

/* ── 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;
  display: flex;
  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;
}

.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; }

/* Partner avatar wrapper — needed to position online dot */
.partner-avatar-wrap {
  position: relative;
  display: inline-block;
  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;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-60px);
  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);
}

/* Couple-compact connect section */
.couple-compact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 700px;
  margin: 0 auto 36px;
}

.couple-compact .connect-card {
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  border: 1px solid rgba(255,255,255,.3);
}

.couple-compact h3 { font-size: 15px; margin-bottom: 6px; }
.couple-compact p { font-size: 13px; opacity: .85; margin-bottom: 12px; }

.invite-code-display {
  font-size: 15px;
  font-weight: 700;
  background: rgba(255,255,255,.2);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  margin-top: 8px;
  letter-spacing: .5px;
}

.join-status { font-size: 13px; margin-top: 8px; font-weight: 600; }

/* 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: 36px 28px 28px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.entry-title { font-size: 20px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.entry-subtitle { color: var(--muted); font-size: 14px; margin-bottom: 22px; }

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

.mood-pill {
  padding: 9px 18px;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--transition);
}

.mood-pill:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.mood-pill.active {
  background: linear-gradient(135deg, #ff7a9c, #ff9ab3);
  color: #fff;
  border-color: rgba(255,255,255,.3);
  box-shadow: 0 8px 22px rgba(255,122,156,.3);
}

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

.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; }

.deck-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}

.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; }

.all-decks-section { margin-top: 16px; }
.deck-row.compact .deck-circle { width: 48px; height: 48px; font-size: 18px; }

/* 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 flip container */
.card-stage {
  width: 340px;
  height: 220px;
  perspective: 1000px;
}

.playing-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform .7s 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: var(--radius-lg);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-front {
  background: linear-gradient(145deg, #fff, #fafafa);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.card-back {
  transform: rotateY(180deg);
  background: linear-gradient(145deg, var(--rose), #c9184a);
  overflow: hidden;
}

.card-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .15;
}

.card-back-logo {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  opacity: .4;
}

#deckLabel {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--rose);
}

#cardText {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.55;
}

#cardsLeft {
  font-size: 12px;
  color: var(--muted);
}

.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: #f3f4f6;
  color: var(--muted);
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.skip-btn:hover { background: #e5e7eb; }
.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: var(--ink); margin-bottom: 10px; }
.pass-card p { color: var(--muted); 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: var(--ink); margin-bottom: 20px; }
.summary-stat { font-size: 15px; color: var(--ink-soft); 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 drawer */
.saved-panel {
  position: fixed;
  top: 0; right: -100%;
  width: min(400px, 95vw);
  height: 100%;
  background: #fff;
  box-shadow: -20px 0 60px rgba(0,0,0,.15);
  z-index: 400;
  transition: right .35s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
}

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

.saved-panel-header {
  padding: 20px 22px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.saved-panel-header h3 { font-size: 17px; color: var(--ink); }
.saved-close { cursor: pointer; font-size: 20px; color: var(--muted); background: none; border: none; }

.saved-list { flex: 1; overflow-y: auto; padding: 16px; }

.saved-item {
  background: var(--rose-pale);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
  position: relative;
  border: 1px solid rgba(224,122,122,.15);
  transition: transform var(--transition), box-shadow var(--transition);
}

.saved-item:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(224,122,122,.15); }

.saved-item .deck-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--rose);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 7px;
}

.saved-item .saved-card-text {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.6;
  font-weight: 500;
}

/* ── 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;
  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; }

  .card-stage { width: 300px; height: 200px; }
  #cardText { font-size: 16px; }

  .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: 3px;
  text-decoration: none;
  color: #9ca3af;
  font-size: 10px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 12px;
  transition: color .2s, transform .2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-width: 56px;
}
.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; }
  body { padding-bottom: 72px; }
  .top-nav .nav-links { display: none; }
  .top-nav { padding: 12px 16px; }
}

/* ═══════════════════════════════════════════════════════════
   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; }
  .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: 20px 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 circles - horizontal scroll */
  .deck-row {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    gap: 14px;
    flex-wrap: nowrap;
  }
  .deck-circle-wrap { scroll-snap-align: start; flex-shrink: 0; }
  .deck-circle { width: 70px; height: 70px; font-size: 26px; }
  .deck-name { font-size: 11px; }

  /* Card stage - full width on mobile */
  .card-stage {
    width: 100%;
    max-width: 340px;
    height: 210px;
  }
  #cardText { font-size: 15px; }

  /* 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: 0 !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 75vh !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: 10px; flex-wrap: wrap; }
.mood-emoji-btn {
  background: rgba(255,255,255,.2);
  border: 1.5px solid transparent;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 20px;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 52px;
  touch-action: manipulation;
}
.mood-emoji-btn span { font-size: 11px; color: rgba(255,255,255,.85); font-weight: 600; }
.mood-emoji-btn:hover,
.mood-emoji-btn.selected { background: rgba(255,255,255,.35); border-color: rgba(255,255,255,.5); transform: scale(1.08); }
.mood-emoji-btn:active { transform: scale(.92); }
.mood-status { font-size: 13px; color: rgba(255,255,255,.75); margin-top: 10px; min-height: 20px; }

/* ═══════════════════════════════════════════════════════════
   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-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: 14px;
  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); }
}

