/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --cream: #f5f0e8;
  --cork: #e8dfd3;
  --polaroid-white: #fefefe;
  --shadow-light: rgba(0, 0, 0, 0.08);
  --shadow-med: rgba(0, 0, 0, 0.15);
  --shadow-heavy: rgba(0, 0, 0, 0.25);
  --caption-color: #2c2c2c;
  --accent: #c45b4a;
  --wc-blur: 2px; /* watercolor edge blur */
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--cream);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(180, 160, 130, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 30%, rgba(180, 160, 130, 0.06) 0%, transparent 50%);
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--caption-color);
  background-size: 100% 100%, 100% 100%;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    repeating-conic-gradient(rgba(160, 140, 110, 0.03) 0% 25%, transparent 0% 50%);
  background-size: 12px 12px;
  pointer-events: none;
  z-index: 0;
}

/* ===== HEADER ===== */
.page-header {
  text-align: center;
  padding: 2.5rem 1rem 1rem;
  position: relative;
  z-index: 1;
}

.header-text {
  font-family: 'Caveat', cursive;
  font-size: 1.35rem;
  color: #8a7e72;
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* ===== POLAROID TABLE ===== */
.polaroid-table {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 0.5rem 1rem 6rem;
  min-height: 1620px;
}

/* ===== POLAROID CARD ===== */
.polaroid {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 42%;
  transform: rotate(var(--rot));
  cursor: pointer;
  z-index: 1;
  -webkit-tap-highlight-color: transparent;
  transition: z-index 0s;
  opacity: 0;
}

.polaroid.entered {
  opacity: 1;
}

.polaroid.active {
  z-index: 100;
}

.polaroid-inner {
  background: var(--polaroid-white);
  padding: 8px 8px 0 8px;
  border-radius: 2px;
  box-shadow:
    0 2px 8px var(--shadow-light),
    0 4px 16px var(--shadow-light),
    1px 1px 3px rgba(0, 0, 0, 0.04);
  transform-origin: center center;
}

.polaroid.active .polaroid-inner {
  box-shadow:
    0 12px 40px var(--shadow-med),
    0 4px 16px var(--shadow-light);
}

/* ===== POLAROID IMAGE AREA ===== */
.polaroid-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 1px;
  position: relative;
  overflow: hidden;
}

/* ===== POLAROID CAPTION ===== */
.polaroid-caption {
  padding: 10px 4px 14px;
  font-family: 'Caveat', cursive;
  text-align: center;
  min-height: 44px;
}

.caption-short {
  font-size: 1rem;
  font-weight: 600;
  color: var(--caption-color);
  transition: opacity 0.3s;
}

.caption-full {
  font-size: 0.85rem;
  font-weight: 400;
  color: #555;
  line-height: 1.35;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
  margin-top: 0;
}

.polaroid.active .caption-full {
  max-height: 200px;
  opacity: 1;
  margin-top: 4px;
}

.caption-full.visible {
  max-height: none;
  opacity: 1;
  margin-top: 0;
}


/* ============================================
   SCENE: RUNNING — Watercolor Trail
   ============================================ */
.running-scene {
  background:
    radial-gradient(ellipse at 70% 20%, rgba(173, 216, 230, 0.5) 0%, transparent 50%),
    linear-gradient(180deg,
      #a8d5e8 0%,
      #c6e4f0 35%,
      #d4c9a0 55%,
      #c4b68a 100%);
}

.wc-cloud {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  filter: blur(4px);
}
.wc-cloud-1 { width: 30px; height: 12px; top: 10%; left: 15%; }
.wc-cloud-2 { width: 22px; height: 9px; top: 15%; right: 20%; opacity: 0.4; }

.trail-path {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 42%;
  background:
    linear-gradient(180deg,
      rgba(140, 130, 110, 0.6) 0%,
      rgba(120, 110, 95, 0.7) 40%,
      rgba(100, 90, 75, 0.8) 100%);
  filter: blur(1px);
}

.trail-path-edge {
  position: absolute;
  bottom: 38%;
  left: 0;
  right: 0;
  height: 8%;
  background: linear-gradient(180deg, transparent, rgba(140, 130, 110, 0.3));
  filter: blur(3px);
}

.bg-tree {
  position: absolute;
  bottom: 42%;
  left: 12%;
  width: 6px;
  height: 22px;
  background: rgba(100, 80, 50, 0.5);
  border-radius: 1px;
  filter: blur(1px);
}

.bg-tree-top {
  position: absolute;
  bottom: 55%;
  left: 5%;
  width: 22px;
  height: 20px;
  background: radial-gradient(ellipse, rgba(90, 140, 80, 0.5) 40%, transparent 70%);
  border-radius: 50%;
  filter: blur(2px);
}

.shoe {
  position: absolute;
  bottom: 36%;
}

.shoe-left {
  left: 18%;
  transform: rotate(-8deg);
}

.shoe-right {
  right: 18%;
  transform: rotate(12deg) translateY(-8px);
}

.shoe-body {
  width: 38px;
  height: 18px;
  background: linear-gradient(135deg, #e86060 0%, #d44848 60%, #c23838 100%);
  border-radius: 10px 16px 4px 6px;
  position: relative;
  filter: blur(0.3px);
  box-shadow: inset 2px -2px 4px rgba(0,0,0,0.15), inset -1px 1px 3px rgba(255,255,255,0.2);
}

.shoe-tongue {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 8px;
  background: linear-gradient(to top, #d44848, #e86868);
  border-radius: 3px 3px 0 0;
  filter: blur(0.3px);
}

.shoe-sole {
  width: 40px;
  height: 6px;
  background: linear-gradient(to bottom, #3a3a3a, #222);
  border-radius: 0 0 4px 4px;
  margin-top: -1px;
}

.shoe-sole-tread {
  position: absolute;
  bottom: -1px;
  left: 2px;
  width: 36px;
  height: 3px;
  background: repeating-linear-gradient(90deg, #222 0px, #222 3px, #333 3px, #333 5px);
  border-radius: 0 0 3px 3px;
}

.shoe-lace {
  position: absolute;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 1px;
  height: 1.5px;
}
.lace-1 { top: 4px; left: 40%; width: 10px; transform: rotate(-15deg); }
.lace-2 { top: 7px; left: 38%; width: 11px; transform: rotate(-10deg); }
.lace-3 { top: 10px; left: 40%; width: 9px; transform: rotate(-5deg); }

.shoe-swoosh {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 18px;
  height: 8px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 0 0 50% 0;
  transform: rotate(-5deg);
}

.dust {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(180, 160, 120, 0.35) 30%, transparent 70%);
  filter: blur(2px);
}
.dust-1 { left: 8%; bottom: 32%; width: 10px; height: 10px; }
.dust-2 { right: 8%; bottom: 38%; width: 7px; height: 7px; }
.dust-3 { left: 42%; bottom: 30%; width: 8px; height: 8px; }

.motion-line {
  position: absolute;
  height: 1.5px;
  background: linear-gradient(to right, rgba(180, 160, 120, 0.3), transparent);
  border-radius: 1px;
}
.ml-1 { bottom: 48%; left: 5%; width: 18px; }
.ml-2 { bottom: 52%; left: 8%; width: 14px; }


/* ============================================
   SCENE: WINE — Candlelit Watercolor
   ============================================ */
.wine-scene {
  background:
    radial-gradient(ellipse at 30% 35%, rgba(120, 80, 60, 0.15) 0%, transparent 50%),
    linear-gradient(180deg, #2a1a35 0%, #3a2548 50%, #4a3028 70%, #5a3d2e 100%);
}

.table-surface {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(180deg, #6b4c3a, #5a3f2e);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.table-cloth {
  position: absolute;
  bottom: 26%;
  left: 0;
  right: 0;
  height: 6%;
  background: rgba(255, 255, 255, 0.06);
  filter: blur(1px);
}

.candle {
  position: absolute;
  bottom: 30%;
  left: 50%;
  transform: translateX(-50%);
}

.candle-body {
  width: 6px;
  height: 16px;
  background: linear-gradient(to right, #f5e6d0, #ebe0c8);
  border-radius: 1px;
  margin: 0 auto;
}

.candle-flame {
  width: 5px;
  height: 8px;
  background: radial-gradient(ellipse at 50% 80%, #ffcc33, #ff8800 60%, transparent);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  margin: 0 auto;
  margin-bottom: -1px;
  animation: flicker 2s ease-in-out infinite alternate;
}

.candle-glow {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  background: radial-gradient(circle, rgba(255, 180, 60, 0.12) 0%, transparent 70%);
  filter: blur(4px);
  animation: flicker 2s ease-in-out infinite alternate;
}

@keyframes flicker {
  0% { opacity: 0.85; transform: translateX(-50%) scaleX(1); }
  50% { opacity: 1; transform: translateX(-48%) scaleX(1.05); }
  100% { opacity: 0.9; transform: translateX(-52%) scaleX(0.95); }
}

.wine-bottle {
  position: absolute;
  bottom: 28%;
  left: 20%;
}

.bottle-foil {
  width: 10px;
  height: 6px;
  background: linear-gradient(to right, #c8a850, #e8c860, #c8a850);
  margin: 0 auto;
  border-radius: 2px 2px 0 0;
}

.bottle-neck {
  width: 8px;
  height: 18px;
  background: linear-gradient(to right, #1e3a1e, #2a4a2a, #1e3a1e);
  margin: 0 auto;
}

.bottle-shoulder {
  width: 14px;
  height: 6px;
  background: linear-gradient(to right, #1e3a1e, #2a4a2a, #1e3a1e);
  margin: 0 auto;
  border-radius: 0 0 2px 2px;
}

.bottle-body {
  width: 22px;
  height: 36px;
  background: linear-gradient(to right, #1e3a1e, #2a4a2a 40%, #3a5a3a 50%, #2a4a2a 60%, #1e3a1e);
  border-radius: 2px 2px 4px 4px;
  margin: 0 auto;
}

.bottle-label {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 12px;
  background: #f5f0e0;
  border-radius: 1px;
  box-shadow: 0 0 2px rgba(0,0,0,0.1);
}

.bottle-label-text {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 1px;
  background: #888;
  box-shadow: 0 3px 0 #888, 0 6px 0 #aaa;
}

.bottle-label-year {
  position: absolute;
  bottom: 13px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 1px;
  background: #999;
}

.bottle-highlight {
  position: absolute;
  top: 30px;
  left: 55%;
  width: 2px;
  height: 30px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.12), transparent);
  border-radius: 1px;
}

.wine-glass {
  position: absolute;
  bottom: 28%;
  right: 20%;
}

.glass-bowl {
  width: 24px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 0 0 12px 12px;
  margin: 0 auto;
  position: relative;
  background: rgba(255, 255, 255, 0.04);
}

.glass-wine {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 17px;
  height: 11px;
  background: linear-gradient(180deg, rgba(139, 34, 82, 0.7), rgba(139, 34, 82, 0.9));
  border-radius: 0 0 9px 9px;
  filter: blur(0.3px);
}

.glass-reflection {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 4px;
  height: 8px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.25), transparent);
  border-radius: 50%;
}

.glass-stem {
  width: 2px;
  height: 14px;
  background: rgba(255, 255, 255, 0.3);
  margin: 0 auto;
}

.glass-base {
  width: 18px;
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 1px;
  margin: 0 auto;
}

.wine-ring {
  position: absolute;
  bottom: 24%;
  right: 16%;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(139, 34, 82, 0.15);
  border-radius: 50%;
}


/* ============================================
   SCENE: BEACH — Soft Watercolor Coast
   ============================================ */
.beach-scene {
  background:
    radial-gradient(ellipse at 75% 15%, rgba(255, 230, 150, 0.3) 0%, transparent 40%),
    linear-gradient(180deg,
      #8ec5db 0%,
      #add8e6 30%,
      #b5dfe8 45%,
      #f0d68a 55%,
      #e8c86a 100%);
}

.sky {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 55%;
}

.sun {
  position: absolute;
  top: 10%;
  right: 16%;
  width: 22px;
  height: 22px;
  background: radial-gradient(circle, #ffe066 30%, rgba(255, 217, 61, 0.4) 70%, transparent);
  border-radius: 50%;
  filter: blur(1px);
}

.sun-glow {
  position: absolute;
  top: 4%;
  right: 10%;
  width: 40px;
  height: 40px;
  background: radial-gradient(circle, rgba(255, 217, 61, 0.2) 0%, transparent 60%);
  border-radius: 50%;
  filter: blur(6px);
}

.beach-cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  filter: blur(3px);
}
.bc-1 { width: 35px; height: 10px; top: 12%; left: 10%; }
.bc-2 { width: 25px; height: 8px; top: 20%; left: 40%; opacity: 0.4; }
.bc-3 { width: 20px; height: 7px; top: 8%; right: 40%; opacity: 0.35; }

.seagull {
  position: absolute;
  width: 10px;
  height: 3px;
  border-top: 1.5px solid rgba(60, 60, 60, 0.4);
  border-radius: 50% 50% 0 0;
}
.seagull::after {
  content: '';
  position: absolute;
  top: -1.5px;
  left: 10px;
  width: 10px;
  height: 3px;
  border-top: 1.5px solid rgba(60, 60, 60, 0.4);
  border-radius: 50% 50% 0 0;
}
.sg-1 { top: 18%; left: 22%; transform: scale(0.8); }
.sg-2 { top: 14%; left: 55%; transform: scale(0.6); }

.ocean {
  position: absolute;
  top: 42%;
  left: 0;
  right: 0;
  height: 14%;
  background: linear-gradient(180deg, #4a9aca, #5ba8d4);
  filter: blur(0.5px);
}

.wave {
  position: absolute;
  height: 6px;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  filter: blur(1px);
}
.wave-1 { top: 44%; }
.wave-2 { top: 49%; width: 80%; left: 10%; }
.wave-3 { top: 53%; width: 60%; left: 25%; opacity: 0.5; }

.foam {
  position: absolute;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  filter: blur(2px);
}
.foam-1 { top: 54%; left: 10%; width: 25px; height: 4px; }
.foam-2 { top: 55%; right: 15%; width: 18px; height: 3px; }

.sand {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 44%;
  background: linear-gradient(180deg, #f0d68a, #e8c86a, #debb60);
}

.umbrella-top {
  width: 28px;
  height: 14px;
  background: linear-gradient(90deg, #e85d5d 50%, #eee 50%);
  border-radius: 14px 14px 0 0;
  filter: blur(0.3px);
}

.umbrella-pole {
  width: 2px;
  height: 20px;
  background: #888;
  margin: 0 auto;
}

.umbrella {
  position: absolute;
  bottom: 22%;
  left: 14%;
}

.beach-towel {
  position: absolute;
  bottom: 16%;
  left: 10%;
  width: 24px;
  height: 8px;
  background: linear-gradient(90deg, #f09050 33%, #fff 33%, #fff 66%, #f09050 66%);
  border-radius: 1px;
  transform: rotate(-5deg);
  filter: blur(0.3px);
}

.shell {
  position: absolute;
  width: 5px;
  height: 4px;
  border-radius: 50% 50% 0 0;
  border: 1px solid rgba(180, 150, 100, 0.5);
  border-bottom: none;
}
.shell-1 { bottom: 10%; right: 25%; transform: rotate(20deg); }
.shell-2 { bottom: 14%; right: 40%; transform: rotate(-10deg); background: rgba(240, 220, 180, 0.3); }

.footprint {
  position: absolute;
  width: 5px;
  height: 8px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 3px 3px 2px 2px;
  filter: blur(0.5px);
}
.fp-1 { bottom: 10%; left: 50%; transform: rotate(-10deg); }
.fp-2 { bottom: 14%; left: 56%; transform: rotate(5deg); }
.fp-3 { bottom: 8%; left: 62%; transform: rotate(-8deg); }
.fp-4 { bottom: 12%; left: 68%; transform: rotate(3deg); }


/* ============================================
   SCENE: BALLET — Dreamy Stage Watercolor
   ============================================ */
.ballet-scene {
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255, 240, 210, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, #1a1a2e 0%, #2a1a3a 40%, #3d2a4a 100%);
}

.stage-floor {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 25%;
  background: linear-gradient(180deg, #5c4033, #4a3228);
  box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.1);
}

.curtain {
  position: absolute;
  top: 0;
  width: 18%;
  height: 80%;
  filter: blur(0.5px);
}

.curtain-left {
  left: 0;
  background: linear-gradient(to right, #6a1530, #5a1228 60%, transparent);
}

.curtain-right {
  right: 0;
  background: linear-gradient(to left, #6a1530, #5a1228 60%, transparent);
}

.curtain-drape {
  position: absolute;
  top: 0;
  width: 25%;
  height: 12%;
}
.curtain-drape-left {
  left: 0;
  background: linear-gradient(135deg, #6a1530 0%, #5a1228 50%, transparent);
  border-radius: 0 0 50% 0;
}
.curtain-drape-right {
  right: 0;
  background: linear-gradient(225deg, #6a1530 0%, #5a1228 50%, transparent);
  border-radius: 0 0 0 50%;
}

.spotlight {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 80%;
  background: radial-gradient(ellipse at 50% 20%, rgba(255, 240, 200, 0.12) 0%, transparent 65%);
}

.spotlight-beam {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 8%;
  height: 100%;
  background: linear-gradient(180deg, rgba(255, 240, 200, 0.08), transparent 80%);
  filter: blur(4px);
}

.dancer {
  position: absolute;
  bottom: 25%;
  left: 50%;
  transform: translateX(-50%);
}

.dancer-head {
  width: 10px;
  height: 10px;
  background: radial-gradient(circle at 40% 40%, #f5d4b8, #e8c0a0);
  border-radius: 50%;
  margin: 0 auto;
  filter: blur(0.2px);
}

.dancer-bun {
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 7px;
  height: 5px;
  background: #4a3020;
  border-radius: 50%;
}

.dancer-hair {
  position: absolute;
  top: 1px;
  left: 50%;
  transform: translateX(-60%);
  width: 12px;
  height: 6px;
  background: #4a3020;
  border-radius: 50% 50% 0 0;
}

.dancer-neck {
  width: 4px;
  height: 4px;
  background: #f0c8a8;
  margin: 0 auto;
}

.dancer-body {
  width: 14px;
  height: 18px;
  background: linear-gradient(to bottom, #e0a0c0, #d890b0);
  border-radius: 5px 5px 0 0;
  margin: 0 auto;
  filter: blur(0.2px);
}

.dancer-tutu {
  width: 34px;
  height: 10px;
  background: radial-gradient(ellipse, rgba(230, 180, 210, 0.7) 40%, rgba(220, 170, 200, 0.3) 70%, transparent);
  border-radius: 50%;
  margin: -3px auto 0;
  filter: blur(0.5px);
}

.dancer-tutu-layer {
  width: 30px;
  height: 8px;
  background: radial-gradient(ellipse, rgba(240, 200, 225, 0.5) 30%, transparent 70%);
  border-radius: 50%;
  margin: -4px auto 0;
  filter: blur(1px);
}

.dancer-leg-standing {
  width: 3px;
  height: 22px;
  background: linear-gradient(to bottom, #f0c8a8, #e8c0a0);
  margin: 0 auto;
}

.dancer-pointe {
  width: 5px;
  height: 4px;
  background: #e8b0c8;
  border-radius: 0 0 2px 2px;
  margin: 0 auto;
}

.dancer-leg-extended {
  position: absolute;
  bottom: 8px;
  left: 50%;
  width: 24px;
  height: 3px;
  background: linear-gradient(to right, #f0c8a8, #e8c0a0);
  border-radius: 0 2px 2px 0;
  transform: rotate(-15deg);
  transform-origin: left center;
  filter: blur(0.2px);
}

.dancer-arm-left {
  position: absolute;
  top: 16px;
  left: -8px;
  width: 18px;
  height: 2.5px;
  background: #f0c8a8;
  border-radius: 2px;
  transform: rotate(-50deg);
  transform-origin: right center;
  filter: blur(0.2px);
}

.dancer-arm-right {
  position: absolute;
  top: 14px;
  right: -12px;
  width: 20px;
  height: 2.5px;
  background: #f0c8a8;
  border-radius: 2px;
  transform: rotate(15deg);
  transform-origin: left center;
  filter: blur(0.2px);
}

.dancer-hand-left {
  position: absolute;
  top: 5px;
  left: -14px;
  width: 3px;
  height: 3px;
  background: #f0c8a8;
  border-radius: 50%;
}

.dancer-hand-right {
  position: absolute;
  top: 16px;
  right: -16px;
  width: 3px;
  height: 3px;
  background: #f0c8a8;
  border-radius: 50%;
}

.ribbon {
  position: absolute;
  height: 1.5px;
  background: rgba(212, 160, 184, 0.5);
  border-radius: 1px;
  filter: blur(0.5px);
}
.ribbon-1 {
  bottom: 26%;
  left: 30%;
  width: 14px;
  transform: rotate(15deg);
}
.ribbon-2 {
  bottom: 28%;
  right: 25%;
  width: 12px;
  transform: rotate(-10deg);
}

.petal {
  position: absolute;
  width: 4px;
  height: 3px;
  background: rgba(220, 120, 150, 0.4);
  border-radius: 50%;
  filter: blur(0.5px);
}
.petal-1 { bottom: 30%; right: 20%; transform: rotate(30deg); }
.petal-2 { bottom: 35%; left: 18%; transform: rotate(-20deg); }
.petal-3 { bottom: 42%; right: 30%; transform: rotate(50deg); width: 3px; }


/* ============================================
   SCENE: LAB — Soft Science Watercolor
   ============================================ */
.lab-scene {
  background:
    radial-gradient(ellipse at 60% 40%, rgba(100, 200, 150, 0.06) 0%, transparent 40%),
    linear-gradient(180deg, #eef2f6 0%, #e4e9ee 100%);
}

.lab-bench {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(180deg, #8a9aa8, #7a8a98);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.15);
}

.lab-shelf {
  position: absolute;
  top: 10%;
  left: 5%;
  right: 5%;
  height: 3px;
  background: rgba(140, 155, 170, 0.3);
  border-radius: 1px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.microscope {
  position: absolute;
  bottom: 30%;
  left: 18%;
}

.micro-base {
  width: 28px;
  height: 6px;
  background: linear-gradient(to right, #2a2a2a, #3a3a3a, #2a2a2a);
  border-radius: 2px;
  margin: 0 auto;
}

.micro-arm {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 36px;
  background: linear-gradient(to right, #3a3a3a, #4a4a4a, #3a3a3a);
  border-radius: 2px;
}

.micro-eyepiece {
  position: absolute;
  bottom: 40px;
  left: 50%;
  width: 12px;
  height: 8px;
  background: linear-gradient(to bottom, #2a2a2a, #3a3a3a);
  border-radius: 3px 3px 5px 5px;
  transform: translateX(-50%) rotate(-20deg);
}

.micro-stage {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: #555;
}

.micro-lens {
  position: absolute;
  bottom: 17px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 7px;
  background: linear-gradient(to bottom, #444, #555);
  border-radius: 0 0 2px 2px;
}

.micro-knob {
  position: absolute;
  bottom: 18px;
  right: -5px;
  width: 5px;
  height: 5px;
  background: #3a3a3a;
  border-radius: 50%;
}

.tube-rack {
  position: absolute;
  bottom: 30%;
  right: 15%;
}

.test-tube {
  position: absolute;
  bottom: 6px;
  width: 5px;
  height: 22px;
  border: 1.5px solid rgba(150, 180, 210, 0.5);
  border-radius: 0 0 3px 3px;
  border-top: none;
  background: rgba(255, 255, 255, 0.3);
}
.tt-1 {
  left: 0;
  background: linear-gradient(to top, rgba(200, 100, 100, 0.4) 40%, rgba(255,255,255,0.3) 40%);
}
.tt-2 {
  left: 8px;
  background: linear-gradient(to top, rgba(100, 180, 200, 0.4) 55%, rgba(255,255,255,0.3) 55%);
}
.tt-3 {
  left: 16px;
  background: linear-gradient(to top, rgba(150, 200, 100, 0.4) 30%, rgba(255,255,255,0.3) 30%);
}

.tube-rack-base {
  position: absolute;
  bottom: 0;
  left: -3px;
  width: 28px;
  height: 7px;
  background: #bbb;
  border-radius: 1px;
}

.petri-dish {
  position: absolute;
  bottom: 30%;
  right: 42%;
  width: 18px;
  height: 10px;
  border: 1.5px solid rgba(150, 180, 210, 0.4);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.petri-culture {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 5px;
  background: radial-gradient(ellipse, rgba(180, 140, 200, 0.4) 40%, transparent);
  border-radius: 50%;
  filter: blur(1px);
}

.dna-helix {
  position: absolute;
  top: 18%;
  right: 10%;
  width: 14px;
  height: 30px;
}

.dna-dot {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  filter: blur(0.3px);
}
.dd-1 { top: 0; left: 0; background: rgba(100, 180, 220, 0.5); }
.dd-2 { top: 0; right: 0; background: rgba(220, 120, 120, 0.5); }
.dd-3 { top: 10px; left: 5px; background: rgba(220, 120, 120, 0.5); }
.dd-4 { top: 10px; right: 5px; background: rgba(100, 180, 220, 0.5); }
.dd-5 { top: 20px; left: 0; background: rgba(100, 180, 220, 0.5); }
.dd-6 { top: 20px; right: 0; background: rgba(220, 120, 120, 0.5); }

.dna-strand {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 12px;
  height: 22px;
  border: 1px solid rgba(100, 180, 220, 0.25);
  border-right: none;
  border-radius: 50% 0 0 50%;
}

.dna-strand-2 {
  border: 1px solid rgba(220, 120, 120, 0.25);
  border-left: none;
  border-radius: 0 50% 50% 0;
  left: auto;
  right: 1px;
}

.notebook {
  position: absolute;
  bottom: 31%;
  left: 8%;
  width: 16px;
  height: 20px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 1px;
  padding: 3px 2px;
}

.notebook-line {
  width: 100%;
  height: 1px;
  background: #ccc;
  margin-bottom: 3px;
}

.notebook-line.nl1::after {
  content: '';
  display: block;
  width: 60%;
  height: 1px;
  background: rgba(80, 80, 200, 0.3);
  margin-top: -1px;
}


/* ============================================
   SCENE: CS/LAPTOP — Cozy Desk Watercolor
   ============================================ */
.cs-scene {
  background:
    radial-gradient(ellipse at 80% 70%, rgba(180, 150, 110, 0.1) 0%, transparent 40%),
    linear-gradient(180deg, #f0ebe0 0%, #e6ddd0 100%);
}

.desk {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 25%;
  background: linear-gradient(180deg, #b8956a, #a88558);
}

.desk-grain {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 25%;
  background: repeating-linear-gradient(
    90deg,
    transparent 0px,
    transparent 8px,
    rgba(255,255,255,0.04) 8px,
    rgba(255,255,255,0.04) 9px
  );
}

.laptop {
  position: absolute;
  bottom: 25%;
  left: 50%;
  transform: translateX(-50%);
}

.laptop-screen {
  width: 64px;
  height: 46px;
  background: #1e1e2e;
  border-radius: 3px 3px 0 0;
  border: 2px solid #555;
  border-bottom: none;
  padding: 0;
  overflow: hidden;
}

.tab-bar {
  display: flex;
  height: 8px;
  background: #15151f;
  border-bottom: 1px solid #333;
}

.tab {
  font-family: monospace;
  font-size: 3px;
  color: #888;
  padding: 1px 3px;
  line-height: 6px;
  white-space: nowrap;
}

.tab-active {
  background: #1e1e2e;
  color: #ccc;
  border-bottom: 1px solid #82aaff;
  margin-bottom: -1px;
}

.tab-so {
  color: #666;
}

.code-line {
  font-family: monospace;
  font-size: 4.5px;
  line-height: 1.65;
  color: #ccc;
  white-space: nowrap;
  padding: 0 3px;
}

.ln {
  color: #555;
  margin-right: 2px;
  display: inline-block;
  width: 6px;
  text-align: right;
}

.kw { color: #c792ea; }
.fn { color: #82aaff; }
.err { color: #f07178; }
.str { color: #c3e88d; }
.error {
  color: #ff5555;
  font-weight: bold;
  background: rgba(255, 50, 50, 0.08);
}
.error-sub {
  color: #888;
  font-size: 3.5px;
  font-style: italic;
  padding-left: 12px;
}

.laptop-base {
  width: 72px;
  height: 4px;
  background: linear-gradient(to bottom, #666, #555);
  border-radius: 0 0 2px 2px;
  margin-left: -4px;
}

.laptop-touchpad {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 1px;
  background: #777;
  border-radius: 0 0 1px 1px;
  margin-top: -2px;
}

.coffee-mug {
  position: absolute;
  bottom: 25%;
  right: 10%;
}

.mug-body {
  width: 14px;
  height: 14px;
  background: linear-gradient(to right, #f5f5f5, #eee);
  border-radius: 0 0 4px 4px;
  border: 2px solid #ddd;
  position: relative;
}

.mug-handle {
  position: absolute;
  top: 2px;
  right: -5px;
  width: 6px;
  height: 8px;
  border: 2px solid #ddd;
  border-left: none;
  border-radius: 0 4px 4px 0;
}

.mug-coffee {
  position: absolute;
  top: 3px;
  left: 3px;
  right: 3px;
  height: 6px;
  background: #5a3a20;
  border-radius: 0 0 2px 2px;
}

.steam {
  position: absolute;
  width: 2px;
  background: rgba(200, 200, 200, 0.35);
  border-radius: 2px;
  filter: blur(0.5px);
}

.s1 {
  height: 8px;
  top: -10px;
  left: 3px;
  animation: steamFloat 2.5s ease-in-out infinite;
}

.s2 {
  height: 6px;
  top: -8px;
  left: 7px;
  animation: steamFloat 2.5s ease-in-out infinite 0.7s;
}

.s3 {
  height: 5px;
  top: -7px;
  left: 10px;
  animation: steamFloat 2.5s ease-in-out infinite 1.3s;
}

@keyframes steamFloat {
  0%, 100% { transform: translateY(0) scaleX(1); opacity: 0.35; }
  50% { transform: translateY(-4px) scaleX(1.3); opacity: 0.08; }
}

.sticky-note {
  position: absolute;
  bottom: 28%;
  left: 10%;
  width: 16px;
  height: 14px;
  background: #fffb8a;
  box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
  transform: rotate(-5deg);
}

.sticky-text {
  font-family: 'Caveat', cursive;
  font-size: 4px;
  color: #888;
  text-align: center;
  padding-top: 4px;
}


/* ============================================
   SCENE: GYM — Iron Watercolor
   ============================================ */
.gym-scene {
  background:
    linear-gradient(180deg, #e0d8c8 0%, #d8d0c0 50%, #ccc4b4 100%);
}

.gym-wall {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 70%;
  background:
    linear-gradient(180deg, #ddd5c5 0%, #d4ccbc 100%);
}

.gym-mirror {
  position: absolute;
  top: 8%;
  left: 25%;
  width: 50%;
  height: 40%;
  background: linear-gradient(135deg, rgba(200, 220, 240, 0.15), rgba(180, 200, 220, 0.08));
  border: 1px solid rgba(180, 180, 180, 0.2);
  border-radius: 1px;
}

.gym-floor {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(180deg, #888078, #7a726a);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.08);
}

.squat-rack {
  position: absolute;
  bottom: 30%;
  left: 50%;
  transform: translateX(-50%);
}

.rack-post {
  position: absolute;
  bottom: 0;
  width: 4px;
  height: 44px;
  background: linear-gradient(to right, #555, #666, #555);
  border-radius: 1px;
}
.rack-post-l { left: -18px; }
.rack-post-r { right: -18px; }

.rack-bar {
  position: absolute;
  bottom: 30px;
  left: -24px;
  width: 52px;
  height: 3px;
  background: linear-gradient(to right, #999, #bbb 30%, #bbb 70%, #999);
  border-radius: 2px;
}

.rack-plate {
  position: absolute;
  bottom: 24px;
  width: 6px;
  height: 16px;
  background: linear-gradient(to right, #333, #444, #333);
  border-radius: 1px;
}
.rack-plate-l { left: -28px; }
.rack-plate-r { right: -28px; }

.rack-hook {
  position: absolute;
  bottom: 28px;
  width: 6px;
  height: 4px;
  background: #555;
  border-radius: 0 0 2px 2px;
}
.rack-hook-l { left: -20px; }
.rack-hook-r { right: -20px; }

.dumbbell {
  position: absolute;
}

.db-floor {
  bottom: 24%;
  right: 12%;
  transform: rotate(8deg);
}

.db-bar {
  width: 28px;
  height: 3px;
  background: linear-gradient(to right, #888, #aaa, #888);
  border-radius: 2px;
  margin: 0 auto;
}

.db-weight {
  position: absolute;
  top: 50%;
  width: 7px;
  height: 12px;
  background: linear-gradient(to right, #3a3a3a, #4a4a4a, #3a3a3a);
  border-radius: 1px;
  transform: translateY(-50%);
}
.db-w-left { left: -2px; }
.db-w-right { right: -2px; }

.water-bottle {
  position: absolute;
  bottom: 30%;
  left: 12%;
}

.wb-cap {
  width: 5px;
  height: 4px;
  background: #555;
  border-radius: 2px 2px 0 0;
  margin: 0 auto;
}

.wb-body {
  width: 8px;
  height: 20px;
  background: linear-gradient(to right, #4a9aca, #5ab5d8, #4a9aca);
  border-radius: 0 0 2px 2px;
  margin: 0 auto;
  position: relative;
}

.wb-water {
  position: absolute;
  bottom: 0;
  left: 1px;
  right: 1px;
  height: 60%;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 0 0 1px 1px;
}

.gym-bag {
  position: absolute;
  bottom: 22%;
  left: 24%;
}

.bag-body {
  width: 20px;
  height: 12px;
  background: linear-gradient(to bottom, #3a3a4a, #2a2a3a);
  border-radius: 2px 2px 4px 4px;
}

.bag-strap {
  position: absolute;
  top: -3px;
  left: 3px;
  width: 14px;
  height: 5px;
  border: 1.5px solid #3a3a4a;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
}

.bag-zipper {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 1px;
  background: #888;
}

.sweat-drop {
  position: absolute;
  width: 4px;
  height: 6px;
  background: radial-gradient(ellipse at 40% 30%, rgba(135, 206, 235, 0.5), rgba(100, 180, 220, 0.3));
  border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
  filter: blur(0.5px);
}
.sd1 { top: 28%; left: 42%; }
.sd2 { top: 22%; right: 32%; transform: rotate(15deg); }
.sd3 { top: 32%; left: 55%; width: 3px; height: 4px; }

.towel {
  position: absolute;
  bottom: 30%;
  right: 8%;
  width: 20px;
  height: 6px;
  background: linear-gradient(90deg, #e85d5d, #d84848);
  border-radius: 1px;
  transform: rotate(-5deg);
  filter: blur(0.3px);
}


/* ============================================
   SCENE: FACEDOWN (FINAL CARD FRONT)
   ============================================ */
.facedown-scene {
  background: linear-gradient(135deg, #c45b4a 0%, #d4755e 50%, #c45b4a 100%);
}

.facedown-pattern {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(255,255,255,0.06) 8px, rgba(255,255,255,0.06) 9px),
    repeating-linear-gradient(-45deg, transparent, transparent 8px, rgba(255,255,255,0.06) 8px, rgba(255,255,255,0.06) 9px);
}

.facedown-heart {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 18px;
  opacity: 0.15;
}

.facedown-heart::before,
.facedown-heart::after {
  content: '';
  position: absolute;
  top: 0;
  width: 12px;
  height: 17px;
  background: #fff;
  border-radius: 12px 12px 0 0;
}
.facedown-heart::before {
  left: 0;
  transform: rotate(-45deg);
  transform-origin: bottom left;
}
.facedown-heart::after {
  right: 0;
  transform: rotate(45deg);
  transform-origin: bottom right;
}

.flip-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Caveat', cursive;
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 700;
  z-index: 1;
}


/* ============================================
   SCENE: VALENTINE (FINAL CARD BACK)
   ============================================ */
.valentine-scene {
  background: linear-gradient(180deg, #fff5f5 0%, #ffe0e0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.heart-container {
  position: relative;
  z-index: 1;
}

.heart {
  width: 40px;
  height: 36px;
  position: relative;
}

.heart::before,
.heart::after {
  content: '';
  position: absolute;
  top: 0;
  width: 22px;
  height: 34px;
  background: linear-gradient(135deg, #d4606a, #c45b4a);
  border-radius: 22px 22px 0 0;
  filter: blur(0.3px);
}

.heart::before {
  left: 0;
  transform: rotate(-45deg);
  transform-origin: bottom left;
}

.heart::after {
  right: 0;
  transform: rotate(45deg);
  transform-origin: bottom right;
}

.heart-shine {
  position: absolute;
  top: 6px;
  left: 8px;
  width: 8px;
  height: 6px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  transform: rotate(-30deg);
  filter: blur(1px);
}

/* Mini illustrations on valentine card */
.mini-runner,
.mini-wine,
.mini-ballet,
.mini-beaker {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  opacity: 0.4;
  filter: blur(0.5px);
}
.mini-runner { top: 15%; left: 15%; background: #e86060; }
.mini-wine { top: 15%; right: 15%; background: #6a3060; }
.mini-ballet { bottom: 20%; left: 15%; background: #d890b0; }
.mini-beaker { bottom: 20%; right: 15%; background: #64c896; }

.sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: radial-gradient(circle, #ffd700 30%, transparent 70%);
  border-radius: 50%;
  animation: sparkleAnim 1.5s ease-in-out infinite;
}

.sp1 { top: 18%; left: 18%; animation-delay: 0s; }
.sp2 { top: 12%; right: 22%; animation-delay: 0.3s; }
.sp3 { bottom: 22%; left: 12%; animation-delay: 0.6s; }
.sp4 { bottom: 18%; right: 18%; animation-delay: 0.9s; }
.sp5 { top: 45%; left: 8%; animation-delay: 1.2s; }
.sp6 { top: 40%; right: 10%; animation-delay: 0.5s; }

@keyframes sparkleAnim {
  0%, 100% { opacity: 0; transform: scale(0); }
  50% { opacity: 1; transform: scale(1); }
}


/* ============================================
   FLIP CARD — Proper 3D CSS Flip
   ============================================ */
.polaroid-final .polaroid-inner {
  background: none;
  box-shadow: none;
  padding: 0;
}

.flip-card {
  position: relative;
  width: 100%;
  perspective: 800px;
}

.flip-face {
  background: var(--polaroid-white);
  padding: 8px 8px 0 8px;
  border-radius: 2px;
  box-shadow:
    0 2px 8px var(--shadow-light),
    0 4px 16px var(--shadow-light);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.flip-front {
  position: relative;
  transform: rotateY(0deg);
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
}

.flip-back {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  transform: rotateY(180deg);
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
}

/* When flipped, front rotates away and back rotates in */
.polaroid-final.flipped .flip-front {
  transform: rotateY(-180deg);
  pointer-events: none;
}

.polaroid-final.flipped .flip-back {
  transform: rotateY(0deg);
  pointer-events: auto;
}

.valentine-caption {
  padding: 12px 6px 16px;
}

.valentine-caption .caption-full {
  font-size: 0.9rem;
  color: var(--caption-color);
  line-height: 1.4;
}

.sign-off {
  font-family: 'Caveat', cursive;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 8px;
}



/* ============================================
   OVERLAY + ACTIVE CONTAINER (Z-Index Fix)
   ============================================ */
.page-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.page-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

/* The active container sits above the overlay, ensuring the expanded
   polaroid is never covered by other cards. */
.active-polaroid-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  pointer-events: none;
}

.active-polaroid-container .polaroid {
  pointer-events: auto;
}


/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 420px) {
  .polaroid-table {
    padding: 0.5rem 0.5rem 6rem;
  }

  .polaroid {
    width: 44%;
  }
}

@media (min-width: 600px) {
  .polaroid-table {
    max-width: 540px;
  }

  .polaroid {
    width: 38%;
  }

  .polaroid-caption {
    padding: 12px 6px 16px;
  }

  .caption-short {
    font-size: 1.1rem;
  }

  .caption-full {
    font-size: 0.9rem;
  }
}

@media (min-width: 900px) {
  .polaroid-table {
    max-width: 700px;
    min-height: 80vh;
  }

  .polaroid {
    width: 32%;
  }
}
