/* ==========================================================================
   AP3 — Asrama Put3 Memories
   Design Theme: Cute Pastel elegant Scrapbook (Pink, Lavender, Gold, Sage)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Outfit:wght@300;400;500;700&display=swap');

/* ── DESIGN SYSTEM TOKENS ── */
:root {
  /* Colors - Light Mode */
  --bg: #fffaf6;
  --bg-alt: #fbf0f4;
  --bg-card: #ffffff;
  --text: #3a2e2a;
  --text-mid: #705950;
  --text-light: #a6928a;
  --border: rgba(242, 167, 195, 0.16);
  --border-med: rgba(242, 167, 195, 0.32);

  /* Scrapbook Accents */
  --pink: #f2a7c3;
  --pink-light: #fde8f0;
  --pink-dark: #d46591;

  --lavender: #c4b5e8;
  --lavender-light: #ede8fa;
  --lavender-dark: #8e78ca;

  --gold: #e8c97e;
  --gold-light: #fdf3d8;
  --gold-dark: #bba14c;

  --sage: #a8c5b5;
  --sage-light: #e8f3ed;
  --sage-dark: #6e947e;

  /* Typography */
  --ff-serif: 'Playfair Display', Georgia, serif;
  --ff-sans: 'DM Sans', system-ui, sans-serif;
  --ff-hand: 'Caveat', cursive;

  /* Borders & Shadows */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 32px;
  --sh-sm: 0 4px 12px rgba(212, 101, 145, 0.06);
  --sh-md: 0 8px 24px rgba(212, 101, 145, 0.10);
  --sh-lg: 0 16px 48px rgba(212, 101, 145, 0.14);

  /* Transitions */
  --ease: cubic-bezier(0.34, 1.56, 0.64, 1);
  /* Playful spring effect */
  --t: 0.3s;
}

/* Dark Mode Cozy Cabin Theme */
body.dark {
  --bg: #1e1926;
  --bg-alt: #16121d;
  --bg-card: #272033;
  --text: #f3eff9;
  --text-mid: #cfc2e2;
  --text-light: #9081a3;
  --border: rgba(196, 181, 232, 0.12);
  --border-med: rgba(196, 181, 232, 0.24);

  --pink-light: #3e2638;
  --lavender-light: #2c213d;
  --gold-light: #3a3225;
  --sage-light: #242f2b;

  --sh-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --sh-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --sh-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--ff-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}

/* Hide standard cursor if trail is active (handled in JS dynamically) */
body.custom-cursor-active {
  cursor: none;
}

body.custom-cursor-active a,
body.custom-cursor-active button,
body.custom-cursor-active input,
body.custom-cursor-active textarea,
body.custom-cursor-active .upload-zone,
body.custom-cursor-active .hero-counter-grid {
  cursor: none;
}

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

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

button {
  font-family: var(--ff-sans);
  border: none;
  background: none;
}

input,
textarea {
  font-family: var(--ff-sans);
  border: none;
  outline: none;
}

textarea {
  resize: vertical;
}

/* ── TYPOGRAPHY ── */
h1,
h2,
h3,
h4 {
  font-family: var(--ff-serif);
  font-weight: 700;
  line-height: 1.15;
}

em {
  font-family: var(--ff-hand);
  font-style: normal;
  font-weight: 700;
  color: var(--pink-dark);
  font-size: 1.15em;
  padding: 0 4px;
}

body.dark em {
  color: var(--pink);
}

/* ── CURSOR TRAIL ── */
#cursorTrail {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
}

.cursor-dot {
  position: fixed;
  width: 12px;
  height: 12px;
  background: var(--pink);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 100000;
  mix-blend-mode: difference;
  transition: width 0.2s, height 0.2s, background-color 0.2s;
}

.cursor-trail-part {
  position: fixed;
  width: 6px;
  height: 6px;
  background: var(--lavender);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  opacity: 0.6;
  z-index: 99999;
}

/* ── CONFETTI CANVAS ── */
#confettiCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
  width: 100%;
  height: 100%;
}

/* ── HERO PARTICLES ── */
.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.hero-sparkle {
  position: absolute;
  pointer-events: none;
  animation: floatUp 6s linear infinite;
  opacity: 0;
}

@keyframes floatUp {
  0% {
    transform: translateY(110vh) translateX(0) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 0.7;
  }

  90% {
    opacity: 0.7;
  }

  100% {
    transform: translateY(-10vh) translateX(50px) rotate(360deg);
    opacity: 0;
  }
}

/* ── BUTTONS ── */
.btn-solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--pink);
  color: #fff;
  border-radius: var(--r-sm);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 12px rgba(242, 167, 195, 0.3);
  transition: all var(--t) var(--ease);
}

.btn-solid:hover {
  background: var(--pink-dark);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 20px rgba(242, 167, 195, 0.45);
}

.btn-solid:active {
  transform: translateY(-1px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: 2px solid var(--pink);
  color: var(--pink-dark);
  background: transparent;
  border-radius: var(--r-sm);
  font-weight: 700;
  font-size: 0.9rem;
  transition: all var(--t) var(--ease);
}

body.dark .btn-outline {
  color: var(--pink);
}

.btn-outline:hover {
  background: var(--pink);
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(242, 167, 195, 0.25);
}

.btn-ghost {
  padding: 10px 20px;
  color: var(--text-mid);
  border: 1.5px solid var(--border-med);
  border-radius: var(--r-sm);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all var(--t);
}

.btn-ghost:hover {
  background: var(--bg-alt);
  border-color: var(--pink);
}

/* ── NAV BAR ── */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 70px;
  transition: all var(--t) var(--ease);
}

#nav.scrolled {
  background: rgba(255, 250, 246, 0.85);
  backdrop-filter: blur(16px);
  box-shadow: var(--sh-sm);
  height: 60px;
  border-bottom: 1.5px solid var(--border);
}

body.dark #nav.scrolled {
  background: rgba(30, 25, 38, 0.88);
}

.nav-brand {
  font-family: var(--ff-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--pink-dark);
  letter-spacing: 0.05em;
  transition: transform var(--t) var(--ease);
}

body.dark .nav-brand {
  color: var(--pink);
}

.nav-brand:hover {
  transform: scale(1.05) rotate(-2deg);
}

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

.nav-links a {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-mid);
  transition: color var(--t);
  position: relative;
}

.nav-links a::after {
  content: '✦';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  font-size: 8px;
  color: var(--pink);
  transition: transform var(--t) var(--ease);
}

.nav-links a:hover {
  color: var(--pink-dark);
}

body.dark .nav-links a:hover {
  color: var(--pink);
}

.nav-links a:hover::after {
  transform: translateX(-50%) scale(1.3);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-action-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border-med);
  background: var(--bg-card);
  color: var(--text-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all var(--t) var(--ease);
}

.nav-action-btn:hover {
  background: var(--pink-light);
  border-color: var(--pink);
  transform: scale(1.1) rotate(15deg);
  color: var(--pink-dark);
}

body.dark .nav-action-btn:hover {
  background: var(--pink-light);
  color: var(--pink);
}

/* ── HERO SECTION ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: 70px;
  background: radial-gradient(circle at 15% 30%, #ffdce8 0%, transparent 45%),
    radial-gradient(circle at 85% 75%, #e1e9ff 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, #fffcf8 0%, #fff6f8 100%);
  text-align: center;
}

body.dark .hero {
  background: radial-gradient(circle at 15% 30%, rgba(242, 167, 195, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(196, 181, 232, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, #201a2b 0%, #15101f 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
  max-width: 1140px;
  width: 100%;
  padding: 80px 24px 40px;
  margin: 0 auto;
  z-index: 2;
  position: relative;
}

.hero-text-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-visual-side {
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: 1.2fr 0.8fr;
    text-align: left;
    padding: 100px 48px 40px;
  }

  .hero-text-side {
    align-items: flex-start;
    text-align: left;
  }
}

/* ── 3D RETRO POLAROID CAMERA ── */
.camera-3d-wrap {
  width: 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.camera-3d {
  width: 180px;
  height: 160px;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(-15deg) rotateY(25deg);
  will-change: transform;
}

/* Base side styles */
.cam-side {
  position: absolute;
  border: 2px solid #28201e;
  border-radius: 8px;
  box-sizing: border-box;
}

/* 6 sides forming the cuboid body */
.cam-front {
  width: 180px;
  height: 160px;
  background: radial-gradient(circle at 50% 50%, #fcf9f5, #eae3da);
  /* warm retro cream with shading */
  transform: translateZ(50px);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.05);
}

.cam-back {
  width: 180px;
  height: 160px;
  background: #3d3432;
  transform: translateZ(-50px) rotateY(180deg);
}

.cam-left {
  width: 100px;
  height: 160px;
  background: #423735;
  /* shadow side */
  left: 40px;
  /* (180 - 100) / 2 */
  transform: rotateY(-90deg) translateZ(90px);
}

.cam-right {
  width: 100px;
  height: 160px;
  background: #2e2624;
  /* deeper shadow side */
  left: 40px;
  transform: rotateY(90deg) translateZ(90px);
}

.cam-top {
  width: 180px;
  height: 100px;
  background: #f5f0eb;
  /* overhead light highlight */
  top: 30px;
  /* (160 - 100) / 2 */
  transform: rotateX(-90deg) translateZ(80px);
  /* corrected rotation sign */
  transform-style: preserve-3d;
}

.cam-bottom {
  width: 180px;
  height: 100px;
  background: #1a1514;
  /* deep bottom occlusion shadow */
  top: 30px;
  transform: rotateX(90deg) translateZ(80px);
  /* corrected rotation sign */
}

/* Rainbow stripe on the front */
.rainbow-stripe {
  width: 22px;
  height: 100%;
  position: absolute;
  left: calc(50% - 11px);
  top: 0;
  background: linear-gradient(90deg, #ff4c4c 20%, #ffa54c 20% 40%, #ffeb4c 40% 60%, #4cff4c 60% 80%, #4ca5ff 80%);
}

/* Flash window */
.flash-window {
  width: 34px;
  height: 34px;
  background: #fffef2;
  border: 2px solid #524440;
  border-radius: 4px;
  position: absolute;
  left: 16px;
  top: 16px;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.flash-glow {
  width: 100%;
  height: 100%;
  background: #ffffff;
  opacity: 0;
  box-shadow: 0 0 20px 10px #ffffff;
}

/* Viewfinder */
.viewfinder-window {
  width: 22px;
  height: 16px;
  background: #15100f;
  border: 2px solid #524440;
  border-radius: 2px;
  position: absolute;
  right: 18px;
  top: 18px;
}

/* Photo printing slot */
.photo-slot {
  width: 124px;
  height: 6px;
  background: #15100f;
  border-radius: 3px;
  position: absolute;
  bottom: 20px;
  left: calc(50% - 62px);
}

/* Stacked lens layers for cylindrical 3D barrel depth */
.lens-layer {
  position: absolute;
  border-radius: 50%;
  border: 2px solid #28201e;
  box-sizing: border-box;
}

.lens-base {
  width: 92px;
  height: 92px;
  background: #3d3432;
  left: 44px;
  top: 34px;
  transform: translateZ(58px);
  /* Z shifted to match depth Z=50px */
}

.lens-middle {
  width: 76px;
  height: 76px;
  background: #1a1514;
  left: 52px;
  top: 42px;
  transform: translateZ(68px);
}

.lens-front {
  width: 60px;
  height: 60px;
  background: #1a222e;
  left: 60px;
  top: 50px;
  transform: translateZ(76px);
  overflow: hidden;
}

.lens-glass {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.25) 0%, transparent 60%), #132435;
  border-radius: 50%;
}

/* Shutter button on top (simplified inheritance) */
.shutter-button {
  width: 22px;
  height: 16px;
  background: #ff4747;
  border: 2px solid #3d1414;
  border-radius: 3px;
  position: absolute;
  left: 20px;
  top: 42px;
  transform: translateZ(6px);
  cursor: pointer;
  transform-style: preserve-3d;
}

/* Printed Photo printout */
.printed-photo {
  position: absolute;
  width: 114px;
  height: 134px;
  left: 33px;
  bottom: -20px;
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
  padding: 6px 6px 20px 6px;
  transform-origin: center top;
  transform: translateZ(49px) translateY(-20px) scaleY(0);
  opacity: 0;
  pointer-events: none;
}

.photo-paper {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.photo-image-placeholder {
  width: 100%;
  height: 84px;
  background: linear-gradient(135deg, var(--pink-light) 0%, var(--lavender-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.photo-caption-handwritten {
  font-family: var(--ff-hand);
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  color: #3a2e2a;
  margin-top: 4px;
  line-height: 1.1;
}

.hero-eyebrow {
  font-family: var(--ff-hand);
  font-size: 1.55rem;
  font-weight: 500;
  color: var(--text-mid);
  margin-bottom: 16px;
  text-transform: none;
  letter-spacing: normal;
  opacity: 0;
}

.hero-title {
  font-family: var(--ff-serif);
  font-size: clamp(3.5rem, 8vw, 5.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  color: var(--text);
  opacity: 0;
}

.hero-title span {
  font-family: var(--ff-hand);
  font-size: 1.25em;
  font-weight: normal;
  background: linear-gradient(135deg, #e08ebb 0%, #a08bee 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  margin-top: -12px;
  transform: rotate(-3deg);
  padding: 0 8px;
}

.hero-sub {
  font-family: var(--ff-sans);
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 460px;
  opacity: 0;
}

.hero-btn {
  background: linear-gradient(135deg, #e08ebb 0%, #a08bee 100%);
  color: white;
  border-radius: 50px;
  padding: 12px 38px;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(224, 142, 187, 0.3);
  transition: all var(--t) var(--ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
}

.hero-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 30px rgba(224, 142, 187, 0.45);
}

.hero-btn:active {
  transform: translateY(-1px);
}

.hero-counter-text {
  font-family: var(--ff-hand);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--lavender-dark);
  margin-top: 24px;
  display: inline-block;
  cursor: pointer;
  transition: transform var(--t) var(--ease);
  opacity: 0;
}

body.dark .hero-counter-text {
  color: var(--pink);
}

.hero-counter-text:hover {
  transform: scale(1.08) rotate(2deg);
}

.hero-counter-text span {
  font-family: var(--ff-serif);
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--pink-dark);
}

body.dark .hero-counter-text span {
  color: var(--pink);
}

.hero-deco {
  position: absolute;
  right: -50px;
  top: 50%;
  transform: translateY(-50%);
  width: 500px;
  height: 500px;
  border: 2px dashed var(--border-med);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.6;
  animation: rotateClockwise 60s linear infinite;
}

.hero-deco::before {
  content: '';
  position: absolute;
  inset: 50px;
  border: 1px solid var(--border);
  border-radius: 50%;
}

@keyframes rotateClockwise {
  from {
    transform: translateY(-50%) rotate(0deg);
  }

  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── STORY / ABOUT SECTION ── */
.about {
  padding: 120px 80px;
  background: var(--bg-alt);
  border-top: 2px dashed var(--border-med);
  border-bottom: 2px dashed var(--border-med);
  position: relative;
  overflow: hidden;
}

.about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(var(--border) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  opacity: 0.4;
  pointer-events: none;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  max-width: 1100px;
  margin: 0 auto;
  align-items: center;
  position: relative;
  z-index: 1;
}

.about-text h2 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  margin-bottom: 24px;
  color: var(--text);
}

.about-text p {
  font-size: 1rem;
  color: var(--text-mid);
  margin-bottom: 20px;
  line-height: 1.7;
}

.label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pink-dark);
  display: inline-block;
  margin-bottom: 12px;
}

body.dark .label {
  color: var(--pink);
}

.about-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  perspective: 1000px;
  transform-style: preserve-3d;
}

/* Scrapbook sticky cards */
.scrap-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-med);
  border-radius: var(--r-sm);
  padding: 28px 20px;
  position: relative;
  box-shadow: var(--sh-sm);
  transform-style: preserve-3d;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  will-change: transform;
}

.scrap-card:nth-child(even) {
  transform: rotate(-1.5deg);
}

.scrap-card:nth-child(odd) {
  transform: rotate(1deg);
}

.scrap-pin {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.4rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.scrap-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 14px;
  transform: translateZ(24px);
  transition: transform 0.3s var(--ease);
}

.scrap-card h4 {
  font-family: var(--ff-serif);
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--text);
  transform: translateZ(12px);
  transition: transform 0.3s var(--ease);
}

.scrap-card p {
  font-size: 0.82rem;
  color: var(--text-mid);
  line-height: 1.5;
  transform: translateZ(12px);
  transition: transform 0.3s var(--ease);
}

/* Color schemes for scrap cards */
.card-pink {
  border-top: 4px solid var(--pink);
}

.card-lavender {
  border-top: 4px solid var(--lavender);
}

.card-gold {
  border-top: 4px solid var(--gold);
}

.card-sage {
  border-top: 4px solid var(--sage);
}

/* ── SECTION HEAD ── */
.section-head {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
}

.section-head h2 {
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  margin-bottom: 12px;
  color: var(--text);
}

.section-head p {
  font-size: 0.95rem;
  color: var(--text-mid);
}

/* ── GALLERY SECTION ── */
.gallery-section {
  padding: 120px 80px;
  background: var(--bg);
}

.upload-zone {
  display: flex;
  max-width: 500px;
  margin: 0 auto 64px;
  border: 2px dashed var(--pink);
  border-radius: var(--r-md);
  padding: 44px;
  cursor: pointer;
  background: var(--bg-card);
  transition: all var(--t) var(--ease);
  box-shadow: var(--sh-sm);
  position: relative;
}

.upload-zone::after {
  content: '📎';
  position: absolute;
  top: -15px;
  left: 24px;
  font-size: 1.5rem;
}

.upload-zone:hover {
  background: var(--bg-alt);
  transform: scale(1.01) translateY(-2px);
  box-shadow: var(--sh-md);
}

.upload-zone.dragover {
  border-color: var(--pink-dark);
  background: var(--pink-light);
  transform: scale(1.02);
}

.upload-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  color: var(--text-mid);
  text-align: center;
}

.upload-inner svg {
  stroke: var(--pink-dark);
}

body.dark .upload-inner svg {
  stroke: var(--pink);
}

.upload-inner p {
  font-weight: 700;
  font-size: 0.95rem;
}

.upload-inner span {
  font-size: 0.78rem;
  color: var(--text-light);
}

/* Polaroid Grid */
.polaroid-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 320px));
  justify-content: center;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  perspective: 1000px;
  transform-style: preserve-3d;
}

.photo-item {
  background: #ffffff;
  /* Always white for polaroid look */
  padding: 16px 16px 44px 16px;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(58, 46, 42, 0.08),
    0 2px 6px rgba(58, 46, 42, 0.04);
  position: relative;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  will-change: transform;
}

/* Semi-transparent tape on top of polaroids */
.photo-item::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%) translateZ(1px);
  width: 90px;
  height: 28px;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(2px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  z-index: 10;
}

/* Random rotations for authentic scrapbook look */
.photo-item:nth-child(3n+1) {
  transform: rotate(-2deg);
}

.photo-item:nth-child(3n+2) {
  transform: rotate(1.5deg);
}

.photo-item:nth-child(3n+3) {
  transform: rotate(-1deg);
}

.photo-item img {
  width: 100%;
  aspect-ratio: 1/1;
  /* Square polaroid photo ratio */
  object-fit: cover;
  border: 1px solid #eee;
  margin-bottom: 16px;
  background-color: #f7f7f7;
  transform: translateZ(24px);
  transition: transform 0.3s var(--ease);
}

.photo-meta {
  text-align: center;
  padding: 0 4px;
  transform: translateZ(12px);
  transition: transform 0.3s var(--ease);
}

.photo-caption {
  font-family: var(--ff-hand);
  font-size: 1.4rem;
  font-weight: 700;
  color: #2b2321;
  /* Always dark on polaroids */
  line-height: 1.15;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.photo-uploader {
  font-family: var(--ff-sans);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8c7671;
}

.photo-delete {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 30px;
  height: 30px;
  background: rgba(212, 101, 145, 0.9);
  color: white;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transform: translateZ(30px);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
}

.photo-delete:hover {
  background: var(--pink-dark);
  transform: translateZ(30px) scale(1.1);
}

.photo-item:hover .photo-delete {
  opacity: 1;
}

/* ── CAPTION MODAL ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(30, 25, 38, 0.7);
  backdrop-filter: blur(10px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  overflow: hidden;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--sh-lg);
  border: 2.5px solid var(--border-med);
  animation: popIn 0.3s var(--ease) both;
}

.modal-box>img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-bottom: 2.5px solid var(--border);
}

.modal-body {
  padding: 32px;
}

.modal-body h3 {
  font-family: var(--ff-serif);
  font-size: 1.35rem;
  margin-bottom: 20px;
  color: var(--text);
}

.modal-body input {
  width: 100%;
  display: block;
  padding: 12px 16px;
  background: var(--bg-alt);
  border: 1.5px solid var(--border-med);
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 14px;
  transition: border-color var(--t);
}

.modal-body input::placeholder {
  color: var(--text-light);
}

.modal-body input:focus {
  border-color: var(--pink);
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 10px;
}

/* ── LIGHTBOX ── */
/* ── LIGHTBOX REDESIGN (SPLIT LAYOUT) ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(22, 18, 29, 0.95);
  backdrop-filter: blur(20px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.lightbox.open {
  display: flex;
}

.lb-container {
  position: relative;
  max-width: 960px;
  width: 100%;
  height: 85vh;
  max-height: 680px;
  display: flex;
  animation: popIn 0.3s var(--ease) both;
}

.lb-content {
  display: flex;
  flex-direction: row;
  background: var(--bg-card);
  border-radius: var(--r-md);
  width: 100%;
  height: 100%;
  box-shadow: var(--sh-lg), 0 24px 64px rgba(0, 0, 0, 0.5);
  border: 3px solid var(--border-med);
  overflow: hidden;
}

.lb-image-wrapper {
  flex: 1.2;
  background: #110d16;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.lb-image-wrapper img {
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain;
  border: 8px solid #fff !important;
  border-bottom: 28px solid #fff !important;
  border-radius: 2px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
  transform: rotate(-1.5deg);
  animation: popIn 0.3s var(--ease) both;
}

.lb-info-panel {
  flex: 0.8;
  display: flex;
  flex-direction: column;
  border-left: 2px dashed var(--border-med);
  background: var(--bg-card);
  height: 100%;
  text-align: left;
}

.lb-drag-handle {
  display: none;
}

.lb-header {
  padding: 24px;
  border-bottom: 1.5px solid var(--border);
  background: var(--bg-alt);
}

.lb-filters-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  border-bottom: 1.5px solid var(--border);
  background: var(--bg-card);
  flex-shrink: 0;
}

.filters-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-label {
  font-family: var(--ff-sans);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-mid);
}

.filter-btn {
  font-family: var(--ff-sans);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1.5px solid var(--border-med);
  background: var(--bg-alt);
  color: var(--text-mid);
  cursor: pointer;
  transition: all var(--t) var(--ease);
}

.filter-btn.active, .filter-btn:hover {
  border-color: var(--pink);
  background: var(--pink);
  color: white;
}

.lb-filter-normal img, img.lb-filter-normal { filter: none !important; }
.lb-filter-polaroid img, img.lb-filter-polaroid { filter: sepia(0.15) contrast(1.1) brightness(1.05) saturate(1.2) !important; }
.lb-filter-sepia img, img.lb-filter-sepia { filter: sepia(0.65) contrast(0.85) brightness(0.95) !important; }
.lb-filter-sunset img, img.lb-filter-sunset { filter: saturate(1.45) hue-rotate(-12deg) contrast(1.05) !important; }
.lb-filter-manga img, img.lb-filter-manga { filter: grayscale(1) contrast(1.8) brightness(1.15) !important; }

.lb-caption {
  font-family: var(--ff-hand);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.lb-comments-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px;
  overflow: hidden;
}

.comments-title {
  font-family: var(--ff-sans);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-mid);
  margin-bottom: 12px;
}

.lb-comments-list {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 16px;
  padding-right: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comments-loading,
.comments-empty {
  font-family: var(--ff-sans);
  font-size: 0.85rem;
  color: var(--text-light);
  text-align: center;
  padding: 24px 0;
}

.comments-empty {
  font-style: italic;
}

/* Comment Item */
.comment-item {
  background: var(--bg-alt);
  padding: 10px 14px;
  border-radius: var(--r-sm);
  border-left: 3px solid var(--pink);
  font-size: 0.85rem;
  animation: commentFadeIn 0.3s ease both;
}

@keyframes commentFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.comment-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.comment-author {
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 4px;
}

.comment-author.verified-member {
  color: var(--pink-dark);
}

body.dark .comment-author.verified-member {
  color: var(--pink);
}

.verified-badge-img {
  height: 14px;
  width: auto;
  vertical-align: middle;
  margin-left: 4px;
  flex-shrink: 0;
}

.verified-badge-img.verified-light {
  display: inline-block;
}

.verified-badge-img.verified-dark {
  display: none;
}

body.dark .verified-badge-img.verified-light {
  display: none !important;
}

body.dark .verified-badge-img.verified-dark {
  display: inline-block !important;
}

.comment-date {
  font-size: 0.7rem;
  color: var(--text-light);
}

.comment-text {
  color: var(--text-mid);
  line-height: 1.4;
  word-break: break-word;
}

/* Comment Form */
.lb-comment-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1.5px dashed var(--border-med);
  padding-top: 16px;
}

.comment-author-row input {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-alt);
  border: 1.5px solid var(--border-med);
  border-radius: var(--r-sm);
  font-size: 0.82rem;
  color: var(--text);
}

.comment-input-row {
  display: flex;
  gap: 8px;
}

.comment-input-row input {
  flex: 1;
  padding: 8px 12px;
  background: var(--bg-alt);
  border: 1.5px solid var(--border-med);
  border-radius: var(--r-sm);
  font-size: 0.82rem;
  color: var(--text);
}

.comment-submit-btn {
  background: var(--pink);
  color: white;
  border-radius: var(--r-sm);
  padding: 0 16px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--t);
}

.comment-submit-btn:hover {
  background: var(--pink-dark);
}

/* Member Card - Self card glowing and badge */
.member-card.is-self-card {
  box-shadow: 0 0 16px var(--mc), var(--sh-md) !important;
  border: 2px solid var(--mc) !important;
}

.member-self-badge {
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%) translateZ(12px);
  background: var(--pink-dark);
  color: white;
  font-family: var(--ff-sans);
  font-weight: 700;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 20px;
  box-shadow: var(--sh-sm);
  white-space: nowrap;
  z-index: 12;
  border: 1.5px solid white;
}

body.dark .member-self-badge {
  background: var(--pink);
  color: #1a1413;
  border-color: var(--bg-card);
}

/* Responsive Lightbox */
@media (max-width: 768px) {
  .lightbox {
    padding: 16px;
  }
  .lb-container {
    width: 100%;
    height: 90vh;
    max-height: none;
  }
  .lb-content {
    flex-direction: column;
    height: 100%;
    max-height: none;
  }
  .lb-close {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    background: rgba(0, 0, 0, 0.55);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  }
  .lb-image-wrapper {
    flex: 0 0 38%;
    height: 38%;
    padding: 16px;
  }
  .lb-image-wrapper img {
    border: 5px solid #fff !important;
    border-bottom: 16px solid #fff !important;
  }
  .lb-info-panel {
    flex: 0 0 62%;
    height: 62%;
    border-left: none;
    border-top: 2px dashed var(--border-med);
    overflow: hidden;
  }
  .lb-drag-handle {
    display: block;
    width: 48px;
    height: 6px;
    background: var(--text-light);
    opacity: 0.5;
    border-radius: 3px;
    margin: 10px auto 4px auto;
    cursor: grab;
    flex-shrink: 0;
    touch-action: none;
  }
  .lb-drag-handle:active {
    cursor: grabbing;
    opacity: 0.8;
  }
  .lb-header {
    padding: 16px;
  }
  .lb-comments-section {
    padding: 16px;
  }
}

.lb-close {
  position: absolute;
  top: -20px;
  right: -20px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.3rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 10;
  cursor: pointer;
}

.lb-close:hover {
  background: var(--pink);
  color: white;
  border-color: var(--pink);
  transform: rotate(90deg) scale(1.05);
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t);
}

.lb-nav:hover {
  background: var(--pink);
  color: white;
}

.lb-prev {
  left: 24px;
}

.lb-next {
  right: 24px;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ── MEMBERS SECTION ── */
.members-section {
  padding: 120px 80px;
  background: var(--bg-alt);
  border-top: 2px dashed var(--border-med);
  position: relative;
  overflow: hidden;
}

.member-form {
  display: grid;
  grid-template-columns: 1.2fr 1.5fr 1fr 1.2fr;
  gap: 20px;
  align-items: flex-end;
  background: var(--bg-card);
  padding: 28px;
  border-radius: var(--r-md);
  border: 2px dashed var(--border-med);
  box-shadow: var(--sh-sm);
  max-width: 1000px;
  margin: 0 auto 64px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.form-group label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-mid);
}

.form-group input[type="text"],
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-alt);
  border: 1.5px solid var(--border-med);
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  color: var(--text);
  transition: all var(--t) var(--ease);
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(242, 167, 195, 0.15);
  background: var(--bg-card);
}

.color-picker-custom {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-alt);
  border: 1.5px solid var(--border-med);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  height: 48px;
}

.color-picker-custom input[type="color"],
#statusColorInput {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border: none !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  cursor: pointer;
  background: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-block;
  vertical-align: middle;
}

.color-picker-custom input[type="color"]::-webkit-color-swatch-wrapper,
#statusColorInput::-webkit-color-swatch-wrapper {
  padding: 0 !important;
}

.color-picker-custom input[type="color"]::-webkit-color-swatch,
#statusColorInput::-webkit-color-swatch {
  border: 1.5px solid rgba(0, 0, 0, 0.15) !important;
  border-radius: 50% !important;
  padding: 0 !important;
}

.color-val-hex {
  font-family: monospace;
  font-size: 0.82rem;
  color: var(--text-mid);
  font-weight: bold;
}

.btn-group .btn-solid {
  height: 48px;
  width: 100%;
}

.members-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  perspective: 1000px;
  transform-style: preserve-3d;
}

/* Student ID card / Snapshots design for members */
.member-card {
  flex: 0 1 210px;
  width: 210px;
  background: var(--bg-card);
  border: 2px solid var(--border-med);
  border-radius: var(--r-md);
  padding: 32px 20px;
  text-align: center;
  position: relative;
  box-shadow: var(--sh-sm);
  transform-style: preserve-3d;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  overflow: visible;
  will-change: transform;
}

.member-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--mc, var(--pink));
  transform: translateZ(1px);
  border-top-left-radius: var(--r-md);
  border-top-right-radius: var(--r-md);
}

.member-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--sh-md);
  border-color: var(--mc, var(--pink));
}

.member-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  border: 3px solid var(--bg-card);
  transform: translateZ(24px);
  transition: transform 0.3s var(--ease);
  overflow: hidden;
  background: var(--mc, var(--pink));
}

.member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.member-name {
  font-family: var(--ff-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  transform: translateZ(12px);
  transition: transform 0.3s var(--ease);
}

.member-tag {
  display: inline-block;
  font-family: var(--ff-sans);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--mc);
  color: var(--mtc, #2b2321);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transform: translateZ(12px);
  transition: all 0.3s var(--ease);
  letter-spacing: 0.2px;
}

body.dark .member-tag {
  color: var(--mtc, #1a1413);
}

.member-del {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.72rem;
  color: var(--text-light);
  opacity: 0;
  transition: opacity var(--t) var(--ease), color var(--t);
  background: none;
  cursor: pointer;
}

.member-del:hover {
  color: var(--pink-dark);
}

.member-card:hover .member-del {
  opacity: 1;
}

/* ── GUESTBOOK SECTION ── */
.guestbook-section {
  padding: 120px 80px;
  background: var(--bg);
  overflow: hidden;
}

.guestbook-form {
  max-width: 650px;
  margin: 0 auto 64px;
  background: var(--bg-card);
  padding: 32px;
  border-radius: var(--r-md);
  border: 2px dashed var(--border-med);
  box-shadow: var(--sh-sm);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.char-count {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-light);
}

@media (max-width: 580px) {
  .form-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .char-count {
    text-align: right;
  }

}

/* Corkboard texture for messages */
.corkboard-container {
  max-width: 1100px;
  margin: 0 auto;
  border: 12px solid #5a4238;
  /* Wooden border */
  border-radius: var(--r-sm);
  box-shadow: var(--sh-lg);
  position: relative;
  overflow: visible;
}

.corkboard-texture {
  position: absolute;
  inset: 0;
  background-color: #cd9a62;
  background-image: radial-gradient(rgba(0, 0, 0, 0.15) 15%, transparent 16%),
    radial-gradient(rgba(0, 0, 0, 0.15) 15%, transparent 16%);
  background-size: 60px 60px;
  background-position: 0 0, 30px 30px;
  opacity: 0.75;
  pointer-events: none;
}

body.dark .corkboard-container {
  border-color: #2b1f1a;
}

body.dark .corkboard-texture {
  background-color: #5c432d;
  opacity: 0.6;
}

.corkboard-viewport {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 40px 60px;
}

.corkboard {
  position: relative;
  z-index: 1;
  display: flex;
  transition: transform 0.4s var(--ease);
  gap: 32px;
  perspective: 1000px;
  transform-style: preserve-3d;
}

.corkboard-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  background: rgba(90, 66, 56, 0.95);
  color: #fdf3d8;
  border: 2.5px solid #cd9a62;
  border-radius: 50%;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t) var(--ease);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.corkboard-nav-btn:hover {
  background: #cd9a62;
  color: #5a4238;
  transform: translateY(-50%) scale(1.1);
}

.corkboard-nav-btn.prev-btn {
  left: 16px;
}

.corkboard-nav-btn.next-btn {
  right: 16px;
}

/* Sticky notes */
.msg-card {
  flex: 0 0 calc((100% - 2 * 32px) / 3);
  box-sizing: border-box;
  background: #fdf3d8;
  /* default gold/cream sticky note */
  border-radius: 2px;
  padding: 28px 24px 20px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.05);
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

/* Adhesive tape on top */
.msg-card::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%) rotate(-1deg) translateZ(1px);
  width: 75px;
  height: 22px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(1px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Pushpin details */
.msg-card::after {
  content: '📍';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%) translateZ(25px);
  font-size: 1.25rem;
  z-index: 10;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
}

/* Random tiny rotation */
.msg-card:nth-child(4n+1) {
  transform: rotate(-1.8deg);
  background: #fde8f0;
}

/* Pink */
.msg-card:nth-child(4n+2) {
  transform: rotate(1.5deg);
  background: #ede8fa;
}

/* Lavender */
.msg-card:nth-child(4n+3) {
  transform: rotate(-1.2deg);
  background: #fdf3d8;
}

/* Gold */
.msg-card:nth-child(4n+4) {
  transform: rotate(2deg);
  background: #e8f3ed;
}

/* Sage */

/* Dark mode compatibility (always keep sticky notes colorful, but slightly less bright if dark mode) */
body.dark .msg-card {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

body.dark .msg-card:nth-child(4n+1) {
  background: #fee2eb;
}

body.dark .msg-card:nth-child(4n+2) {
  background: #e7e0f8;
}

body.dark .msg-card:nth-child(4n+3) {
  background: #fdf0ca;
}

body.dark .msg-card:nth-child(4n+4) {
  background: #dcece3;
}

.msg-card:hover {
  transform: translateY(-8px) rotate(0deg) scale(1.02);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.16);
  z-index: 5;
}

.msg-qmark {
  display: none;
  /* remove default big quote marks */
}

.msg-text {
  font-family: var(--ff-hand);
  font-size: 1.25rem;
  font-weight: 700;
  color: #312724;
  /* Keep text dark readable on note background */
  line-height: 1.35;
  margin-bottom: 20px;
  min-height: 70px;
  word-wrap: break-word;
  transform: translateZ(20px);
  transition: transform 0.3s var(--ease);
}

.msg-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px dashed rgba(0, 0, 0, 0.1);
  padding-top: 10px;
  transform: translateZ(10px);
  transition: transform 0.3s var(--ease);
}

.msg-author {
  font-family: var(--ff-hand);
  font-size: 1.2rem;
  font-weight: 700;
  color: #5a4a46;
}

.msg-date {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #92837f;
}

.msg-del {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  background: rgba(212, 101, 145, 0.85);
  color: white !important;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: opacity var(--t) var(--ease), background var(--t), transform var(--t) var(--ease);
  z-index: 6;
  cursor: pointer;
  border: none;
}

.msg-del:hover {
  background: var(--pink-dark);
  color: white !important;
  transform: scale(1.1) rotate(90deg);
}

.msg-card:hover .msg-del {
  opacity: 1;
}

/* ── EMPTY STATE ── */
.empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-light);
  font-family: var(--ff-hand);
  font-size: 1.3rem;
  font-weight: 700;
  grid-column: 1 / -1;
}

/* ── RETRO CASSETTE MUSIC PLAYER WIDGET ── */
.cassette-player {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  width: 250px;
  background: #2b2321;
  /* Cassette dark case */
  border: 4px solid #5a4238;
  border-radius: var(--r-sm);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
  padding: 12px;
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease), box-shadow var(--t) var(--ease);
}

.cassette-player.hidden {
  transform: translateY(200px) scale(0.8) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.cassette-player:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

body.dark .cassette-player {
  border-color: var(--border-med);
}

/* Close button inside cassette */
.cassette-close {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 24px;
  height: 24px;
  background: #ff5e97;
  color: white;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.2px solid #2b2321;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  z-index: 10;
  transition: transform var(--t) var(--ease), background var(--t);
}

.cassette-close::after {
  content: '';
  position: absolute;
  inset: -10px;
  /* Expands clickable touch target area */
  cursor: pointer;
}

.cassette-close:hover {
  transform: scale(1.15) rotate(90deg);
  background: #d46591;
}

/* Floating note trigger when cassette is hidden */
.music-floating-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 998;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--pink);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  border: 3.5px solid #ffffff;
  box-shadow: var(--sh-md);
  cursor: pointer;
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease), box-shadow var(--t) var(--ease);
}

body.dark .music-floating-trigger {
  border-color: var(--bg-card);
  background: var(--pink-dark);
}

.music-floating-trigger.hidden {
  transform: scale(0) rotate(-45deg) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.music-floating-trigger:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: var(--sh-lg);
  background: var(--pink-dark);
}

body.dark .music-floating-trigger:hover {
  background: var(--pink);
}

.cassette-body {
  background: #40322d;
  border-radius: var(--r-sm);
  padding: 10px;
  margin-bottom: 10px;
  border: 2px solid #1a1413;
  position: relative;
}

.cassette-label {
  background: #fdf3d8;
  /* Vintage paper label */
  border-radius: 4px;
  padding: 8px;
  border: 1px solid #1a1413;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cassette-stripes {
  height: 4px;
  background: linear-gradient(90deg, var(--pink) 0%, var(--lavender) 33%, var(--gold) 66%, var(--sage) 100%);
  border-radius: 1px;
}

.cassette-title-wrap {
  background: #1a1413;
  color: var(--gold);
  border-radius: 2px;
  padding: 4px 8px;
  height: 24px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
}

.cassette-title {
  font-family: monospace;
  font-size: 0.72rem;
  white-space: nowrap;
  position: absolute;
  animation: marquee 10s linear infinite;
  animation-play-state: paused;
}

.playing .cassette-title {
  animation-play-state: running;
}

@keyframes marquee {
  0% {
    transform: translateX(100%);
  }

  100% {
    transform: translateX(-100%);
  }
}

.cassette-window {
  height: 32px;
  background: #1a1413;
  border-radius: 16px;
  border: 2px solid #5a4238;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 20px;
  position: relative;
}

.cassette-window::before {
  content: '';
  position: absolute;
  inset: 6px 36px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.cassette-reel {
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  border: 4px double #1a1413;
  position: relative;
  transition: transform 0.1s linear;
}

.playing .cassette-reel {
  animation: spinReel 3s linear infinite;
}

.spoke-pattern {
  position: absolute;
  inset: 0;
}

.spoke-pattern::before,
.spoke-pattern::after {
  content: '';
  position: absolute;
  background: #1a1413;
}

.spoke-pattern::before {
  top: 0;
  bottom: 0;
  left: 42%;
  right: 42%;
}

.spoke-pattern::after {
  left: 0;
  right: 0;
  top: 42%;
  bottom: 42%;
}

@keyframes spinReel {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.cassette-type {
  font-family: monospace;
  font-size: 0.55rem;
  text-align: center;
  color: #705950;
  font-weight: bold;
}

.cassette-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-btn {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: #40322d;
  color: #fff;
  border: 1.5px solid #1a1413;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: background var(--t);
  cursor: pointer;
}

.player-btn:hover {
  background: #5a4238;
}

.player-btn:active {
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
  transform: translateY(1px);
}

.volume-container {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  background: #1a1413;
  padding: 4px 8px;
  border-radius: 4px;
}

.vol-icon {
  font-size: 0.65rem;
}

.vol-slider {
  flex: 1;
  -webkit-appearance: none;
  background: #40322d;
  height: 4px;
  border-radius: 2px;
  outline: none;
}

.vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pink);
  cursor: pointer;
  border: 1px solid #1a1413;
}

/* ── FOOTER ── */
.footer {
  padding: 80px 48px;
  text-align: center;
  background: var(--bg-alt);
  border-top: 2px dashed var(--border-med);
}

.footer-brand {
  font-family: var(--ff-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--pink-dark);
  margin-bottom: 12px;
}

body.dark .footer-brand {
  color: var(--pink);
}

.footer-tag {
  font-size: 0.9rem;
  color: var(--text-mid);
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border-med);
  border-radius: 4px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--pink);
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .msg-card {
    flex: 0 0 calc((100% - 1 * 32px) / 2);
  }
}

@media (max-width: 768px) {
  #nav {
    padding: 0 24px;
  }

  .nav-links {
    display: none;
    /* Simplification for mobile view */
  }

  .hero-inner {
    padding: 100px 24px 60px;
  }

  /* Hide the large rotating dashed circle — too big on mobile, clips the camera */
  .hero-deco {
    display: none;
  }

  /* Scale camera down on mobile so printed polaroid has room */
  .camera-3d-wrap {
    width: 240px;
    height: 240px;
    transform: scale(0.85);
  }

  .about,
  .gallery-section,
  .members-section,
  .guestbook-section,
  .footer {
    padding-left: 24px;
    padding-right: 24px;
  }

  .hero-counter-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .polaroid-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 92%;
    max-width: 440px;
    margin: 0 auto;
    gap: 12px;
    padding: 24px 0 32px 0;
    perspective: none !important;
    transform-style: flat !important;
    touch-action: auto !important;
  }

  .polaroid-gallery::-webkit-scrollbar {
    display: none;
  }

  .polaroid-gallery .photo-item {
    width: 100%;
    max-width: 100%;
    padding: 6px 6px 16px 6px;
    /* remove rotations in carousel — they cause top/bottom misalignment */
    transform: none !important;
    transform-style: flat !important;
    touch-action: auto !important;
    animation: polaroidFadeIn 0.4s var(--ease) both;
  }

  .polaroid-gallery .photo-item::before {
    width: 40px;
    height: 12px;
    top: -6px;
  }

  .polaroid-gallery .photo-item img {
    margin-bottom: 6px;
  }

  .polaroid-gallery .photo-caption {
    font-size: 0.82rem;
    margin-bottom: 1px;
  }

  .polaroid-gallery .photo-uploader {
    font-size: 0.52rem;
  }

  .polaroid-gallery .photo-delete {
    width: 20px;
    height: 20px;
    top: 10px;
    right: 10px;
    font-size: 0.6rem;
  }

  @keyframes polaroidFadeIn {
    from {
      opacity: 0;
      transform: scale(0.88) translateY(12px) !important;
    }
    to {
      opacity: 1;
      transform: scale(1) translateY(0) !important;
    }
  }

  .polaroid-gallery .photo-item:nth-child(1) { animation-delay: 0ms; }
  .polaroid-gallery .photo-item:nth-child(2) { animation-delay: 60ms; }
  .polaroid-gallery .photo-item:nth-child(3) { animation-delay: 120ms; }
  .polaroid-gallery .photo-item:nth-child(4) { animation-delay: 180ms; }

  .members-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
  }

  .members-grid .member-card {
    flex: 0 1 calc(50% - 12px);
    width: calc(50% - 12px);
  }

  .member-form {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .lb-prev {
    left: 12px;
  }

  .lb-next {
    right: 12px;
  }

  .cassette-player {
    bottom: 16px;
    right: 16px;
    width: 220px;
    padding: 8px;
  }

  .cassette-window {
    padding: 0 10px;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .members-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .members-grid .member-card {
    flex: 0 1 calc(50% - 6px);
    width: calc(50% - 6px);
  }

  .member-card {
    padding: 20px 10px;
  }

  .member-avatar {
    width: 64px;
    height: 64px;
    margin-bottom: 12px;
  }

  .member-name {
    font-size: 1rem;
  }

  .member-tag {
    font-size: 0.62rem;
    padding: 3px 8px;
  }
}

/* ── TOUCH DEVICE: always show delete buttons (no hover on mobile) ── */
@media (hover: none) {
  /* Photo delete button */
  .photo-delete {
    opacity: 1 !important;
    width: 28px;
    height: 28px;
    top: 10px;
    right: 10px;
    font-size: 0.75rem;
  }

  /* Member card delete button */
  .member-del {
    opacity: 1 !important;
    font-size: 0.8rem;
    background: rgba(212, 101, 145, 0.15);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Sticky note delete button */
  .msg-del {
    opacity: 1 !important;
    background: rgba(212, 101, 145, 0.9) !important;
    color: white !important;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 10px;
    right: 10px;
    font-size: 0.8rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  }
}

/* ── 3D OPEN DIARY/BOOK ── */
.book-3d-wrap {
  width: 140px;
  height: 100px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 800px;
}

.book-3d {
  width: 120px;
  height: 80px;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(20deg) rotateY(-20deg);
  will-change: transform;
}

.book-cover {
  position: absolute;
  height: 84px;
  background: var(--pink-dark);
  border: 1.5px solid #28201e;
  border-radius: 3px;
  box-sizing: border-box;
}

.book-cover-left {
  width: 62px;
  right: 60px;
  transform-origin: right center;
  transform: rotateY(-22deg) translateZ(-2px);
  box-shadow: inset -5px 0 10px rgba(0,0,0,0.15);
}

.book-cover-right {
  width: 62px;
  left: 60px;
  transform-origin: left center;
  transform: rotateY(22deg) translateZ(-2px);
  box-shadow: inset 5px 0 10px rgba(0,0,0,0.15);
}

.book-spine {
  position: absolute;
  left: 58px;
  width: 4px;
  height: 84px;
  background: #3d1414;
  border-radius: 1px;
  transform: translateZ(-2px);
}

.book-page {
  position: absolute;
  height: 80px;
  background: #fffdf5;
  border: 1px solid #c9b0a6;
  box-sizing: border-box;
}

.book-page-left {
  width: 60px;
  right: 60px;
  transform-origin: right center;
  transform: rotateY(-20deg);
  border-radius: 3px 0 0 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-page-right {
  width: 60px;
  left: 60px;
  transform-origin: left center;
  transform: rotateY(20deg);
  border-radius: 0 3px 3px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-content {
  font-family: var(--ff-hand);
  font-size: 0.95rem;
  font-weight: 700;
  color: #5a4b46;
  user-select: none;
}

/* ── 3D GOLD STAR BADGE ── */
.star-3d-wrap {
  width: 100px;
  height: 100px;
  margin: 16px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 600px;
}

.star-3d {
  width: 60px;
  height: 60px;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateY(0deg);
  will-change: transform;
}

.star-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.8rem;
  line-height: 1;
  color: var(--gold);
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
  user-select: none;
}

/* ── 3D LETTER ENVELOPE ── */
.guestbook-input-area {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
  max-width: 900px;
  margin: 0 auto 64px;
}

@media (min-width: 768px) {
  .guestbook-input-area {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.envelope-3d-wrap {
  width: 220px;
  height: 160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 800px;
}

.envelope-3d {
  width: 160px;
  height: 110px;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(15deg) rotateY(-15deg);
  will-change: transform;
}

.env-back {
  position: absolute;
  inset: 0;
  background: var(--pink-light);
  border: 1.5px solid #28201e;
  border-radius: 6px;
  transform: translateZ(-4px);
  box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}

.env-letter {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 140px;
  height: 90px;
  background: #ffffff;
  border: 1px solid #e2d2ca;
  border-radius: 4px;
  padding: 8px;
  box-sizing: border-box;
  transform: translateZ(0px);
  transform-origin: center bottom;
  will-change: transform;
}

.letter-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  border: 1px dashed rgba(242, 167, 195, 0.4);
  font-family: var(--ff-hand);
  font-size: 1rem;
  font-weight: 700;
  color: var(--pink-dark);
}
.letter-content p {
  line-height: 1.2;
}

.env-front-left {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 80px;
  background: var(--pink-light);
  border-left: 1.5px solid #28201e;
  border-bottom: 1.5px solid #28201e;
  border-radius: 6px 0 0 6px;
  clip-path: polygon(0% 0%, 100% 50%, 0% 100%);
  transform: translateZ(4px);
}

.env-front-right {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 80px;
  background: var(--pink-light);
  border-right: 1.5px solid #28201e;
  border-bottom: 1.5px solid #28201e;
  border-radius: 0 6px 6px 0;
  clip-path: polygon(100% 0%, 0% 50%, 100% 100%);
  transform: translateZ(4px);
}

.env-front-bottom {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 60px;
  background: #fde0eb;
  border-bottom: 1.5px solid #28201e;
  border-radius: 0 0 6px 6px;
  clip-path: polygon(0% 100%, 50% 0%, 100% 100%);
  transform: translateZ(5px);
}

.env-top-flap {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 60px;
  background: var(--pink-light);
  border-top: 1.5px solid #28201e;
  border-radius: 6px 6px 0 0;
  clip-path: polygon(0% 0%, 50% 100%, 100% 0%);
  transform-origin: center top;
  transform: translateZ(6px) rotateX(0deg);
  will-change: transform;
}

/* ── GALLERY VIEW MORE BUTTON ── */
.gallery-more-wrap {
  text-align: center;
  margin-top: 48px;
  width: 100%;
}

.gallery-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 36px;
  border-radius: 30px;
  box-shadow: var(--sh-md);
  transition: all var(--t) var(--ease);
}

.gallery-more-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: var(--sh-lg);
}

@media (max-width: 580px) {
  .msg-card {
    flex: 0 0 100%;
    min-height: 240px;
  }

  .msg-text {
    min-height: 130px;
  }

  .corkboard-viewport {
    padding: 30px 48px;
  }

  .corkboard-nav-btn {
    width: 36px;
    height: 36px;
    font-size: 1.4rem;
    border-width: 2px;
  }

  .corkboard-nav-btn.prev-btn {
    left: 8px;
  }

  .corkboard-nav-btn.next-btn {
    right: 8px;
  }
}

/* ── CUSTOM ALERT / CONFIRM DIALOGS ── */
#ap3-dialog-overlay,
#ap3-alert-overlay,
#ap3-confirm-overlay {
  z-index: 1100;
}

.dialog-box {
  max-width: 400px;
  width: 100%;
  border-radius: var(--r-md);
  border: 3px solid var(--pink);
  background: var(--bg-card);
  text-align: center;
  box-shadow: var(--sh-lg);
  overflow: hidden;
}

.dialog-body {
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dialog-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  line-height: 1;
}

.dialog-bounce {
  animation: dialogBounce 1.8s ease-in-out infinite;
  display: inline-block;
}

@keyframes dialogBounce {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-10px) scale(1.05);
  }
}

.dialog-message {
  font-family: var(--ff-sans);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 24px;
}

.dialog-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.dialog-actions button {
  padding: 10px 24px;
  font-size: 0.9rem;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-weight: 700;
  transition: all var(--t) var(--ease);
}

.dialog-btn-cancel {
  border: 1.5px solid var(--border-med) !important;
  background: transparent !important;
  color: var(--text-mid) !important;
}

.dialog-btn-cancel:hover {
  background: var(--bg-alt) !important;
  border-color: var(--pink) !important;
  color: var(--pink-dark) !important;
  transform: translateY(-2px);
}

.dialog-btn-confirm {
  background: var(--pink) !important;
  color: white !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(242, 167, 195, 0.3) !important;
}

.dialog-btn-confirm:hover {
  background: var(--pink-dark) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(242, 167, 195, 0.45) !important;
}

/* ── BACK TO TOP FLOATING BUTTON ── */
/* ── BACK TO TOP FLOATING WRAPPER & BUTTON ── */
.back-to-top-wrapper {
  position: fixed;
  bottom: 92px;
  right: 24px;
  z-index: 997;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.8) translateY(20px);
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
  width: 52px;
  height: 180px; /* Cukup ruang untuk label vertikal dan tombol */
}

.back-to-top-wrapper.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.back-to-top-label {
  font-family: var(--ff-hand);
  font-size: 1.15rem;
  color: var(--text-mid);
  white-space: nowrap;
  position: absolute;
  top: 60px; /* Pusat teks pas 60px dari atas wrapper */
  left: 50%;
  transform: translate(-50%, -50%) rotate(-90deg);
  transform-origin: center;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

body.dark .back-to-top-label {
  color: var(--text-mid);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.back-to-top-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 3px solid rgba(242, 167, 195, 0.4) !important;
  box-shadow: 0 8px 24px rgba(212, 101, 145, 0.1);
  cursor: pointer;
  transition: all var(--t) var(--ease);
}

body.dark .back-to-top-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(196, 181, 232, 0.3) !important;
  color: var(--text) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.back-to-top-btn:hover {
  transform: scale(1.1) translateY(-3px);
  background: rgba(242, 167, 195, 0.25) !important;
  border-color: var(--pink) !important;
  box-shadow: var(--sh-lg);
}

body.dark .back-to-top-btn:hover {
  background: rgba(196, 181, 232, 0.2) !important;
  border-color: var(--lavender) !important;
}

/* ── FOOTER INSTAGRAM LINK ── */
.footer-ig {
  margin-top: 14px;
}

.footer-ig a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--pink-dark) !important;
  font-weight: 500;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all var(--t) var(--ease);
}

.footer-ig a:hover {
  color: var(--pink) !important;
  transform: translateY(-1px);
}

body.dark .footer-ig a {
  color: var(--pink) !important;
}

body.dark .footer-ig a:hover {
  color: var(--lavender) !important;
}

.ig-icon {
  stroke-width: 2.2;
}

/* ── MEMBER CARD INSTAGRAM LINK ── */
.member-ig {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--text-mid) !important;
  text-decoration: none;
  font-weight: 700;
  transition: all var(--t) var(--ease);
  z-index: 2;
  position: relative;
}

.member-ig:hover {
  color: var(--pink-dark) !important;
  transform: translateY(-1px) scale(1.05);
}

body.dark .member-ig {
  color: var(--text-mid) !important;
}

body.dark .member-ig:hover {
  color: var(--pink) !important;
}

.member-ig-icon {
  stroke-width: 2.2;
}

/* ── MEMBER STATUS BUBBLE ── */
.member-status-bubble {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%) translateZ(10px);
  background: var(--bg-card);
  border: 1.5px solid var(--border-med);
  border-radius: var(--r-sm);
  padding: 4px 10px;
  font-size: 0.75rem;
  white-space: nowrap;
  box-shadow: var(--sh-sm);
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 5;
  transition: all var(--t) var(--ease);
  pointer-events: auto;
  cursor: default;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.is-self-card .member-status-bubble {
  cursor: pointer;
}

.member-status-bubble.placeholder {
  opacity: 0;
  border-style: dashed;
  background: transparent;
}

.member-card:hover .member-status-bubble.placeholder {
  opacity: 0.6;
}

.is-self-card .member-status-bubble:hover {
  transform: translateX(-50%) scale(1.05) translateZ(10px);
  border-color: var(--pink);
  background: var(--bg-alt);
  opacity: 1 !important;
}

.member-status-bubble .status-text {
  font-family: var(--ff-sans);
  font-weight: 500;
  color: var(--text);
}

/* Ensure system alert/confirm overlay is always on top of all other modals */
#ap3-dialog-overlay,
#ap3-alert-overlay,
#ap3-confirm-overlay {
  z-index: 3000 !important;
}

/* ==========================================================================
   ── MEMBER CARD CUSTOMIZATION & PREMIUM THEMES ──
   ========================================================================== */

/* ── Name Tag Ellipsis Limit ── */
.member-tag {
  display: inline-block;
  max-width: 170px;
  line-height: 1.3;
  word-break: break-word;
  display: -webkit-inline-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

/* ── Member Card Sticker (Vinyl Scrapbook Style) ── */
.member-card-sticker {
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 1.8rem;
  z-index: 15;
  transform: rotate(12deg);
  background: #ffffff;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12), inset 0 2px 4px rgba(0, 0, 0, 0.05);
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.member-card:hover .member-card-sticker {
  transform: rotate(-8deg) scale(1.15);
}

/* ── Theme: Pastel Default (Tinted background based on card color) ── */
.member-card.theme-default {
  background: color-mix(in srgb, var(--mc, var(--pink)) 6%, var(--bg-card)) !important;
  border-color: color-mix(in srgb, var(--mc, var(--pink)) 30%, var(--border-med)) !important;
}
.member-card.theme-default:hover {
  border-color: var(--mc, var(--pink)) !important;
  box-shadow: 0 12px 30px color-mix(in srgb, var(--mc, var(--pink)) 20%, rgba(0,0,0,0.12)), var(--sh-md) !important;
}

/* ── Theme: Buku Kotak 📝 (Notebook Grid Pattern) ── */
.member-card.theme-grid {
  background-color: color-mix(in srgb, var(--mc, #a5c8e1) 5%, var(--bg-card)) !important;
  background-image: 
    linear-gradient(90deg, rgba(165, 200, 225, 0.15) 1px, transparent 1px),
    linear-gradient(rgba(165, 200, 225, 0.15) 1px, transparent 1px) !important;
  background-size: 15px 15px !important;
  border: 2px dashed color-mix(in srgb, var(--mc, #a5c8e1) 50%, var(--border-med)) !important;
  box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.08), var(--sh-sm) !important;
}
.member-card.theme-grid::before {
  display: none !important; /* Sembunyikan garis atas default */
}
/* Washi Tape (Solatip Kertas) di atas mading grid */
.member-card.theme-grid::after {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(-1.5deg);
  width: 70px;
  height: 18px;
  background: rgba(253, 240, 169, 0.65);
  border-left: 2px dashed rgba(212, 175, 55, 0.2);
  border-right: 2px dashed rgba(212, 175, 55, 0.2);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  z-index: 10;
  backdrop-filter: blur(0.5px);
}
.member-card.theme-grid .member-name {
  font-family: var(--ff-hand) !important;
  font-size: 1.45rem !important;
  transform: rotate(-1deg) translateZ(12px);
  color: var(--text) !important;
}
.member-card.theme-grid .member-tag {
  font-family: var(--ff-hand) !important;
  font-size: 0.8rem !important;
  border-radius: 4px !important;
  background: color-mix(in srgb, var(--mc, var(--pink)) 15%, #fff) !important; /* Latar belakang lembut agar tulisan hitam terbaca */
  color: #2b2321 !important; /* Warna tulisan gelap kontras tinggi */
  border: 1px solid color-mix(in srgb, var(--mc, var(--pink)) 40%, rgba(0,0,0,0.15)) !important;
  transform: rotate(1.5deg) translateZ(12px);
  box-shadow: none !important;
}
.member-card.theme-grid .member-avatar {
  border-radius: 50% !important;
  border: 2px solid var(--border-med) !important;
}

/* ── Theme: Polaroid Klasik 📸 (Thick Polaroid Boarder & Pin) ── */
.member-card.theme-polaroid {
  background: #fbf9f3 !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  border-radius: 4px !important;
  padding: 24px 16px 48px 16px !important; /* Polaroid style offset bottom */
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12), var(--sh-sm) !important;
}
.member-card.theme-polaroid::before {
  display: none !important;
}
/* Push pin mading */
.member-card.theme-polaroid::after {
  content: '📌';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) scale(1.2) rotate(-5deg);
  font-size: 1.15rem;
  z-index: 10;
  filter: drop-shadow(1px 2px 2px rgba(0, 0, 0, 0.15));
}
.member-card.theme-polaroid .member-avatar {
  border-radius: 50% !important; /* Kembalikan ke bulat agar sesuai profil */
  width: 90px !important;
  height: 90px !important;
  border: 3px solid #ffffff !important;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.15) !important;
  background: #1c1817 !important;
}
.member-card.theme-polaroid .member-name {
  font-family: var(--ff-hand) !important;
  font-size: 1.5rem !important;
  color: #2b2321 !important;
  transform: rotate(-1.5deg) translateZ(12px);
  margin-top: 12px;
}
.member-card.theme-polaroid .member-tag {
  font-family: var(--ff-hand) !important;
  font-size: 0.85rem !important;
  background: transparent !important;
  color: #2b2321 !important; /* Ubah ke warna gelap kontras tinggi agar terbaca jelas */
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-top: -4px;
  transform: rotate(1deg) translateZ(12px);
}
.member-card.theme-polaroid:hover {
  transform: translateY(-8px) rotate(1deg) scale(1.02) !important;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18), var(--sh-md) !important;
}

/* ── Theme: Tiket Vintage 🎟️ (Concert/Travel Ticket Style) ── */
.member-card.theme-ticket {
  background-color: #fdf8f0 !important;
  background-image: 
    /* Garis perforasi sobekan tiket di tengah */
    linear-gradient(to right, rgba(139, 115, 85, 0.25) 60%, transparent 60%),
    /* Barcode estetik retro di bagian bawah kiri dan kanan */
    repeating-linear-gradient(90deg, #4a3c31, #4a3c31 1px, transparent 1px, transparent 4px),
    repeating-linear-gradient(90deg, #4a3c31, #4a3c31 3px, transparent 3px, transparent 7px) !important;
  background-size: 8px 2px, 50px 14px, 40px 14px !important;
  background-position: 0px 135px, bottom 16px left 25px, bottom 16px right 25px !important;
  background-repeat: repeat-x, no-repeat, no-repeat !important;
  
  border: 2px solid color-mix(in srgb, var(--mc, #d4a373) 65%, var(--border-med)) !important;
  border-radius: 8px !important;
  box-shadow: 2px 5px 12px rgba(0, 0, 0, 0.08), var(--sh-sm) !important;
  overflow: visible !important;
  padding: 28px 16px 48px 16px !important; /* Ruang ekstra untuk barcode di bawah */
}
/* Lubang lingkaran potongan tiket di samping kiri */
.member-card.theme-ticket::before {
  content: '';
  position: absolute;
  top: 135px; /* sejajar garis perforasi */
  left: -9px;
  width: 16px;
  height: 16px;
  background: var(--bg) !important;
  border-radius: 50%;
  border-right: 2px solid color-mix(in srgb, var(--mc, #d4a373) 65%, var(--border-med));
  transform: translateY(-50%) translateZ(1px);
  z-index: 5;
  box-shadow: inset -2px 0 3px rgba(0, 0, 0, 0.08);
}
/* Lubang lingkaran potongan tiket di samping kanan */
.member-card.theme-ticket::after {
  content: '';
  position: absolute;
  top: 135px; /* sejajar garis perforasi */
  right: -9px;
  width: 16px;
  height: 16px;
  background: var(--bg) !important;
  border-radius: 50%;
  border-left: 2px solid color-mix(in srgb, var(--mc, #d4a373) 65%, var(--border-med));
  transform: translateY(-50%) translateZ(1px);
  z-index: 5;
  box-shadow: inset 2px 0 3px rgba(0, 0, 0, 0.08);
}
.member-card.theme-ticket .member-avatar {
  border-radius: 50% !important;
  border: 3px dashed var(--mc, #d2b48c) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
  filter: sepia(0.15) contrast(1.05);
}
.member-card.theme-ticket .member-name {
  font-family: monospace !important;
  font-size: 1.1rem !important;
  color: #4a3c31 !important;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-weight: bold;
  margin-top: 20px;
}
.member-card.theme-ticket .member-tag {
  font-family: monospace !important;
  font-size: 0.68rem !important;
  background: #e76f51 !important; /* Warna oranye tiket retro */
  color: #ffffff !important;
  border-radius: 2px !important;
  border: 1px dashed rgba(255, 255, 255, 0.6) !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.1) !important;
  padding: 4px 10px !important;
  margin-bottom: 22px; /* Jarak dari barcode di bawah */
}
.member-card.theme-ticket:hover {
  transform: translateY(-8px) scale(1.02) !important;
  box-shadow: 0 12px 24px color-mix(in srgb, var(--mc, #d2b48c) 25%, rgba(0,0,0,0.12)), var(--sh-md) !important;
  border-color: var(--mc, #d2b48c) !important;
}

/* ── Theme: Prangko Surat ✉️ (Postage Stamp Scallop Design) ── */
.member-card.theme-stamp {
  background: #fdfcf9 !important;
  border: 4px double color-mix(in srgb, var(--mc, #e29578) 55%, var(--border-med)) !important;
  border-radius: 2px !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08), var(--sh-sm) !important;
}
.member-card.theme-stamp::before {
  display: none !important;
}
/* Stempel Pos melingkar di pojok kanan bawah */
.member-card.theme-stamp::after {
  content: 'POSTAGE';
  position: absolute;
  bottom: 12px;
  right: 12px;
  font-family: var(--ff-serif) !important;
  font-size: 0.6rem;
  font-weight: 900;
  color: color-mix(in srgb, var(--mc, #e29578) 25%, rgba(0,0,0,0.08));
  border: 2px solid color-mix(in srgb, var(--mc, #e29578) 25%, rgba(0,0,0,0.08));
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-20deg) translateZ(10px);
  pointer-events: none;
}
.member-card.theme-stamp .member-avatar {
  border-radius: 50% !important;
  border: 3px solid #ffffff !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
}
.member-card.theme-stamp .member-name {
  font-family: var(--ff-serif) !important;
  font-size: 1.25rem !important;
  color: #4b3e3c !important;
}
.member-card.theme-stamp .member-tag {
  font-family: var(--ff-sans) !important;
  font-size: 0.72rem !important;
  background: var(--mc, #e29578) !important;
  color: var(--mtc, #2b2321) !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}
.member-card.theme-stamp:hover {
  transform: translateY(-8px) scale(1.02) !important;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14), var(--sh-md) !important;
  border-color: var(--mc, #e29578) !important;
}

/* ── Theme: Jurnal Estetik 🌿 (Nature Diary & Binder Hole Design) ── */
.member-card.theme-journal {
  background: #f5f2eb !important;
  border: 1px solid rgba(139, 128, 115, 0.3) !important;
  border-radius: 6px !important;
  box-shadow: 1px 4px 10px rgba(0, 0, 0, 0.05), var(--sh-sm) !important;
}
.member-card.theme-journal::before {
  /* Binder ring holes on the left edge */
  content: '';
  position: absolute;
  top: 20px;
  left: 8px;
  width: 6px;
  height: 6px;
  background: #736b60;
  border-radius: 50%;
  box-shadow: 0 40px 0 #736b60, 0 80px 0 #736b60, 0 120px 0 #736b60;
  z-index: 5;
  opacity: 0.55;
  transform: translateZ(1px);
}
/* Tiny leaf drawing overlay at the bottom left */
.member-card.theme-journal::after {
  content: '🌿';
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-size: 0.95rem;
  opacity: 0.5;
  z-index: 5;
  transform: rotate(-15deg) translateZ(10px);
  pointer-events: none;
}
.member-card.theme-journal .member-avatar {
  border-radius: 50% !important;
  border: 3px solid #ffffff !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08) !important;
}
.member-card.theme-journal .member-name {
  font-family: var(--ff-hand) !important;
  font-size: 1.4rem !important;
  color: #4a3e3d !important;
}
.member-card.theme-journal .member-tag {
  font-family: var(--ff-sans) !important;
  font-size: 0.72rem !important;
  background: color-mix(in srgb, var(--mc, #8fa89b) 20%, #fff) !important;
  color: #4a3e3d !important;
  border: 1px solid rgba(139, 128, 115, 0.3) !important;
  border-radius: 20px !important;
  box-shadow: none !important;
}
.member-card.theme-journal:hover {
  transform: translateY(-8px) rotate(-0.5deg) scale(1.02) !important;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1), var(--sh-md) !important;
  border-color: var(--mc, #8fa89b) !important;
}

/* ── Theme: Papan Kapur 🖍️ (Chalkboard & Wooden Frame Style) ── */
.member-card.theme-chalkboard {
  background: #1c3024 !important; /* Hijau papan tulis berdebu */
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 0) !important;
  background-size: 8px 8px !important;
  border: 8px solid #5c3c21 !important; /* Bingkai Kayu */
  border-radius: 6px !important;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5), 0 6px 14px rgba(0, 0, 0, 0.2), var(--sh-sm) !important;
  padding: 24px 12px 32px 12px !important;
}
.member-card.theme-chalkboard::before {
  display: none !important;
}
.member-card.theme-chalkboard .member-avatar {
  border-radius: 50% !important;
  border: 2px dashed rgba(255, 255, 255, 0.7) !important;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3) !important;
}
.member-card.theme-chalkboard .member-name {
  font-family: var(--ff-hand) !important;
  font-size: 1.45rem !important;
  color: #fff9e6 !important; /* Tulisan kapur putih kekuningan */
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.3) !important;
  margin-top: 14px;
}
.member-card.theme-chalkboard .member-tag {
  font-family: var(--ff-hand) !important;
  font-size: 0.82rem !important;
  background: transparent !important;
  color: color-mix(in srgb, var(--mc, var(--pink)) 25%, #fffdd0) !important; /* warna kapur kuning/kustom cerah */
  border: 1px dashed rgba(255, 255, 255, 0.6) !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  padding: 2px 8px !important;
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.2) !important;
}
.member-card.theme-chalkboard .member-ig {
  color: #fff9e6 !important; /* Link kapur cerah */
  opacity: 0.8 !important;
}
.member-card.theme-chalkboard .member-ig:hover {
  color: #ffffff !important;
  opacity: 1 !important;
}
.member-card.theme-chalkboard:hover {
  transform: translateY(-8px) scale(1.02) !important;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5), 0 12px 24px rgba(0, 0, 0, 0.3), var(--sh-md) !important;
}

/* ── Theme: Memo Sobek 🗒️ (Spiral Notepad Style) ── */
.member-card.theme-notepad {
  background-color: #fffdf0 !important;
  background-image: 
    /* Red line margin on the left */
    linear-gradient(90deg, transparent 24px, #ff9999 24px, #ff9999 26px, transparent 26px),
    /* Horizontal notebook lines */
    linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px) !important;
  background-size: 100% 100%, 100% 18px !important;
  border: 1px solid #e2ddc0 !important;
  border-radius: 2px !important; /* notepad torn sheets have sharp corners */
  box-shadow: 2px 5px 10px rgba(0,0,0,0.06), var(--sh-sm) !important;
  padding: 26px 16px 32px 16px !important;
}
/* Kawat ring binder di atas memo */
.member-card.theme-notepad::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 20px;
  width: 6px;
  height: 14px;
  background: linear-gradient(to right, #e0e0e0, #999, #e0e0e0);
  border: 1px solid #777;
  border-radius: 3px;
  box-shadow: 
    28px 0 0 -1px #e0e0e0, 28px 0 0 0px #777,
    56px 0 0 -1px #e0e0e0, 56px 0 0 0px #777,
    84px 0 0 -1px #e0e0e0, 84px 0 0 0px #777,
    112px 0 0 -1px #e0e0e0, 112px 0 0 0px #777,
    140px 0 0 -1px #e0e0e0, 140px 0 0 0px #777,
    168px 0 0 -1px #e0e0e0, 168px 0 0 0px #777;
  z-index: 10;
}
.member-card.theme-notepad .member-avatar {
  border-radius: 50% !important;
  border: 2px solid #e0dcb8 !important;
}
.member-card.theme-notepad .member-name {
  font-family: var(--ff-hand) !important;
  font-size: 1.4rem !important;
  color: #3e382d !important;
  transform: rotate(-1deg);
  margin-top: 12px;
}
.member-card.theme-notepad .member-tag {
  font-family: var(--ff-hand) !important;
  font-size: 0.8rem !important;
  background: color-mix(in srgb, var(--mc, var(--pink)) 20%, #fff) !important;
  color: #3e382d !important;
  border: 1px solid #e2ddc0 !important;
  border-radius: 4px !important;
  transform: rotate(1.5deg);
  box-shadow: none !important;
}
.member-card.theme-notepad:hover {
  transform: translateY(-8px) rotate(-1.5deg) scale(1.02) !important;
  box-shadow: 4px 10px 18px rgba(0,0,0,0.1), var(--sh-md) !important;
}

/* ── Theme: Cyberpunk Game 🎮 (Retro Arcade Game Theme - Redesigned) ── */
.member-card.theme-game {
  background: linear-gradient(to bottom, #110924, #05020c) !important;
  background-image: 
    linear-gradient(rgba(0, 240, 255, 0.05) 1px, transparent 1px), 
    linear-gradient(90deg, rgba(0, 240, 255, 0.05) 1px, transparent 1px) !important;
  background-size: 20px 20px !important;
  border: 2px solid var(--mc, #00f0ff) !important;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.25), inset 0 0 10px rgba(0, 240, 255, 0.15) !important;
}
.member-card.theme-game::before {
  display: none !important;
}
.member-card.theme-game .member-avatar {
  border-radius: 50% !important;
  border: 2px solid var(--mc, #00f0ff) !important;
  box-shadow: 0 0 12px var(--mc, #00f0ff) !important;
}
.member-card.theme-game .member-name {
  font-family: 'Share Tech Mono', Consolas, monospace !important;
  font-size: 1.2rem !important;
  color: #00f0ff !important;
  text-shadow: 0 0 5px rgba(0, 240, 255, 0.6) !important;
  text-transform: uppercase;
  font-weight: 700 !important;
  letter-spacing: 0.5px;
  margin-top: 14px;
}
.member-card.theme-game .member-tag {
  font-family: 'Share Tech Mono', Consolas, monospace !important;
  font-size: 0.72rem !important;
  background: #ff007f !important;
  color: #ffffff !important;
  border: 1px solid #00f0ff !important;
  box-shadow: 0 0 10px rgba(255, 0, 127, 0.5) !important;
  border-radius: 4px !important;
  text-transform: uppercase;
  padding: 4px 10px !important;
}
.member-card.theme-game .member-ig {
  color: #00f0ff !important;
  text-shadow: 0 0 3px rgba(0, 240, 255, 0.5);
}
.member-card.theme-game:hover {
  border-color: #ff007f !important;
  box-shadow: 0 0 20px rgba(255, 0, 127, 0.5), inset 0 0 10px rgba(255, 0, 127, 0.2) !important;
  transform: translateY(-8px) scale(1.02) !important;
}
.member-card.theme-game:hover .member-name {
  color: #ff007f !important;
  text-shadow: 0 0 8px rgba(255, 0, 127, 0.8) !important;
  animation: game-text-glitch 0.4s infinite alternate;
}
@keyframes game-text-glitch {
  0% { text-shadow: 1px 1px 0px #00f0ff, -1px -1px 0px #ff007f; }
  100% { text-shadow: -1px 1px 0px #00f0ff, 1px -1px 0px #ff007f; }
}

/* ── Theme: Aesthetic Anime 🌸 (Japanese Lofi/Anime Theme - Redesigned) ── */
.member-card.theme-anime {
  background: radial-gradient(rgba(255, 255, 255, 0.35) 1.5px, transparent 0), linear-gradient(135deg, #ffd1dc 0%, #b19ffb 100%) !important;
  background-size: 12px 12px, 100% 100% !important;
  border: 3.5px solid #ffffff !important;
  border-radius: 20px !important;
  box-shadow: 0 8px 20px rgba(177, 159, 251, 0.35), var(--sh-sm) !important;
}
/* Falling cherry blossom petals */
.member-card.theme-anime::before {
  content: '🌸' !important;
  position: absolute !important;
  top: -15px !important;
  left: 20% !important;
  right: auto !important;
  height: auto !important;
  background: none !important;
  border-radius: 0 !important;
  font-size: 1.2rem !important;
  animation: lofi-sakura-1 8s linear infinite !important;
  pointer-events: none !important;
  z-index: 10 !important;
  opacity: 0;
  transform: translateZ(10px);
}
.member-card.theme-anime::after {
  content: '🌸' !important;
  position: absolute !important;
  top: -25px !important;
  right: 25% !important;
  font-size: 0.9rem !important;
  animation: lofi-sakura-2 11s linear infinite !important;
  pointer-events: none !important;
  z-index: 10 !important;
  opacity: 0;
  transform: translateZ(10px);
}
.member-card.theme-anime .member-avatar {
  border-radius: 50% !important;
  border: 3px solid #ffffff !important;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15) !important;
}
.member-card.theme-anime .member-name {
  font-family: 'Outfit', var(--ff-hand), sans-serif !important;
  font-size: 1.35rem !important;
  color: #ffff33 !important; /* Retro anime subtitle yellow */
  text-shadow: 1px 1px 0px #000, -1px -1px 0px #000, 1px -1px 0px #000, -1px 1px 0px #000, 0px 2px 4px rgba(0,0,0,0.4) !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px;
  margin-top: 12px;
}
.member-card.theme-anime .member-tag {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.72rem !important;
  background: rgba(255, 255, 255, 0.85) !important;
  color: #5c3c6f !important;
  border: 1.5px solid #ffb6c1 !important;
  border-radius: 30px !important;
  font-weight: 700 !important;
  transform: rotate(-1.5deg);
  padding: 3px 12px !important;
  box-shadow: 0 2px 5px rgba(255, 182, 193, 0.3) !important;
}
.member-card.theme-anime .member-ig {
  color: #5c3c6f !important;
  font-weight: bold !important;
}
.member-card.theme-anime .member-ig:hover {
  color: #231f20 !important;
}
.member-card.theme-anime:hover {
  transform: translateY(-8px) scale(1.02) !important;
  box-shadow: 0 12px 28px rgba(177, 159, 251, 0.5), var(--sh-lg) !important;
  border-color: #ffd1dc !important;
}

@keyframes lofi-sakura-1 {
  0% { transform: translateY(-15px) translateX(0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.8; }
  90% { opacity: 0.8; }
  100% { transform: translateY(250px) translateX(-50px) rotate(360deg); opacity: 0; }
}
@keyframes lofi-sakura-2 {
  0% { transform: translateY(-20px) translateX(0) rotate(0deg); opacity: 0; }
  20% { opacity: 0.75; }
  80% { opacity: 0.75; }
  100% { transform: translateY(250px) translateX(-40px) rotate(-360deg); opacity: 0; }
}

/* ── Theme-specific Instagram Link Colors (Readability & Dark Mode Leak Prevention) ── */
.member-card.theme-grid .member-ig {
  color: #5a7fa0 !important;
}
.member-card.theme-grid .member-ig:hover {
  color: #1a4a6e !important;
}
.member-card.theme-polaroid .member-ig {
  color: #555555 !important;
}
.member-card.theme-polaroid .member-ig:hover {
  color: #2b2321 !important;
}
.member-card.theme-ticket .member-ig {
  color: #7c624d !important;
}
.member-card.theme-ticket .member-ig:hover {
  color: #4a3e3d !important;
}
.member-card.theme-stamp .member-ig {
  color: #8d6f65 !important;
}
.member-card.theme-stamp .member-ig:hover {
  color: #4b3e3c !important;
}
.member-card.theme-journal .member-ig {
  color: #736b60 !important;
}
.member-card.theme-journal .member-ig:hover {
  color: #4a3e3d !important;
}
.member-card.theme-notepad .member-ig {
  color: #7c7259 !important;
}
.member-card.theme-notepad .member-ig:hover {
  color: #3e382d !important;
}

/* ── Corkboard Stickers Trigger Button ── */
.corkboard-stickers-trigger {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 15;
  background: var(--pink) !important;
  color: white !important;
  border: none !important;
  font-family: var(--ff-sans);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 8px 16px;
  border-radius: 20px;
  box-shadow: var(--sh-sm), 0 2px 6px rgba(212, 101, 145, 0.2);
  cursor: pointer;
  transition: all var(--t) var(--ease);
}
.corkboard-stickers-trigger:hover {
  background: var(--pink-dark) !important;
  transform: translateY(-2px) scale(1.03);
  box-shadow: var(--sh-md), 0 4px 10px rgba(212, 101, 145, 0.3);
}

/* ── Sticker Drawer Modal ── */
.sticker-drawer {
  position: absolute;
  top: 60px;
  right: 14px;
  z-index: 20;
  background: var(--bg-card);
  border: 2px solid var(--border-med);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-lg);
  width: 250px;
  padding: 12px;
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
  pointer-events: none;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.sticker-drawer.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.sticker-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}
.sticker-drawer-header span {
  font-family: var(--ff-sans);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-mid);
}
.sticker-drawer-close {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 2px;
  line-height: 1;
  transition: color 0.2s;
}
.sticker-drawer-close:hover {
  color: var(--pink-dark);
}
.sticker-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.sticker-opt-btn {
  background: var(--bg-alt);
  border: 1px solid var(--border-med);
  border-radius: 8px;
  font-size: 1.5rem;
  padding: 6px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.sticker-opt-btn:hover {
  background: var(--pink-light);
  border-color: var(--pink);
  transform: scale(1.1);
}

/* ── Draggable Sticker on Board ── */
.draggable-sticker {
  position: absolute;
  font-size: 2.2rem;
  cursor: grab;
  z-index: 10;
  user-select: none;
  -webkit-user-drag: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  touch-action: none;
}
.draggable-sticker:active {
  cursor: grabbing;
}
.draggable-sticker::after {
  content: 'Double-click to peel';
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  font-family: var(--ff-sans);
  font-size: 0.55rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.draggable-sticker:hover::after {
  opacity: 1;
}

/* Responsive adjustments for mobile sticker drawer */
@media (max-width: 768px) {
  .corkboard-stickers-trigger {
    top: auto;
    bottom: -45px;
    right: 50%;
    transform: translateX(50%);
    box-shadow: var(--sh-md);
  }
  .corkboard-stickers-trigger:hover {
    transform: translateX(50%) translateY(-2px) scale(1.03);
  }
  .sticker-drawer {
    top: auto;
    bottom: 0px;
    right: 50%;
    transform: translateX(50%) translateY(20px);
    width: calc(100% - 32px);
    max-width: 320px;
  }
  .sticker-drawer.open {
    transform: translateX(50%) translateY(-60px);
  }
}

/* ── MEMBERS LAYOUT & BIRTHDAY BOARD ── */
.members-layout {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 992px) {
  .members-layout {
    flex-direction: row;
    align-items: flex-start;
  }
  
  .members-grid {
    flex: 1;
  }
  
  .birthday-board {
    width: 320px;
    flex-shrink: 0;
  }
}

.birthday-board {
  background: #fff9d6;
  border: 2px solid #e6dbaf;
  border-radius: 8px;
  padding: 28px 20px 24px 20px;
  position: relative;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  transform: rotate(-1.5deg);
  font-family: var(--ff-sans);
  color: #4a3e2b;
  transition: transform var(--t) var(--ease), background var(--t);
  will-change: transform;
  box-sizing: border-box;
}

body.dark .birthday-board {
  background: #2b251a;
  border-color: #473c26;
  color: #eddcb8;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.birthday-board:hover {
  transform: rotate(0.5deg) scale(1.02);
}

.birthday-board::after {
  content: '📌';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%) scale(1.3);
  z-index: 10;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.2));
}

.birthday-board::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(135deg, rgba(255,255,255,0.45) 0%, transparent 50%, rgba(0,0,0,0.06) 100%);
  pointer-events: none;
}

.birthday-title {
  font-family: var(--ff-serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
  border-bottom: 2px dashed rgba(74, 62, 43, 0.15);
  padding-bottom: 12px;
  color: #4a3e2b;
}

body.dark .birthday-title {
  color: #eddcb8;
  border-bottom-color: rgba(237, 220, 184, 0.15);
}

.birthday-today-card {
  background: linear-gradient(135deg, #fff2ac 0%, #ffe381 100%);
  border: 1px solid #ffd54f;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  margin-bottom: 20px;
  box-shadow: 0 4px 10px rgba(255, 213, 79, 0.25);
  position: relative;
  overflow: hidden;
}

body.dark .birthday-today-card {
  background: linear-gradient(135deg, #443c1f 0%, #352d13 100%);
  border-color: #61501b;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.celebrate-decor {
  font-size: 2.2rem;
  margin-bottom: 8px;
  animation: bday-decor-pulse 1.5s infinite ease-in-out;
}

@keyframes bday-decor-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.celebrate-text {
  font-family: var(--ff-serif);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #795548;
}

body.dark .celebrate-text {
  color: #d7ccc8;
}

.celebrate-name {
  font-family: var(--ff-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: #5d4037;
  margin: 6px 0 10px;
  text-shadow: 0 1px 1px rgba(255,255,255,0.5);
}

body.dark .celebrate-name {
  color: #ffca28;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.celebrate-sub {
  font-size: 0.78rem;
  line-height: 1.4;
  color: #795548;
  margin-bottom: 12px;
}

body.dark .celebrate-sub {
  color: #b0bec5;
}

.celebrate-btn {
  background: #ff5e97;
  color: white;
  border: none;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(255,94,151,0.25);
  transition: all var(--t) var(--ease);
}

.celebrate-btn:hover {
  background: #d46591;
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(255,94,151,0.4);
}

.birthday-list-title {
  font-family: var(--ff-serif);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #705950;
}

body.dark .birthday-list-title {
  color: #cfc2e2;
}

.birthday-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.birthday-item {
  display: flex;
  flex-direction: column;
  border-bottom: 1px dashed rgba(74, 62, 43, 0.12);
  padding-bottom: 8px;
}

body.dark .birthday-item {
  border-bottom-color: rgba(237, 220, 184, 0.1);
}

.birthday-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.bday-item-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #4a3e2b;
}

body.dark .bday-item-name {
  color: #eddcb8;
}

.bday-item-date {
  font-size: 0.78rem;
  color: #705950;
  margin-top: 2px;
}

body.dark .bday-item-date {
  color: #cfc2e2;
}

.bday-countdown {
  font-weight: 700;
  color: var(--pink-dark);
}

body.dark .bday-countdown {
  color: var(--pink);
}