/* Candlelight Prototype Styles */

/* ===== APP START ANIMATION ===== */
.start-animation {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0a0705;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.start-animation.done {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.start-animation.gone {
  display: none;
}

.start-anim-candle {
  position: relative;
  width: 40px;
  height: 100px;
  margin-bottom: 24px;
}

.start-anim-wick {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 12px;
  background: #3a2a1a;
}

.start-anim-flame {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  width: 16px;
  height: 24px;
  background: radial-gradient(ellipse at center bottom, #fff 0%, #ffd966 25%, #f4a83a 55%, transparent 75%);
  border-radius: 50% 50% 35% 35%;
  opacity: 0;
}

.start-animation.lit .start-anim-flame {
  animation: flame-ignite 0.8s ease-out forwards;
}

@keyframes flame-ignite {
  0% {
    transform: translateX(-50%) scale(0);
    opacity: 0;
  }
  40% {
    transform: translateX(-50%) scale(0.6);
    opacity: 0.7;
  }
  70% {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }
  85% {
    transform: translateX(-50%) scale(1.15) translateY(-2px);
  }
  100% {
    transform: translateX(-50%) scale(1) translateY(0);
    opacity: 1;
  }
}

.start-anim-glow {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 168, 58, 0) 0%, rgba(244, 168, 58, 0) 100%);
  pointer-events: none;
}

.start-animation.lit .start-anim-glow {
  animation: glow-grow 1.5s ease-out forwards;
}

@keyframes glow-grow {
  0% {
    background: radial-gradient(circle, rgba(244, 168, 58, 0) 0%, transparent 100%);
  }
  40% {
    background: radial-gradient(circle, rgba(244, 168, 58, 0.15) 0%, transparent 70%);
  }
  100% {
    background: radial-gradient(circle, rgba(244, 168, 58, 0.3) 0%, rgba(244, 168, 58, 0.05) 50%, transparent 100%);
  }
}

.start-anim-flash {
  position: fixed;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}

.start-animation.flash .start-anim-flash {
  animation: flash-burst 0.5s ease-out forwards;
}

@keyframes flash-burst {
  0% { opacity: 0; }
  30% { opacity: 0.85; }
  100% { opacity: 0; }
}

.start-anim-logo {
  font-size: 28px;
  font-weight: 700;
  color: var(--flame-soft);
  letter-spacing: 1px;
  opacity: 0;
}

.start-animation.flash .start-anim-logo {
  animation: logo-appear 0.6s ease-out 0.2s forwards;
}

@keyframes logo-appear {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 0.9; transform: translateY(0); }
}


@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-dark: #0a0a0f;
  --bg-warm: #1a1510;
  --bg-card: #1e1a15;
  --flame: #f4a83a;
  --flame-glow: #e8862a;
  --flame-soft: #ffd28a;
  --wax: #f0ebe0;
  --wax-dark: #d4cec0;
  --text-primary: #f5f0e8;
  --text-secondary: #9a9285;
  --text-muted: #6b6358;
  --accent: #c97a3a;
  --accent-soft: #3a2e1e;
  --warm-glow: rgba(244, 168, 58, 0.15);
  --warm-glow-strong: rgba(244, 168, 58, 0.3);
  --divider: rgba(255, 255, 255, 0.06);
}

/* ===== DAY 7 — ANTICIPATION GLOW ===== */
/* When all 7 candles are lit, the UI shifts from discovery to anticipation. */
/* Everything glows a bit more — warmer, brighter, alive. */
.day7-glow .shard-glow {
  opacity: 0.8;
  filter: blur(24px);
}

.day7-glow .shard {
  filter: brightness(1.15) drop-shadow(0 0 6px rgba(255, 179, 71, 0.4));
  animation: shardSparkle 4s ease-in-out infinite;
}

@keyframes shardSparkle {
  0%, 100% { filter: brightness(1.15) drop-shadow(0 0 6px rgba(255, 179, 71, 0.4)); }
  50% { filter: brightness(1.2) drop-shadow(0 0 12px rgba(255, 210, 138, 0.6)); }
}

.day7-glow .home-candle.lit .home-flame {
  box-shadow:
    0 0 28px rgba(255,179,71,0.85),
    0 0 56px rgba(255,107,26,0.5),
    0 0 80px rgba(255,107,26,0.2);
}

.day7-glow .home-candle.lit .home-candle-body {
  filter: brightness(1.4);
}

.day7-glow .home-day-label {
  color: var(--flame-soft);
  text-shadow: 0 0 12px rgba(255, 210, 138, 0.4);
}

.day7-glow .home-all-lit {
  color: var(--flame-soft);
  text-shadow: 0 0 10px rgba(255, 210, 138, 0.3);
}

.day7-glow .puff-icon {
  filter: grayscale(0) opacity(0.9);
  text-shadow: 0 0 16px rgba(255, 179, 71, 0.5);
}

.day7-glow .glass-canvas {
  filter: brightness(1.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* Phone Frame - fills entire screen, no max-width constraint */
.phone-frame {
  width: 100%;
  margin: 0;
  height: 100vh;
  height: 100dvh;
  background: var(--bg-dark);
  position: relative;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  overflow: hidden;
}

/* Hide the fake in-app status bar - real one shows through */
.status-bar {
  display: none;
}

/* ===== HOME / STAINED GLASS ===== */
.glass-canvas {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: visible;
  background: transparent;
}

/* Shared shard styles */
.shard {
  position: absolute;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.3s ease;
  z-index: 1;
}

.shard:active { transform: scale(0.97); }

/* A single, slow highlight sweeps across each glass shard. It animates only
   transform and opacity, which stays cheap compared with moving filters. */
.shard::before {
  content: '';
  position: absolute;
  inset: -35% -60%;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(112deg, transparent 43%, rgba(255, 229, 181, 0.14) 49%, rgba(255, 255, 255, 0.22) 51%, rgba(255, 209, 139, 0.10) 54%, transparent 60%);
  transform: translate3d(-26%, 8%, 0) rotate(-8deg);
  animation: glass-glint 15s ease-in-out infinite;
  will-change: transform, opacity;
}

@keyframes glass-glint {
  0%, 63%, 100% { opacity: 0; transform: translate3d(-26%, 8%, 0) rotate(-8deg); }
  72% { opacity: 0.72; }
  86% { opacity: 0; transform: translate3d(26%, -8%, 0) rotate(-8deg); }
}

/* Feathered glow around shard edges - sibling elements behind shards */
.shard-glow {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  filter: blur(20px);
  opacity: 0.5;
  border-radius: 50%;
}

/* Chat shard - large center, broken glass rectangle-ish shape */
.shard-chat {
  top: -1%;
  left: 2%;
  width: 96%;
  height: 50%;
  clip-path: polygon(
    2% 0%,
    25% 3%,
    50% 0%,
    75% 2%,
    98% 0%,
    99% 18%,
    94% 35%,
    98% 52%,
    92% 66%,
    80% 72%,
    65% 70%,
    50% 74%,
    35% 70%,
    20% 75%,
    8% 70%,
    3% 54%,
    6% 36%,
    2% 18%,
    1% 6%
  );
  overflow: hidden;
}

/* Faux conversation preview as the base image, rotated */
.chat-base {
  position: absolute;
  inset: -20%;
  transform: rotate(-12deg);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 40px 30px;
  opacity: 0.5;
}

.chat-base-bubble {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-secondary);
}

.chat-base-bubble.left {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--divider);
  border-bottom-left-radius: 4px;
}

.chat-base-bubble.right {
  align-self: flex-end;
  background: var(--accent-soft);
  border: 1px solid rgba(201, 122, 58, 0.2);
  border-bottom-right-radius: 4px;
}

/* Stained glass overlay - blue glass texture over chat shard */
.chat-glass {
  position: absolute;
  inset: 0;
  background-image: url('shard-chat-glass.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.25;
  mix-blend-mode: screen;
}

/* Match shard - bottom left — broken glass shape */
.shard-match {
  bottom: auto;
  top: 38%;
  left: -3%;
  width: 54%;
  height: 62%;
  clip-path: polygon(
    2% 8%,
    28% 2%,
    55% 5%,
    88% 12%,
    99% 20%,
    92% 45%,
    96% 72%,
    88% 95%,
    60% 99%,
    30% 97%,
    5% 92%,
    1% 60%,
    4% 30%
  );
}

/* Match shard overlay — red stained glass texture */
.match-overlay {
  position: absolute;
  inset: 0;
  background-image: url('shard-match-glass.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.25;
  mix-blend-mode: screen;
}
/* Match shard photo */
.shard-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.shard-photo.visible {
  opacity: 0.8;
}
/* Searching animation for match shard */
.shard-match.searching {
  animation: shard-pulse 1.2s ease-in-out infinite;
}

.shard-match.searching .shard-label {
  animation: search-fade 0.8s ease-in-out infinite alternate;
}

@keyframes shard-pulse {
  0%, 100% { filter: brightness(1) saturate(1); }
  50% { filter: brightness(1.3) saturate(1.4); }
}

@keyframes search-fade {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

.shard-match.searching::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(244, 168, 58, 0.15) 0%,
    transparent 70%
  );
  animation: search-glow 1.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes search-glow {
  0%, 100% { opacity: 0.3; transform: scale(0.95); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

/* Candle waiting state */
.home-candle-waiting {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.home-candle-waiting.visible {
  display: flex;
  opacity: 1;
}

.waiting-candle-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  height: 32px;
}

.waiting-candle-row .wc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.waiting-candle-row .wc-flame {
  width: 8px;
  height: 10px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

.waiting-candle-row .wc.lit .wc-flame {
  background: radial-gradient(ellipse at 50% 70%, #fff3c4 0%, #ffb347 30%, #ff6b1a 60%, transparent 100%);
  box-shadow: 0 0 8px rgba(255,179,71,0.6), 0 0 16px rgba(255,107,26,0.3);
  animation: waiting-breathe 2s ease-in-out infinite;
}

.waiting-candle-row .wc.unlit .wc-flame {
  opacity: 0.2;
}

.waiting-candle-row .wc-body {
  width: 5px;
  height: 14px;
  border-radius: 2px 2px 1px 1px;
}

.waiting-candle-row .wc.lit .wc-body {
  background: linear-gradient(180deg, #e8dcc8 0%, #c4b89c 50%, #a89878 100%);
  filter: brightness(1.1);
}

.waiting-candle-row .wc.unlit .wc-body {
  background: linear-gradient(180deg, #6b6557 0%, #5a5448 100%);
  opacity: 0.5;
}

@keyframes waiting-breathe {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

.waiting-text {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

/* Collage styles — removed, now using single random photo */

.shard-overlay {
  position: absolute;
  inset: 0;
  mix-blend-mode: multiply;
}

/* Second duplicate match-overlay removed - using the richer one above */
.shard-overlay {
  position: absolute;
  inset: 0;
  mix-blend-mode: screen;
}

/* Coach shard - bottom right — broken glass shape */
.shard-coach {
  bottom: auto;
  top: 44%;
  right: -3%;
  width: 54%;
  height: 48%;
  clip-path: polygon(
    98% 6%,
    72% 3%,
    45% 8%,
    18% 4%,
    5% 14%,
    2% 35%,
    8% 58%,
    3% 82%,
    12% 96%,
    40% 98%,
    70% 95%,
    95% 88%,
    99% 55%,
    96% 28%
  );
}

.coach-glass {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 50% 40% at 40% 40%, rgba(154,146,133,0.12) 0%, transparent 100%),
    radial-gradient(ellipse 40% 50% at 65% 65%, rgba(90,90,100,0.1) 0%, transparent 100%),
    linear-gradient(135deg, rgba(60,55,50,0.15), rgba(40,40,50,0.08));
}

.coach-img {
  position: absolute;
  top: 50%;
  bottom: auto;
  left: 50%;
  width: 60%;
  height: 55%;
  transform: translate(-50%, -50%);
  background-image: url('heart-robot-sleeping.webp');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  filter: brightness(0.4) saturate(0.6);
  transition: filter 0.5s ease;
}

.coach-img.awake {
  background-image: url('heart-robot-ready.webp');
  filter: brightness(1) saturate(1);
}

/* Chat shard persistent glow animation */
.shard-chat {
  animation: invite-pulse 3s ease-in-out infinite;
}

/* Subtle light refraction on shard edges - merged with main sheen above */

@keyframes invite-pulse {
  0%, 100% { filter: brightness(1); transform: scale(1); }
  50% { filter: brightness(1.25); transform: scale(1.02); }
}

/* No more inviting/dimmed states - all shards always active */

/* Coach awake state */
.shard-coach.awake .coach-glass {
  background: linear-gradient(135deg, rgba(201,122,58,0.2), rgba(244,168,58,0.1));
}

.shard-coach.awake .coach-status {
  color: var(--accent);
}

/* When coach is awake, other shards dim */
.glass-canvas.coach-awake .shard-match,
.glass-canvas.coach-awake .shard-chat {
  filter: grayscale(0.7) brightness(0.4);
}

/* Labels at the wide base (back) of each triangle */
.shard-label {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 2;
}

/* Chat: wide base is at top */
.shard-chat .shard-label {
  top: 16px;
  bottom: auto;
}

/* Match & Coach: wide base at bottom */
.shard-match .shard-label {
  bottom: 16px;
  top: auto;
}

.shard-coach .shard-label {
  bottom: 16px;
  top: auto;
}

.shard-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

.shard-sub {
  font-size: 11px;
  color: var(--text-secondary);
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

.coach-status {
  color: var(--text-muted);
}

/* ===== MATCH PROFILE VIEW ===== */
.match-profile-view {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 24px;
}

.mp-photo-area {
  width: 100%;
  height: 45vh;
  max-height: 400px;
  min-height: 220px;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.mp-photo-area.has-photo {
  background-size: cover;
  background-position: center;
}

.mp-photo-area.blurred::after {
  content: '';
  position: absolute;
  inset: 0;
  backdrop-filter: blur(20px);
  background: rgba(10,10,15,0.3);
}

.mp-photo-placeholder {
  color: var(--text-muted);
  font-size: 13px;
}

.mp-info {
  padding: 20px;
}

.mp-section {
  margin-bottom: 20px;
}

.mp-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.mp-value {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
}

.mp-candles {
  font-size: 18px;
  letter-spacing: 4px;
}

.match-profile-view .btn-primary {
  margin: 0 20px;
  width: calc(100% - 40px);
}

/* ===== HEADER ===== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--divider);
  gap: 12px;
}

.app-header .header-left,
.app-header .header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.back-btn {
  font-size: 20px;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px 8px;
}

.settings-cog {
  font-size: 20px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.settings-cog:hover {
  opacity: 1;
}

.filter-icon {
  font-size: 18px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.filter-icon:hover { opacity: 1; }
.filter-icon.active { opacity: 1; }

/* Match Filter Panel */
.filter-panel {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  animation: fadeIn 0.2s ease;
}
.filter-panel-inner {
  background: var(--bg-card, #1a1510);
  border-radius: 16px;
  margin: 0 16px;
  width: 100%;
  max-width: 360px;
  padding: 20px;
  border: 1px solid var(--divider, rgba(255,255,255,0.08));
  max-height: 70vh;
  overflow-y: auto;
}
.filter-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.filter-panel-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary, #f5e6d0);
}
.filter-panel-close {
  font-size: 24px;
  cursor: pointer;
  color: var(--text-secondary, #8a7a6a);
  padding: 0 8px;
}
.filter-group {
  margin-bottom: 16px;
}
.filter-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary, #8a7a6a);
  margin-bottom: 6px;
}
.filter-select {
  width: 100%;
  background: var(--bg-input, rgba(0,0,0,0.3));
  color: var(--text-primary, #f5e6d0);
  border: 1px solid var(--divider, rgba(255,255,255,0.1));
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}
.filter-age-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-age-sep {
  color: var(--text-secondary, #8a7a6a);
  font-size: 13px;
}
.filter-save-btn {
  width: 100%;
  margin-top: 8px;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Profile Bubble */
.profile-bubble {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.15s;
}

.profile-bubble:hover {
  transform: scale(1.05);
}

.profile-bubble-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #8a4a2a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ELO glow rings */
.warm-glow {
  box-shadow: 0 0 0 2px rgba(244, 168, 58, 0.4), 0 0 12px rgba(244, 168, 58, 0.3);
}

.there-glow {
  box-shadow: 0 0 0 2px rgba(201, 168, 90, 0.4), 0 0 12px rgba(201, 168, 90, 0.2);
}

.quiet-glow {
  box-shadow: 0 0 0 2px rgba(90, 122, 138, 0.4), 0 0 12px rgba(90, 122, 138, 0.2);
}

.cooling-glow {
  box-shadow: 0 0 0 2px rgba(74, 90, 106, 0.4), 0 0 12px rgba(74, 90, 106, 0.15);
}

.app-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--flame-soft);
  letter-spacing: 0.5px;
}

/* Candle Row */
.candle-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 8px;
  padding: 24px 20px 16px;
  background: linear-gradient(180deg, var(--warm-glow) 0%, transparent 100%);
  transition: background 0.8s ease;
}

.candle-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.candle-wrapper.lit .candle-day-label {
  color: var(--flame-soft);
  text-shadow: 0 0 8px rgba(255, 179, 71, 0.34);
}

.candle-wrapper.lit .candle {
  box-shadow: 0 2px 8px rgba(0,0,0,0.3), 0 0 15px rgba(244, 168, 58, 0.16);
}

.candle-day-label {
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.candle {
  width: 18px;
  height: 48px;
  background: linear-gradient(180deg, var(--wax) 0%, var(--wax-dark) 100%);
  border-radius: 3px 3px 1px 1px;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.candle::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 1px;
}

.candle.lit::after {
  content: '';
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 16px;
  background: radial-gradient(ellipse at center bottom, var(--flame) 20%, var(--flame-glow) 50%, transparent 70%);
  border-radius: 50% 50% 30% 30%;
  animation: flame-flicker 3.4s ease-in-out infinite;
  box-shadow: 0 0 20px var(--warm-glow-strong), 0 0 40px var(--warm-glow);
  will-change: transform, opacity;
}

.candle.unlit {
  opacity: 0.35;
}

@keyframes flame-flicker {
  0%, 100% { transform: translateX(-50%) scale(0.96, 1.02) rotate(-2deg); opacity: 0.86; }
  11% { transform: translateX(-44%) scale(1.04, 0.94) rotate(3deg); opacity: 1; }
  29% { transform: translateX(-54%) scale(0.92, 1.08) rotate(-4deg); opacity: 0.82; }
  48% { transform: translateX(-47%) scale(1.08, 1.02) rotate(2deg); opacity: 0.98; }
  71% { transform: translateX(-52%) scale(0.95, 0.91) rotate(-1deg); opacity: 0.9; }
  87% { transform: translateX(-45%) scale(1.02, 1.09) rotate(4deg); opacity: 1; }
}

.candle-wrapper:nth-child(2) .candle.lit::after { animation-duration: 3.8s; animation-delay: -1.1s; }
.candle-wrapper:nth-child(3) .candle.lit::after { animation-duration: 2.9s; animation-delay: -0.5s; }
.candle-wrapper:nth-child(4) .candle.lit::after { animation-duration: 4.1s; animation-delay: -2.2s; }
.candle-wrapper:nth-child(5) .candle.lit::after { animation-duration: 3.2s; animation-delay: -1.6s; }
.candle-wrapper:nth-child(6) .candle.lit::after { animation-duration: 3.7s; animation-delay: -0.8s; }
.candle-wrapper:nth-child(7) .candle.lit::after { animation-duration: 3.05s; animation-delay: -2.7s; }

/* Warmth overlay - increases with candles lit */
.warmth-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 1;
  transition: opacity 1.5s ease;
}

/* Chat Area */
.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 80px;
}

.match-status {
  text-align: center;
  padding: 12px 20px;
  margin: 8px 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.match-status .reveal-label {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent-soft);
  border-radius: 12px;
  color: var(--flame-soft);
  font-weight: 500;
  font-size: 11px;
  margin-top: 4px;
}

.report-button {
  border: 1px solid rgba(231, 76, 60, 0.45);
  border-radius: 999px;
  padding: 5px 9px;
  color: #f3aaa1;
  background: rgba(125, 37, 29, 0.24);
  font-size: 11px;
  font-weight: 700;
}

.report-modal {
  background: var(--bg-card);
  border: 1px solid rgba(231, 76, 60, 0.36);
  border-radius: 20px;
  padding: 26px 24px 22px;
  max-width: 360px;
  width: calc(100% - 40px);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 8px 40px rgba(192, 57, 43, 0.22);
  animation: nukeAppear 0.3s ease;
}

.report-icon { font-size: 30px; margin-bottom: 7px; }
.report-copy, .report-note { color: var(--text-secondary); font-size: 12px; line-height: 1.45; text-align: left; }
.report-note { margin: 10px 0 0; color: var(--text-muted); }
.report-label { display: block; margin: 14px 0 6px; color: var(--text-primary); font-size: 12px; font-weight: 650; text-align: left; }
.report-label span { color: var(--text-muted); font-weight: 400; }
.report-select, .report-details {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 10px;
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.2);
  font: inherit;
  font-size: 12px;
}
.report-details { resize: vertical; }
.report-confirm {
  flex: 1;
  border: none;
  border-radius: 10px;
  padding: 12px 8px;
  color: #fff;
  background: #b73c32;
  font-size: 12px;
  font-weight: 700;
}
.report-confirm:disabled { opacity: 0.6; }

.contact-unlock {
  margin: 0 16px 10px;
  padding: 14px 16px;
  border: 1px solid rgba(244, 168, 58, 0.32);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(92, 53, 25, 0.52), rgba(32, 23, 20, 0.9));
  text-align: center;
}

.contact-unlock.is-unlocked {
  animation: mutual-unlock 900ms cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 0 0 1px rgba(255, 215, 145, 0.2), 0 0 26px rgba(244, 168, 58, 0.2);
}

@keyframes mutual-unlock {
  0% { transform: scale(0.98); box-shadow: 0 0 0 rgba(244, 168, 58, 0); }
  45% { transform: scale(1.012); box-shadow: 0 0 38px rgba(255, 187, 83, 0.34); }
  100% { transform: scale(1); box-shadow: 0 0 26px rgba(244, 168, 58, 0.2); }
}

.contact-unlock-kicker {
  color: var(--flame-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.contact-unlock-title {
  margin-top: 5px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 650;
}

.contact-unlock-copy {
  margin: 7px auto 0;
  max-width: 330px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.contact-unlock-button {
  width: 100%;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(244, 168, 58, 0.55);
  border-radius: 10px;
  color: #20140c;
  background: var(--flame-soft);
  font-size: 12px;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 220ms ease, filter 220ms ease;
  box-shadow: 0 0 0 rgba(244, 168, 58, 0);
}

.contact-unlock-button:active:not(:disabled) {
  transform: scale(0.985);
  filter: brightness(1.08);
  box-shadow: 0 0 20px rgba(255, 186, 74, 0.48);
}

.contact-unlock-button:disabled {
  opacity: 0.7;
}

.message {
  max-width: 78%;
  margin: 4px 0;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
}

.message.fresh { animation: fadeIn 280ms ease both; }
.message.me.fresh { animation-name: ember-send; }
.message.them.fresh { animation-name: ember-arrive; }

@keyframes ember-send {
  0% { opacity: 0; transform: translate3d(10px, 8px, 0) scale(0.96); }
  65% { opacity: 1; transform: translate3d(-1px, -1px, 0) scale(1.01); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes ember-arrive {
  0% { opacity: 0; transform: translate3d(-8px, 6px, 0) scale(0.97); }
  70% { opacity: 1; transform: translate3d(1px, -1px, 0) scale(1.008); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.message.them {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--divider);
  border-bottom-left-radius: 4px;
}

.message.me {
  align-self: flex-end;
  background: var(--accent-soft);
  border: 1px solid rgba(201, 122, 58, 0.2);
  border-bottom-right-radius: 4px;
}

.message.system {
  align-self: center;
  max-width: 88%;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(60,30,15,0.6), rgba(40,20,10,0.4));
  border: 1px solid rgba(244,168,58,0.25);
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--flame-soft);
  text-align: center;
  white-space: pre-line;
}

.message.me-blocked {
  align-self: flex-end;
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  background: rgba(40,20,10,0.2);
  border: 1px solid rgba(231,76,60,0.15);
  border-bottom-right-radius: 4px;
  color: var(--text-muted);
  text-decoration: line-through;
  opacity: 0.5;
}

.message .timestamp {
  display: block;
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 2px;
}

.prompt-bubble {
  align-self: center;
  max-width: 90%;
  margin: 12px 0;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--accent-soft), rgba(58, 46, 30, 0.6));
  border: 1px solid rgba(201, 122, 58, 0.25);
  border-radius: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--flame-soft);
}

.prompt-bubble .prompt-icon {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.reveal-notification {
  align-self: center;
  margin: 16px 0;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--accent-soft), var(--bg-card));
  border: 1px solid var(--flame-glow);
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 0 30px var(--warm-glow);
  animation: revealGlow 1s ease;
}

@keyframes revealGlow {
  from { box-shadow: 0 0 0px var(--warm-glow); transform: scale(0.95); }
  to { box-shadow: 0 0 30px var(--warm-glow); transform: scale(1); }
}

.reveal-notification .candle-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.reveal-notification .reveal-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--flame-soft);
  margin-bottom: 4px;
}

.reveal-notification .reveal-content {
  font-size: 16px;
  color: var(--text-primary);
  font-weight: 500;
}

/* Input Bar */
.input-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 420px;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  background: var(--bg-dark);
  border-top: 1px solid var(--divider);
  display: flex;
  gap: 8px;
  align-items: center;
  z-index: 10;
}

.input-bar input {
  flex: 1;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--divider);
  border-radius: 22px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none;
}

.input-bar input::placeholder {
  color: var(--text-muted);
}

.input-bar input:focus {
  border-color: var(--accent);
}

.send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--flame-glow);
  border: none;
  color: var(--bg-dark);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s, background 0.2s;
}

.send-btn:hover { background: var(--flame); }
.send-btn:active { transform: scale(0.92); }

/* ELO Status */
.elo-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--divider);
}

.elo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.elo-dot.warm { background: var(--flame); box-shadow: 0 0 8px var(--flame-glow); }
.elo-dot.there { background: #c9a85a; }
.elo-dot.quiet { background: #5a7a8a; }
.elo-dot.cooling { background: #4a5a6a; }

.elo-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Day Selector */
.day-selector {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 8px 20px 4px;
  overflow-x: auto;
}

.day-pill {
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}

.day-pill:hover {
  color: var(--text-secondary);
}

.day-pill.active {
  background: var(--accent-soft);
  color: var(--flame-soft);
  border-color: rgba(201, 122, 58, 0.3);
}

/* Screens */
.screen {
  display: none;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.screen.active {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  animation: screenEnter 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
@keyframes screenEnter {
  from { opacity: 0; transform: translateX(32px) scale(0.98); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
/* Back navigation slides from left */
.screen.active.back-enter {
  animation: screenEnterBack 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
@keyframes screenEnterBack {
  from { opacity: 0; transform: translateX(-32px) scale(0.98); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

/* Onboarding */
.onboarding {
  padding: 40px 24px;
  text-align: center;
  flex: 1;
  overflow-y: auto;
}

.onboarding-logo {
  font-size: 32px;
  font-weight: 700;
  color: var(--flame-soft);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.onboarding-tagline {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.covenant {
  background: var(--bg-card);
  border: 1px solid var(--divider);
  border-radius: 20px;
  padding: 28px 24px;
  margin: 0 0 24px;
  text-align: left;
}

.covenant p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.covenant p:last-child { margin-bottom: 0; }

.covenant .highlight {
  color: var(--flame-soft);
  font-weight: 500;
}

.btn-primary {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--flame-glow), var(--accent));
  border: none;
  border-radius: 16px;
  color: var(--bg-dark);
  font-size: 15px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s;
}

.btn-primary:hover {
  box-shadow: 0 4px 20px var(--warm-glow-strong);
}

.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  width: 100%;
  padding: 14px;
  background: transparent;
  border: 1px solid var(--divider);
  border-radius: 16px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  margin-top: 8px;
}

/* Settings / Nuclear Button */
.settings-screen { padding: 20px; flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

.settings-section {
  margin-bottom: 24px;
}

.settings-section h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: var(--bg-card);
  border-radius: 12px;
  margin-bottom: 4px;
  font-size: 14px;
}

.settings-item .value {
  color: var(--text-secondary);
  font-size: 13px;
}

.nuclear-btn {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  border: none;
  border-radius: 16px;
  color: white;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  margin-top: 24px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 20px rgba(192, 57, 43, 0.3);
  transition: transform 0.1s, box-shadow 0.2s;
}

.nuclear-btn:hover {
  box-shadow: 0 6px 30px rgba(192, 57, 43, 0.5);
}

.nuclear-btn:active { transform: scale(0.98); }

/* Scrollbar */
::-webkit-scrollbar { width: 0; }

@media (prefers-reduced-motion: reduce) {
  .shard::before,
  .candle.lit::after,
  .contact-unlock.is-unlocked,
  .message.fresh {
    animation: none;
  }
}

/* ===== SPLASH SCREEN ===== */
.splash-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 32px;
  text-align: center;
}

.splash-candles {
  display: flex;
  gap: 6px;
  margin-bottom: 48px;
  align-items: flex-end;
}

.splash-candle {
  width: 16px;
  height: 40px;
  background: linear-gradient(180deg, var(--wax) 0%, var(--wax-dark) 100%);
  border-radius: 3px 3px 1px 1px;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.splash-candle:nth-child(1) { height: 28px; animation: flickerFlame 2.1s ease-in-out infinite alternate; }
.splash-candle:nth-child(2) { height: 36px; animation: flickerFlame 2.3s ease-in-out infinite alternate; }
.splash-candle:nth-child(3) { height: 44px; animation: flickerFlame 1.9s ease-in-out infinite alternate; }
.splash-candle:nth-child(4) { height: 52px; animation: flickerFlame 2.5s ease-in-out infinite alternate; }
.splash-candle:nth-child(5) { height: 44px; animation: flickerFlame 2.2s ease-in-out infinite alternate; }
.splash-candle:nth-child(6) { height: 36px; animation: flickerFlame 2.4s ease-in-out infinite alternate; }
.splash-candle:nth-child(7) { height: 28px; animation: flickerFlame 2.0s ease-in-out infinite alternate; }

.splash-candle::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 16px;
  background: radial-gradient(ellipse at center bottom, var(--flame) 20%, var(--flame-glow) 50%, transparent 70%);
  border-radius: 50% 50% 30% 30%;
  box-shadow: 0 0 20px var(--warm-glow-strong), 0 0 40px var(--warm-glow);
}

@keyframes flickerFlame {
  0% { filter: brightness(0.95); }
  50% { filter: brightness(1.1); }
  100% { filter: brightness(0.98); }
}

.splash-logo {
  font-size: 36px;
  font-weight: 700;
  color: var(--flame-soft);
  letter-spacing: 1px;
  margin-bottom: 40px;
}

.splash-greeting {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.splash-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.splash-phone-form {
  width: 100%;
  max-width: 320px;
}

.phone-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--divider);
  border-radius: 16px;
  margin-bottom: 12px;
}

.phone-input-wrap:focus-within {
  border-color: var(--accent);
}

.phone-prefix {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.phone-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 16px;
  font-family: 'Inter', sans-serif;
}

.phone-input::placeholder {
  color: var(--text-muted);
}

.splash-btn {
  margin-top: 4px;
}

.splash-footer {
  margin-top: 32px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.splash-version {
  margin-top: 16px;
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.5;
}

/* Loading spinner for returning-user splash */
.loading-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2px solid rgba(244,168,58,0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== VERIFY SCREEN ===== */
.verify-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 32px;
  text-align: center;
}

.verify-back {
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-secondary);
}

.verify-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.verify-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.code-input-row {
  display: flex;
  gap: 6px;
  margin-bottom: 32px;
  width: 100%;
  max-width: 260px;
}

.code-box {
  flex: 1;
  aspect-ratio: 1;
  min-width: 0;
  max-width: 38px;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  background: var(--bg-card);
  border: 1px solid var(--divider);
  border-radius: 10px;
  color: var(--text-primary);
  outline: none;
  font-family: 'Inter', sans-serif;
}

.code-box:focus {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--warm-glow);
}

.verify-container .btn-primary {
  width: 100%;
  max-width: 300px;
}

.verify-resend {
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.link {
  color: var(--flame-soft);
  cursor: pointer;
  text-decoration: underline;
}

/* ===== PROFILE BUILDER ===== */
.profile-builder {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 60px 24px 40px;
}

.profile-progress {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 20px;
}

.progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--divider);
  transition: background 0.3s;
}

.progress-dot.active {
  background: var(--flame);
  box-shadow: 0 0 8px var(--warm-glow-strong);
}

.progress-dot.done {
  background: var(--accent);
}

.profile-step {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.profile-title {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}

.profile-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.5;
  margin-bottom: 32px;
}

.profile-input {
  width: 100%;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--divider);
  border-radius: 16px;
  color: var(--text-primary);
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  outline: none;
  margin-bottom: 16px;
}

.profile-input:focus {
  border-color: var(--accent);
}

.profile-input::placeholder {
  color: var(--text-muted);
}

.age-row {
  display: flex;
  gap: 12px;
}

.age-input {
  max-width: 100px;
  text-align: center;
}

.location-input {
  flex: 1;
}

.profile-builder .btn-primary {
  margin-top: auto;
}

/* Photos */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}

.photo-upload {
  aspect-ratio: 1;
  background: var(--bg-card);
  border: 1px dashed var(--divider);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s;
}

.photo-upload:hover {
  border-color: var(--accent);
}

.photo-upload.main-photo {
  grid-column: span 2;
  grid-row: span 2;
}

.photo-plus {
  font-size: 24px;
  color: var(--text-muted);
  font-weight: 300;
}

.photo-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* Bio */
.profile-textarea {
  width: 100%;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--divider);
  border-radius: 16px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none;
  resize: none;
  margin-bottom: 4px;
}

.profile-textarea:focus {
  border-color: var(--accent);
}

.profile-textarea::placeholder {
  color: var(--text-muted);
}

.char-count {
  text-align: right;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Interest Tags */
.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.interest-tag {
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--divider);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.interest-tag:hover {
  border-color: var(--text-muted);
}

.interest-tag.selected {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--flame-soft);
}

/* Preferences */
.prefs-section {
  margin-bottom: 24px;
}

.prefs-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.price-row {
  display: flex;
  gap: 8px;
}

.price-pill {
  flex: 1;
  text-align: center;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--divider);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.price-pill.selected {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--flame-soft);
}

/* ===== WAITING SCREEN ===== */
.waiting-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 32px;
  text-align: center;
}

.waiting-candle {
  width: 32px;
  height: 64px;
  background: linear-gradient(180deg, var(--wax) 0%, var(--wax-dark) 100%);
  border-radius: 4px 4px 2px 2px;
  position: relative;
  margin-bottom: 40px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.waiting-candle::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 22px;
  background: radial-gradient(ellipse at center bottom, var(--flame) 20%, var(--flame-glow) 50%, transparent 70%);
  border-radius: 50% 50% 30% 30%;
  animation: flame-flicker 3.4s ease-in-out infinite;
  box-shadow: 0 0 30px var(--warm-glow-strong), 0 0 60px var(--warm-glow);
}

.waiting-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.waiting-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.waiting-detail {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 40px;
}

.waiting-users, .waiting-glob {
  display: block;
  font-weight: 600;
  color: var(--flame-soft);
  margin: 4px 0;
}

.waiting-match-demo {
  margin-top: 16px;
}

.waiting-demo-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.waiting-match-demo .btn-primary {
  width: auto;
  padding: 14px 32px;
}

/* ===== NUCLEAR MODAL ===== */
.nuke-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.nuke-overlay.show {
  display: flex;
}

.nuke-modal {
  background: var(--bg-card);
  border: 1px solid rgba(231, 76, 60, 0.3);
  border-radius: 20px;
  padding: 32px 28px 24px;
  max-width: 340px;
  width: calc(100% - 48px);
  text-align: center;
  box-shadow: 0 8px 40px rgba(192, 57, 43, 0.2);
  animation: nukeAppear 0.3s ease;
}

@keyframes nukeAppear {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.nuke-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.nuke-title {
  font-size: 18px;
  font-weight: 700;
  color: #e74c3c;
  margin-bottom: 12px;
}

.nuke-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.nuke-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nuke-cancel {
  padding: 14px;
  background: transparent;
  border: 1px solid var(--divider);
  border-radius: 14px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
}

.nuke-cancel:hover {
  background: rgba(255, 255, 255, 0.03);
}

.nuke-confirm {
  padding: 14px;
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  border: none;
  border-radius: 14px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
}

.nuke-confirm:hover {
  box-shadow: 0 4px 20px rgba(192, 57, 43, 0.4);
}

/* ===== CLICKABLE SETTINGS ITEM ===== */
.settings-item.clickable {
  cursor: pointer;
  transition: background 0.2s;
}

.settings-item.clickable:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* ===== PROFILE VIEW ===== */
.profile-view {
  padding: 0 0 40px;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.pv-photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 4px;
  padding: 0 16px 20px;
}

.pv-photo {
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pv-photo.main {
  grid-column: span 2;
  grid-row: span 2;
  min-height: 180px;
}

.pv-photo.small {
  aspect-ratio: 1;
}

.pv-photo-placeholder {
  color: var(--text-muted);
  font-size: 12px;
}

.pv-section {
  padding: 0 20px;
  margin-bottom: 28px;
}

.pv-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.pv-name {
  font-size: 24px;
  font-weight: 700;
}

.pv-age {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-secondary);
}

.pv-location {
  font-size: 14px;
  color: var(--text-secondary);
}

.pv-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.pv-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
}

.pv-edit-btn {
  font-size: 13px;
  color: var(--flame-soft);
  cursor: pointer;
  font-weight: 500;
}

.pv-edit-btn:hover {
  text-decoration: underline;
}

.pv-bio {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
}

.pv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pv-tag {
  padding: 6px 14px;
  background: var(--accent-soft);
  border: 1px solid rgba(201, 122, 58, 0.2);
  border-radius: 16px;
  font-size: 13px;
  color: var(--flame-soft);
}

.pv-note {
  margin: 8px 20px 0;
  padding: 16px;
  background: var(--bg-card);
  border-radius: 12px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  border: 1px solid var(--divider);
}

/* Profile Info Grid */
.pv-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pv-info-item {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--divider);
}

.pv-info-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.pv-info-value {
  font-size: 14px;
  color: var(--text-primary);
}

/* ===== EDIT SCREEN ===== */
.edit-container {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.edit-container .profile-input {
  margin-bottom: 16px;
}

.edit-container .profile-textarea {
  margin-bottom: 8px;
}

.edit-container .interest-tags {
  margin-top: 16px;
}

.edit-container .price-row {
  margin-top: 16px;
}

/* ===== HEIGHT PICKER ===== */
.height-picker-section {
  margin-bottom: 16px;
}

.height-unit-toggle {
  display: flex;
  gap: 0;
  margin: 8px 0 12px;
  border-radius: 12px;
  overflow: hidden;
  width: fit-content;
  border: 1px solid var(--divider);
}

.height-unit-btn {
  padding: 8px 16px;
  background: var(--bg-card);
  color: var(--text-muted);
  border: none;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}

.height-unit-btn.selected {
  background: var(--accent);
  color: #050301;
  font-weight: 600;
}

.height-picker {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 8px 0;
}

.height-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.height-scroll {
  height: 132px; /* 3 visible options (44px each) */
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  width: 72px;
  background: var(--bg-card);
  border: 1px solid var(--divider);
  border-radius: 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  position: relative;
  /* Center highlight band */
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 33%,
    black 33%,
    black 67%,
    transparent 67%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 33%,
    black 33%,
    black 67%,
    transparent 67%,
    transparent 100%
  );
}

.height-scroll::-webkit-scrollbar {
  display: none;
}

.height-pad {
  height: 44px; /* (container - option) / 2 = centers first option */
  flex-shrink: 0;
}

.height-opt {
  height: 44px;
  line-height: 44px;
  text-align: center;
  font-size: 18px;
  color: var(--text-muted);
  scroll-snap-align: center;
  flex-shrink: 0;
  transition: color 0.2s, font-size 0.2s;
}

/* Center selection indicator */
.height-scroll::before {
  content: '';
  position: sticky;
  top: 44px;
  display: block;
  height: 44px;
  margin-top: -44px;
  z-index: -1;
}

.height-col-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.height-display {
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 12px;
}

/* ===== HOME BACKGROUND CANVAS ===== */
/* App-wide persistent background */
.app-bg-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  /* The lights are already drawn as soft gradients. Avoiding a full-canvas
     blur keeps the living background inexpensive on older Android devices. */
  filter: brightness(0.82);
  pointer-events: none;
}

.app-bg-vignette {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(5,3,1,0.5) 100%);
  z-index: 1;
  pointer-events: none;
}

/* All screens sit above the canvas */
.screen {
  background: transparent !important;
  position: relative;
  z-index: 2;
}

/* Screens that need solid bg (splash, onboarding) get it via overlay */
#screen-splash, #screen-verify, #screen-covenant,
#screen-profile-name, #screen-profile-age, #screen-profile-photos,
#screen-profile-bio, #screen-profile-prefs, #screen-waiting {
  background: rgba(10, 7, 5, 0.92) !important;
}

/* ===== LOCKED SHARDS ===== */
.shard.locked {
  filter: grayscale(0.8) brightness(0.3);
  pointer-events: auto;
  opacity: 0.5;
}

.shard.locked .shard-title,
.shard.locked .shard-sub {
  color: var(--text-muted);
}

.shard.locked:active {
  transform: scale(0.97);
}

/* Pulse overlay (app-wide) */
.app-pulse-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
}

.app-pulse-overlay.active {
  animation: appWarmthPulse 1.5s ease-out;
}

@keyframes appWarmthPulse {
  0% { opacity: 0; background: radial-gradient(circle at 50% 80%, rgba(255,179,71,0.4) 0%, transparent 50%); }
  30% { opacity: 1; }
  100% { opacity: 0; background: radial-gradient(circle at 50% 80%, rgba(255,179,71,0) 0%, transparent 70%); }
}

/* Cool-down wave when candles are blown out */
@keyframes appCooldownWave {
  0% { 
    opacity: 0; 
    background: radial-gradient(circle at 50% 100%, rgba(100,50,20,0.6) 0%, rgba(60,30,10,0.3) 30%, transparent 60%);
    transform: scaleY(0.3);
  }
  20% { 
    opacity: 1; 
    background: radial-gradient(circle at 50% 100%, rgba(80,40,15,0.7) 0%, rgba(50,25,8,0.4) 35%, transparent 70%);
    transform: scaleY(0.6);
  }
  100% { 
    opacity: 0; 
    background: radial-gradient(circle at 50% 100%, rgba(10,7,5,0.8) 0%, rgba(5,3,1,0.4) 50%, transparent 100%);
    transform: scaleY(1.5);
  }
}

.app-pulse-overlay.cooldown {
  animation: appCooldownWave 1.5s ease-out forwards !important;
  transform-origin: bottom center;
}

/* ===== CANDLE LIGHTING ZONE ===== */
.candle-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0 20px calc(20px + env(safe-area-inset-bottom));
  min-height: 140px;
  flex-shrink: 0;
  position: relative;
  z-index: 5;
}

.home-day-label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.home-candle-enter {
  display: none;
  flex-direction: column;
  align-items: center;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.6, 1), opacity 0.8s ease;
}

.home-candle-enter.visible {
  display: flex;
}

.home-candle-enter.hidden {
  transform: translateY(80px);
  opacity: 0;
  pointer-events: none;
}

.home-candle-enter.dropping {
  animation: candleDrop 1.2s ease-in forwards;
  animation-delay: 0.6s;
}

@keyframes candleDrop {
  0% { transform: translateY(0); opacity: 1; }
  25% { transform: translateY(-12px); opacity: 1; }
  100% { transform: translateY(160px); opacity: 0; }
}

.home-candle {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  gap: 0;
}

.home-flame {
  width: 16px;
  height: 22px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: transparent;
  margin-bottom: 2px;
  transition: all 0.4s ease;
  opacity: 0.35;
}

.home-candle.lit .home-flame {
  opacity: 1;
  background: radial-gradient(ellipse at 50% 70%, #fff3c4 0%, #ffb347 30%, #ff6b1a 60%, transparent 100%);
  box-shadow:
    0 0 20px rgba(255,179,71,0.7),
    0 0 40px rgba(255,107,26,0.4),
    0 0 60px rgba(255,107,26,0.15);
  animation: homeFlameFlicker 0.12s infinite alternate;
}

@keyframes homeFlameFlicker {
  0% { transform: scaleY(1) scaleX(1) rotate(-1.5deg); }
  100% { transform: scaleY(1.1) scaleX(0.93) rotate(1.5deg); }
}

.home-wick {
  width: 2px;
  height: 5px;
  background: var(--text-muted);
  border-radius: 1px;
}

.home-candle-body {
  width: 12px;
  height: 48px;
  background: linear-gradient(180deg, #e8dcc8 0%, #c4b89c 50%, #a89878 100%);
  border-radius: 3px 3px 1px 1px;
  transition: all 0.4s ease;
  opacity: 0.6;
  filter: brightness(0.75);
}

.home-candle.lit .home-candle-body {
  opacity: 1;
  filter: brightness(1.2);
}

.home-tap-hint {
  font-size: 10px;
  color: var(--flame-soft);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 10px;
  animation: tapPulse 2s ease-in-out infinite;
  text-shadow: 0 0 8px rgba(255, 210, 138, 0.3);
}

@keyframes tapPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.85; }
}

.home-candle.lit ~ .home-tap-hint {
  opacity: 0;
}

.home-all-lit {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-align: center;
  display: none;
}

.home-all-lit.visible {
  display: block;
}

/* ===== BLOW OUT CANDLES ===== */
.home-blowout-enter {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.6, 1), opacity 0.8s ease;
  display: none;
}

.home-blowout-enter.visible {
  display: flex;
}

.puff-icon {
  font-size: 36px;
  cursor: pointer;
  animation: puffFloat 2s ease-in-out infinite;
  filter: grayscale(0.3) opacity(0.7);
  transition: filter 0.3s ease, transform 0.2s ease;
}

.puff-icon:hover {
  filter: grayscale(0) opacity(1);
  transform: scale(1.1);
}

.puff-icon:active {
  transform: scale(0.9);
}

@keyframes puffFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Confirm state */
.home-blowout-confirm-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px 4px;
  transition: transform 0.2s ease;
}

.home-blowout-confirm-inner:hover {
  transform: scale(1.03);
}

.home-blowout-confirm-inner:active {
  transform: scale(0.97);
}

.puff-row {
  display: flex;
  gap: 6px;
}

.puff-small {
  font-size: 28px;
  animation: puffFloat 1.5s ease-in-out infinite;
  filter: grayscale(0.3) opacity(0.7);
}

.puff-small:nth-child(2) { animation-delay: 0.3s; }
.puff-small:nth-child(3) { animation-delay: 0.6s; }

.blowout-warning {
  font-size: 13px;
  color: var(--text-secondary);
  letter-spacing: 1px;
  text-align: center;
}

/* Candle extinguish animation */
.home-candle.extinguishing {
  animation: candleExtinguish 0.8s ease-out forwards;
}

@keyframes candleExtinguish {
  0% { opacity: 1; }
  30% { transform: scale(1.05); }
  100% { opacity: 0; transform: scale(0.8); }
}

/* Pulse overlay when candle is lit */
.home-pulse-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
}

.home-pulse-overlay.active {
  animation: homeWarmthPulse 1.5s ease-out;
}

@keyframes homeWarmthPulse {
  0% { opacity: 0; background: radial-gradient(circle at 50% 80%, rgba(255,179,71,0.4) 0%, transparent 50%); }
  30% { opacity: 1; }
  100% { opacity: 0; background: radial-gradient(circle at 50% 80%, rgba(255,179,71,0) 0%, transparent 70%); }
}

/* Phone frame needs to clip the canvas */
.phone-frame {
  position: relative;
  overflow: hidden;
}

/* ===== MATCH PROFILE PHOTO CAROUSEL ===== */
.mp-photo-carousel {
  display: none;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.mp-photo-carousel.visible {
  display: block;
}

.mp-photo-track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.3s ease;
  touch-action: pan-x;
}

.mp-photo-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

.mp-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.mp-nav-btn:hover {
  background: rgba(0,0,0,0.7);
}

.mp-nav-prev {
  left: 8px;
}

.mp-nav-next {
  right: 8px;
}

.mp-photo-dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 2;
}

.mp-photo-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transition: all 0.3s;
}

.mp-photo-dot.active {
  background: rgba(255,255,255,0.8);
  width: 18px;
  border-radius: 3px;
}

/* ===== PROMPT GATE ===== */
.prompt-gate {
  display: none;
  padding: 20px;
  flex-shrink: 0;
}

.prompt-gate.visible {
  display: flex;
  justify-content: center;
}

.prompt-gate-card {
  background: linear-gradient(135deg, var(--accent-soft), rgba(58,46,30,0.8));
  border: 1px solid rgba(201,122,58,0.3);
  border-radius: 20px;
  padding: 24px 20px;
  text-align: center;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 0 30px rgba(244,168,58,0.1);
}

.prompt-gate-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.prompt-gate-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.prompt-gate-text {
  font-size: 17px;
  color: var(--flame-soft);
  line-height: 1.5;
  margin-bottom: 20px;
  font-weight: 500;
}

.prompt-gate-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--divider);
  border-radius: 16px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none;
  margin-bottom: 12px;
}

.prompt-gate-input:focus {
  border-color: var(--accent);
}

.prompt-gate-input::placeholder {
  color: var(--text-muted);
}

.prompt-gate-card .btn-primary {
  width: 100%;
}

/* ===== PHOTO VIEWER OVERLAY ===== */
.photo-viewer {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.95);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.photo-viewer.visible {
  display: flex;
  pointer-events: auto;
}

/* Block all interaction with elements below the overlay */
.photo-viewer.visible ~ * {
  pointer-events: none;
}

body:has(.photo-viewer.visible) .phone-frame {
  pointer-events: none;
}
body:has(.photo-viewer.visible) .photo-viewer {
  pointer-events: auto;
}

.photo-viewer-close {
  position: absolute;
  top: calc(20px + env(safe-area-inset-top));
  right: 24px;
  font-size: 36px;
  color: var(--text-primary);
  cursor: pointer;
  z-index: 2100;
  line-height: 1;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
  padding: 8px;
  margin: -8px;
}

.photo-viewer-carousel {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.photo-viewer-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
  touch-action: pan-x pan-y; /* allow horizontal swipe + vertical swipe to close */
}

.photo-viewer-slide {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

.photo-viewer-dots {
  position: absolute;
  bottom: calc(30px + env(safe-area-inset-bottom));
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 2100;
}

.photo-viewer-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transition: all 0.3s;
}

.photo-viewer-dot.active {
  background: rgba(255,255,255,0.8);
  width: 24px;
  border-radius: 4px;
}

/* ===== PHOTO CROP EDITOR ===== */
.crop-editor {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 10000;
  display: none;
  flex-direction: column;
  animation: cropFadeIn 0.2s ease;
}

.crop-editor-spinner {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.crop-editor-spin {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: cropSpin 0.8s linear infinite;
}

@keyframes cropSpin {
  to { transform: rotate(360deg); }
}

@keyframes cropFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.crop-editor.visible {
  display: flex;
}

.crop-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  padding-top: max(16px, env(safe-area-inset-top));
  flex-shrink: 0;
}

.crop-editor-title {
  font-size: 17px;
  font-weight: 600;
  color: #fff;
}

.crop-editor-done {
  color: var(--accent);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
}

.crop-editor-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.crop-editor-frame {
  position: relative;
  width: min(90vw, 360px);
  aspect-ratio: 1;
  overflow: hidden;
  background: #111;
  border-radius: 4px;
  touch-action: none;
}

.crop-editor-img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center center;
  max-width: none;
  max-height: none;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
  will-change: transform;
}

.crop-editor-controls {
  flex-shrink: 0;
  padding: 16px 24px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 14px;
}

.crop-editor-zoom-label {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  flex-shrink: 0;
}

.crop-editor-slider {
  flex: 1;
  height: 40px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.crop-editor-slider::-webkit-slider-runnable-track {
  height: 3px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
}

.crop-editor-slider::-moz-range-track {
  height: 3px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
}

.crop-editor-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: -9.5px;
  border: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.crop-editor-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* ===== REVEAL SCHEDULE OVERLAY ===== */
.info-modal {
  background: var(--bg-card);
  border: 1px solid var(--divider);
  border-radius: 20px;
  padding: 32px 24px 24px;
  max-width: 360px;
  width: calc(100% - 48px);
  max-height: calc(80vh - 48px);
  overflow-y: auto;
  position: relative;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
  animation: nukeAppear 0.3s ease;
}

.info-modal h2 {
  font-size: 20px;
  margin: 0 0 8px;
  text-align: center;
}

.info-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 20px;
}

.info-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 28px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}

.reveal-schedule {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reveal-day {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  transition: background 0.2s;
}

.reveal-day.past {
  opacity: 0.5;
}

.reveal-day.current {
  background: rgba(244,168,58,0.12);
  border: 1px solid rgba(244,168,58,0.3);
}

.reveal-day-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.reveal-day.current .reveal-day-num {
  background: var(--accent);
  color: var(--bg-dark);
  border-color: var(--accent);
}

.reveal-day-info {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-secondary);
}

.reveal-day-info b {
  color: var(--text-primary);
}
