/* ==========================================================================
   LOVE STORY — CUTE PASTEL NEUBRUTALISM THEME
   - Style: Soft & Playful Neubrutalism (Rounded Brutalism)
   - Colors: Sweet Pastel Canvas, Candy Accents (Bubblegum, Buttercup, Lime, Lavender)
   - Accents: Crisp Ink Borders (2.5px - 3px), Hard Drop Shadows, Sticker Badges
   - Typography: Baloo 2 (Bubbly Cute Neubrutalism) & Plus Jakarta Sans + Mali & Dancing Script
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. DESIGN TOKENS & CUTE NEUBRUTALISM VARIABLES
   -------------------------------------------------------------------------- */
:root {
  /* Canvas Background */
  --bg-canvas: #fffdfa;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;

  /* Ink & Borders */
  --ink: #18181b;
  --border-sm: 2px solid var(--ink);
  --border: 2.5px solid var(--ink);
  --border-thick: 3.5px solid var(--ink);

  /* Hard Solid Drop Shadows (Zero blur) */
  --shadow-xs: 2px 2px 0px var(--ink);
  --shadow: 4px 4px 0px var(--ink);
  --shadow-hover: 6px 6px 0px var(--ink);
  --shadow-lg: 8px 8px 0px var(--ink);
  --shadow-pressed: 1px 1px 0px var(--ink);

  /* Rounded Brutalism Radii */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  /* Cute Candy Pastel Palette */
  --pink-soft: #ffe5ec;
  --pink: #ff8fab;
  --pink-pop: #ff5d8f;
  --pink-deep: #e01e6a;

  --yellow-soft: #fff9db;
  --yellow: #ffe66d;
  --yellow-pop: #ffd166;

  --mint-soft: #e8f8f0;
  --mint: #b5e48c;
  --mint-pop: #70e4d0;

  --lavender-soft: #f3e8ff;
  --lavender: #c8b6ff;
  --lavender-pop: #9d4edd;

  --blue-soft: #e0f2fe;
  --blue: #a0c4ff;
  --blue-pop: #70a1ff;

  --peach-soft: #ffecd1;
  --peach: #ff9f93;

  /* Typography Colors */
  --text-main: #18181b;
  --text-muted: #4b4852;
  --text-dim: #716e79;

  /* Font Families - Cute Bubbly Neubrutalism & Full Native Vietnamese Support */
  --font-title: 'Baloo 2', cursive, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-script: 'Dancing Script', 'Mali', cursive;
  --font-hand: 'Mali', 'Dancing Script', cursive;

  /* Bouncy Springs */
  --transition-bounce: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: all 0.15s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-canvas);
  color: var(--text-main);
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-canvas);
  /* Cute subtle polka dot grid */
  background-image: radial-gradient(rgba(24, 24, 27, 0.08) 1.3px, transparent 1.3px);
  background-size: 22px 22px;
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

body.lock-scroll {
  overflow: hidden !important;
  height: 100vh !important;
}

::selection {
  background: var(--pink);
  color: #ffffff;
}

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

/* --------------------------------------------------------------------------
   2. TYPOGRAPHY UTILITIES
   -------------------------------------------------------------------------- */
.font-serif {
  font-family: var(--font-title);
  font-weight: 700;
}

.font-script {
  font-family: var(--font-script);
}

.italic-serif {
  font-family: var(--font-title);
  font-style: italic;
  font-weight: 600;
}

.gradient-text {
  background: linear-gradient(135deg, var(--pink-deep) 0%, var(--pink-pop) 50%, var(--lavender-pop) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* --------------------------------------------------------------------------
   3. AMBIENT PARTICLES & CURSOR
   -------------------------------------------------------------------------- */
#ambientCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  background-color: var(--pink-pop);
  border: 2px solid var(--ink);
  box-shadow: 1px 1px 0 var(--ink);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.08s ease-out;
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 38px;
  height: 38px;
  background: radial-gradient(circle, rgba(255, 143, 171, 0.4) 0%, rgba(255, 230, 109, 0.2) 60%, transparent 80%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease-out;
}

@media (pointer: coarse) {
  .cursor-dot, .cursor-glow { display: none; }
}

/* --------------------------------------------------------------------------
   4. LAYOUT CONTAINER & SECTION HEADERS
   -------------------------------------------------------------------------- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.section-title-wrap {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 44px;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-title);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--ink);
  background: var(--yellow-soft);
  border: 1.5px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  padding: 5px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
  transition: var(--transition-bounce);
}

.section-badge:hover {
  transform: translateY(-2px);
  box-shadow: 3px 3px 0 var(--ink);
}

.section-title {
  font-family: var(--font-title);
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
  margin-bottom: 10px;
  line-height: 1.25;
}

.section-desc {
  font-size: clamp(0.92rem, 2vw, 1.02rem);
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.6;
  max-width: 540px;
  margin: 0 auto;
}

.carousel-swipe-hint {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-title);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.85);
  border: 1px dashed rgba(24, 24, 27, 0.25);
  border-radius: var(--radius-pill);
  padding: 4px 14px;
  margin: 12px auto 0;
  width: fit-content;
  box-shadow: 1px 1px 0 rgba(24, 24, 27, 0.08);
}

/* --------------------------------------------------------------------------
   5. BUTTONS (CHUNKY NEUBRUTALISM)
   -------------------------------------------------------------------------- */
.btn-primary {
  background: var(--pink);
  color: var(--ink);
  border: var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius-pill);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 28px;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition-bounce);
}

.btn-primary:hover {
  background: var(--pink-soft);
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hover);
}

.btn-primary:active {
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-pressed);
}

.btn-secondary {
  background: var(--yellow);
  color: var(--ink);
  border: var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius-pill);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 28px;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-bounce);
}

.btn-secondary:hover {
  background: #ffffff;
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary:active {
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-pressed);
}

.btn-ghost {
  background: #ffffff;
  color: var(--text-main);
  border: var(--border);
  box-shadow: var(--shadow-xs);
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  font-weight: 700;
  font-size: 0.88rem;
  font-family: var(--font-title);
  cursor: pointer;
  transition: var(--transition-bounce);
}

.btn-ghost:hover {
  background: var(--lavender-soft);
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow);
}

.btn-ghost:active {
  transform: translate(1px, 1px);
  box-shadow: var(--shadow-pressed);
}

.btn-small {
  padding: 8px 20px;
  font-size: 0.9rem;
}

.btn-arrow {
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.btn-primary:hover .btn-arrow {
  transform: translateY(3px);
}

/* --------------------------------------------------------------------------
   5.8 APP ROOT & ANTI-TAMPER DEVTOOLS ALERT SCREEN
   -------------------------------------------------------------------------- */
#appRoot {
  width: 100%;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.tamper-screen {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(18, 18, 22, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.tamper-card {
  background: #fffdfa;
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0px var(--ink);
  border-radius: var(--radius-lg);
  padding: 44px 32px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  position: relative;
  animation: introPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tamper-icon {
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: 14px;
  filter: drop-shadow(2px 2px 0 var(--ink));
}

.tamper-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fee2e2;
  color: #dc2626;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0px var(--ink);
  border-radius: var(--radius-pill);
  padding: 5px 16px;
  font-family: var(--font-title);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.tamper-title {
  font-family: var(--font-title);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: 14px;
}

.tamper-desc {
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  color: #4b5563;
  line-height: 1.6;
  margin-bottom: 26px;
}

.tamper-reload-btn {
  background: var(--yellow);
  color: var(--ink);
  border: var(--border-thick);
  box-shadow: var(--shadow);
  border-radius: var(--radius-pill);
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1rem;
  padding: 14px 28px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition-bounce);
}

.tamper-reload-btn:hover {
  background: var(--pink);
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hover);
}

.tamper-reload-btn:active {
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-pressed);
}

.letter-locked-placeholder {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  color: var(--pink-deep);
  background: rgba(255, 112, 166, 0.08);
  border: 2px dashed rgba(255, 112, 166, 0.4);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   6. INTRO SCREEN / CURTAIN OVERLAY
   -------------------------------------------------------------------------- */
.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(255, 253, 250, 0.96);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.intro-screen.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-card {
  background: #ffffff;
  border: var(--border-thick);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  padding: 48px 36px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  position: relative;
  animation: introPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes introPop {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.intro-wax-seal {
  width: 84px;
  height: 84px;
  background: var(--pink);
  border: var(--border);
  box-shadow: var(--shadow);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
  cursor: pointer;
  transform: rotate(-4deg);
  transition: var(--transition-bounce);
}

.intro-wax-seal:hover {
  transform: rotate(8deg) scale(1.1);
  box-shadow: var(--shadow-hover);
  background: var(--yellow);
}

.seal-icon {
  font-size: 1.3rem;
  line-height: 1;
  color: var(--ink);
}

.seal-text {
  font-family: var(--font-title);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 1px;
}

.intro-quote {
  font-family: var(--font-script);
  font-size: 1.45rem;
  color: var(--pink-deep);
  line-height: 1.45;
  margin-bottom: 16px;
  font-weight: 700;
}

.intro-names {
  font-family: var(--font-title);
  font-size: 2.3rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
}

.intro-sub {
  display: inline-block;
  background: var(--mint-soft);
  border: var(--border-sm);
  border-radius: var(--radius-pill);
  padding: 4px 16px;
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 28px;
}

.intro-btn {
  width: 100%;
  background: var(--pink);
  color: var(--ink);
  border: var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius-pill);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition-bounce);
}

.intro-btn:hover {
  background: var(--yellow);
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hover);
}

.intro-btn:active {
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-pressed);
}

/* Intro Password Gate */
.intro-password-section {
  margin-top: 14px;
  animation: introPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.password-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  border-radius: var(--radius-pill);
  padding: 4px 14px;
  font-family: var(--font-title);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 10px;
}

.badge-lock-icon {
  font-size: 0.9rem;
}

.password-hint {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 16px;
}

.password-input-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 340px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.intro-pass-input {
  width: 140px;
  height: 50px;
  background: #ffffff;
  border: var(--border-thick);
  box-shadow: var(--shadow);
  border-radius: var(--radius-md);
  font-family: var(--font-title);
  font-size: 1.45rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: 5px;
  color: var(--ink);
  outline: none;
  transition: var(--transition-bounce);
}

.intro-pass-input:focus {
  border-color: var(--pink-deep);
  box-shadow: var(--shadow-hover);
  background: #fff9fc;
}

.intro-pass-input.pass-error {
  border-color: #ef4444;
  background: #fef2f2;
}

.intro-pass-input.pass-success {
  border-color: #10b981;
  background: #ecfdf5;
}

.btn-pass-unlock {
  height: 50px;
  background: var(--pink);
  color: var(--ink);
  border: var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius-md);
  padding: 0 20px;
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition-bounce);
  flex-shrink: 0;
}

.btn-pass-unlock:hover {
  background: var(--yellow);
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hover);
}

.btn-pass-unlock:active {
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-pressed);
}

.password-error-tip {
  margin-top: 12px;
  background: #fee2e2;
  border: 1.5px solid #ef4444;
  box-shadow: 2px 2px 0 var(--ink);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-family: var(--font-title);
  font-size: 0.8rem;
  font-weight: 700;
  color: #b91c1c;
  animation: introPop 0.3s ease;
}

/* Shake Animation for Wrong Pass */
.shake-anim {
  animation: shakeCard 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shakeCard {
  10%, 90% { transform: translate3d(-3px, 0, 0); }
  20%, 80% { transform: translate3d(5px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

/* --------------------------------------------------------------------------
   7. NAVBAR (FLOATING NEUBRUTALIST PILL)
   -------------------------------------------------------------------------- */
.navbar {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 20px;
}

.nav-container {
  max-width: 1080px;
  margin: 0 auto;
  background: #ffffff;
  border: var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius-pill);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: var(--transition-bounce);
}

.brand-monogram {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-sparkle {
  color: var(--pink-deep);
  font-size: 1.1rem;
}

.brand-tag {
  background: var(--yellow);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  border-radius: var(--radius-pill);
  padding: 2px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  transform: rotate(-3deg);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-main);
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  transition: var(--transition-bounce);
}

.nav-link:hover {
  background: var(--pink-soft);
  border-color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  transform: translate(-1px, -1px);
}

.nav-link.active {
  background: var(--yellow);
  border-color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-identity-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--yellow-soft, #fff3b0);
  border: 2px solid var(--ink, #18181b);
  box-shadow: 2px 2px 0 var(--ink, #18181b);
  border-radius: var(--radius-pill, 9999px);
  padding: 4px 10px;
  font-family: var(--font-title, sans-serif);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--ink, #18181b);
  cursor: pointer;
  transition: var(--transition-bounce, all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1));
}

.user-identity-badge:hover {
  transform: translateY(-2px);
  background: var(--pink-soft, #ffe5ec);
}

.user-identity-badge .user-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
}

.control-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffffff;
  border: var(--border);
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-bounce);
}

.control-btn:hover {
  background: var(--pink-soft);
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow);
}

.control-btn:active {
  transform: translate(1px, 1px);
  box-shadow: var(--shadow-pressed);
}

/* Vinyl & Equalizer */
.vinyl-mini {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ink);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vinyl-mini.spinning {
  animation: spin 3s linear infinite;
}

.vinyl-center {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pink);
  border: 1px solid #ffffff;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

.equalizer {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.equalizer.active {
  display: flex;
}

.equalizer span {
  width: 3px;
  height: 100%;
  background: var(--pink-deep);
  border-radius: 2px;
  animation: eqBounce 0.8s ease-in-out infinite alternate;
}

.equalizer span:nth-child(2) { animation-delay: 0.2s; }
.equalizer span:nth-child(3) { animation-delay: 0.4s; }
.equalizer span:nth-child(4) { animation-delay: 0.1s; }

@keyframes eqBounce {
  0% { height: 20%; }
  100% { height: 100%; }
}

/* --------------------------------------------------------------------------
   8. HERO SECTION
   -------------------------------------------------------------------------- */
.hero-section {
  padding: 130px 0 60px;
  position: relative;
  text-align: center;
}

.hero-glow-orb {
  display: none; /* Removed for clean, sharp neubrutalism */
}

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

.hero-header-badge {
  background: var(--mint);
  border: var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 22px;
  font-family: var(--font-title);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  transform: rotate(-1deg);
  margin-bottom: 24px;
  transition: var(--transition-bounce);
  cursor: pointer;
  user-select: none;
}

.hero-header-badge:hover {
  transform: rotate(1.5deg) scale(1.03);
  box-shadow: var(--shadow-hover);
  background: var(--yellow-soft);
}

.hero-header-badge:active {
  transform: scale(0.97);
  box-shadow: var(--shadow-xs);
}

.hero-header-badge.notif-enabled {
  background: var(--yellow-soft);
  border-color: var(--ink);
}

.hero-header-badge.notif-enabled .badge-dot {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
}

.badge-notif-bell {
  font-size: 0.98rem;
  line-height: 1;
  display: inline-block;
  transition: transform 0.2s ease;
}

.hero-header-badge:hover .badge-notif-bell {
  animation: ringBell 0.6s ease;
}

@keyframes ringBell {
  0%, 100% { transform: rotate(0); }
  20%, 60% { transform: rotate(-15deg); }
  40%, 80% { transform: rotate(15deg); }
}

.badge-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pink-deep);
  border: 1.5px solid var(--ink);
  animation: pulseDot 1.4s infinite;
}

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

.hero-title {
  font-family: var(--font-title);
  font-size: 3.3rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 36px;
  max-width: 860px;
}

.hero-line-1 {
  display: block;
  white-space: nowrap;
}

.hero-line-2 {
  display: block;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 38px;
  line-height: 1.7;
  font-weight: 500;
}

.hero-subtitle strong {
  background: var(--yellow-soft);
  border: 1.5px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  border-radius: var(--radius-xs);
  padding: 2px 8px;
  color: var(--text-main);
}

/* --------------------------------------------------------------------------
   9. LIVE LOVE COUNTER CARD
   -------------------------------------------------------------------------- */
.counter-card {
  background: #ffffff;
  border: var(--border-thick);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  padding: 38px 36px;
  max-width: 780px;
  width: 100%;
  margin: 0 auto 56px;
  position: relative;
  transition: var(--transition-bounce);
}

.counter-card:hover {
  transform: translateY(-4px);
  box-shadow: 12px 12px 0 var(--ink);
}

.counter-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.counter-label {
  font-family: var(--font-title);
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

.counter-live-badge {
  background: var(--mint);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
  font-family: var(--font-title);
  font-size: 0.82rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.pulse-point {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink);
  animation: blinkPulse 1.2s infinite;
}

@keyframes blinkPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

.counter-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.counter-item {
  border: var(--border-thick);
  box-shadow: var(--shadow-xs);
  border-radius: var(--radius-md);
  padding: 22px 18px;
  min-width: 120px;
  text-align: center;
  transition: var(--transition-bounce);
}

/* Candy pastel backgrounds for each time unit */
.counter-item:nth-child(1) { background: var(--pink-soft); }
.counter-item:nth-child(3) { background: var(--yellow-soft); }
.counter-item:nth-child(5) { background: var(--mint-soft); }
.counter-item:nth-child(7) { background: var(--blue-soft); }

.counter-item:hover {
  transform: translateY(-5px) rotate(1.5deg);
  box-shadow: var(--shadow);
}

.counter-num {
  font-family: var(--font-title);
  font-size: 3.6rem;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1;
}

.counter-unit {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 8px;
}

.counter-divider {
  font-family: var(--font-title);
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0 -2px;
}

.counter-footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 2.5px dashed rgba(24, 24, 27, 0.2);
  font-family: var(--font-title);
  font-size: 1.05rem;
  color: var(--text-muted);
  font-weight: 700;
  text-align: center;
}

/* --------------------------------------------------------------------------
   10. HERO CINEMATIC PHOTO SHOWCASE (INTEGRATED IN COUNTER CARD)
   -------------------------------------------------------------------------- */
.hero-photo-frame {
  margin-top: 30px;
  width: 100%;
  background: #ffffff;
  border: var(--border-thick);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-md);
  padding: 12px 12px 16px;
  position: relative;
  transition: var(--transition-bounce);
  overflow: hidden;
}

.hero-photo-frame:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.hero-img-wrap {
  width: 100%;
  height: 380px;
  overflow: hidden;
  border: var(--border);
  border-radius: var(--radius-xs);
  position: relative;
  background: #f4ede4;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  display: block;
  transform: scale(1.5);
  transform-origin: center 45%;
  transition: transform 0.4s ease;
}

.hero-photo-frame:hover .hero-img {
  transform: scale(1.55);
}

.hero-photo-overlay {
  display: none;
}

.hero-photo-badge {
  position: absolute;
  bottom: 26px;
  left: 24px;
  background: var(--yellow);
  border: var(--border);
  box-shadow: var(--shadow-xs);
  border-radius: var(--radius-pill);
  padding: 6px 18px;
  font-family: var(--font-title);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  transform: rotate(-1.5deg);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-bounce);
  z-index: 2;
}

.hero-photo-badge:hover {
  transform: rotate(1.5deg) scale(1.05);
}

/* --------------------------------------------------------------------------
   11. LOVE LETTER & ENVELOPE SECTION
   -------------------------------------------------------------------------- */
.letter-section {
  padding: 80px 0;
}

.envelope-wrapper {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
}

.envelope {
  background: #fbf5e6; /* Vintage kraft parchment */
  border: var(--border-thick);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  position: relative;
  padding: 24px;
  transition: var(--transition-bounce);
  overflow: hidden;
}

.envelope-closed-decor {
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  cursor: pointer;
  padding: 10px;
}

.envelope.open .envelope-closed-decor,
.envelope.is-open .envelope-closed-decor {
  display: none !important;
}

/* 1. Retro Airmail Diagonal Candy Stripes Frame */
.retro-airmail-edge {
  position: absolute;
  inset: -14px;
  border-radius: calc(var(--radius-lg) - 4px);
  pointer-events: none;
  background: repeating-linear-gradient(
    -45deg,
    #ff70a6 0,
    #ff70a6 16px,
    #fffdfa 16px,
    #fffdfa 24px,
    #70b8ff 24px,
    #70b8ff 40px,
    #fffdfa 40px,
    #fffdfa 48px
  );
  padding: 10px;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.9;
  z-index: 1;
}

/* 2. Realistic 3D Envelope Top Flap */
.envelope-flap {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 200px solid transparent;
  border-right: 200px solid transparent;
  border-top: 130px solid #f6ecdc;
  filter: drop-shadow(0 3px 0 var(--ink)) drop-shadow(0 8px 12px rgba(24,24,27,0.12));
  pointer-events: none;
  z-index: 2;
}

.flap-stitches {
  position: absolute;
  top: -128px;
  left: -180px;
  width: 360px;
  height: 0;
  border-top: 2px dashed rgba(24, 24, 27, 0.35);
  pointer-events: none;
}

/* 3. Vintage Postal Marks Header */
.envelope-postal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  z-index: 4;
}

/* Par Avion Rubber Badge */
.par-avion-seal {
  background: #e0f2fe;
  border: 2px solid var(--ink);
  box-shadow: 2.5px 2.5px 0 var(--ink);
  border-radius: var(--radius-xs);
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: rotate(-3deg);
  transition: var(--transition-bounce);
}

.par-avion-seal:hover {
  transform: rotate(0deg) scale(1.05);
  background: var(--yellow-soft);
}

.par-avion-icon {
  font-size: 1.3rem;
  color: #0284c7;
}

.par-avion-labels {
  display: flex;
  flex-direction: column;
}

.par-avion-main {
  font-family: var(--font-title);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 1px;
  line-height: 1.1;
}

.par-avion-sub {
  font-size: 0.62rem;
  font-weight: 800;
  color: #0369a1;
  letter-spacing: 0.5px;
}

/* 4. Vintage Stamps Set with Perforations */
.vintage-stamps-set {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.v-stamp {
  width: 64px;
  height: 76px;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  border-radius: 4px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: var(--transition-bounce);
  cursor: pointer;
}

.v-stamp:hover {
  transform: scale(1.12) rotate(0deg) !important;
  z-index: 10;
}

.v-stamp-pickleball {
  background: #fef08a; /* Retro yellow */
  transform: rotate(4deg);
}

.v-stamp-heart {
  background: #fecdd3; /* Retro rose */
  transform: rotate(-3deg);
}

.v-stamp-body {
  border: 1.5px dashed var(--ink);
  border-radius: 2px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.v-stamp-emoji {
  font-size: 1.25rem;
  line-height: 1;
}

.v-stamp-label {
  font-family: var(--font-title);
  font-size: 0.58rem;
  font-weight: 800;
  color: var(--ink);
  margin-top: 2px;
}

.v-stamp-val {
  font-family: var(--font-title);
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--pink-deep);
}

/* Rubber Ink Postmark Cancellation */
.postmark-ink-stamp {
  position: absolute;
  right: -10px;
  top: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  transform: rotate(-10deg);
  pointer-events: none;
  opacity: 0.82;
}

.postmark-circle {
  width: 54px;
  height: 54px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: 0.52rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
  background: rgba(255, 255, 255, 0.45);
}

.p-date {
  font-weight: 800;
  color: var(--pink-deep);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 1px 3px;
  margin: 1px 0;
}

.postmark-wavy-lines {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.postmark-wavy-lines span {
  width: 44px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

/* 5. Horizontal Vintage Twine Band */
.envelope-twine-line {
  position: absolute;
  top: 96px;
  left: 0;
  right: 0;
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    #d97706 0,
    #d97706 8px,
    #fef3c7 8px,
    #fef3c7 16px
  );
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  opacity: 0.65;
  z-index: 2;
  transform: translateY(-50%);
}

/* 6. Romantic Address Block with vintage telegram guidelines */
.envelope-to-block {
  margin-top: 88px;
  margin-bottom: 20px;
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.75);
  border: 2px dashed rgba(24, 24, 27, 0.35);
  border-radius: var(--radius-sm);
  position: relative;
  z-index: 3;
}

.retro-address-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px dotted rgba(24, 24, 27, 0.25);
  flex-wrap: wrap;
}

.retro-address-line:last-child {
  border-bottom: none;
}

.addr-tag {
  font-family: var(--font-title);
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--pink-deep);
  letter-spacing: 0.5px;
  min-width: 46px;
}

.addr-content {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
}

.to-line .to-name {
  font-family: var(--font-script);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--pink-deep);
  margin: 0;
  line-height: 1.1;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.8);
}

.addr-sub {
  font-family: var(--font-title);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dim);
}

/* 7. 3D Embossed Wax Seal Button */
.envelope-seal-btn {
  width: 82px;
  height: 82px;
  position: absolute;
  top: 96px;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  cursor: pointer;
  transition: var(--transition-bounce);
  animation: sealBeat 2.2s ease-in-out infinite;
}

@keyframes sealBeat {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.08); }
}

.envelope-seal-btn:hover {
  transform: translate(-50%, -50%) scale(1.15) rotate(6deg) !important;
}

.wax-seal-outer-rim {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f43f5e, #be123c 65%, #881337 100%);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink), inset 0 2px 4px rgba(255, 255, 255, 0.4), inset 0 -3px 6px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.wax-seal-inner-rim {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(0, 0, 0, 0.08);
}

.wax-drip {
  position: absolute;
  background: #be123c;
  border: 2px solid var(--ink);
  border-radius: 50%;
  z-index: -1;
}

.wax-drip-1 {
  width: 22px;
  height: 28px;
  bottom: -6px;
  right: 14px;
}

.wax-drip-2 {
  width: 18px;
  height: 22px;
  top: -4px;
  left: 10px;
}

.seal-heart {
  font-size: 1.7rem;
  color: #ffffff;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.seal-prompt {
  font-family: var(--font-title);
  font-size: 0.65rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  margin-top: 2px;
}

/* 8. Retro Delivery Priority Sticker */
.retro-priority-sticker {
  align-self: center;
  background: var(--yellow);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  border-radius: var(--radius-pill);
  padding: 4px 16px;
  font-family: var(--font-title);
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  position: relative;
  z-index: 4;
}

.priority-star {
  color: var(--pink-deep);
  font-size: 0.85rem;
}

/* Letter Paper */
.letter-paper {
  display: none;
  background: #fffefb;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
  border-radius: var(--radius-md);
  padding: 40px 36px;
  position: relative;
  border-left: 6px solid var(--pink-soft);
  animation: letterSlideDown 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.envelope.open .letter-paper,
.envelope.is-open .letter-paper {
  display: block !important;
}

@keyframes letterSlideDown {
  0% { transform: translateY(-20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

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

.letter-date {
  background: var(--yellow-soft);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-pill);
  padding: 4px 14px;
  font-family: var(--font-title);
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 1.5px 1.5px 0 var(--ink);
}

.letter-monogram {
  color: var(--pink-deep);
  font-size: 1.35rem;
}

.letter-salutation {
  font-family: var(--font-title);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 18px;
}

.letter-body {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.85;
  color: #27272a;
  font-weight: 500;
  letter-spacing: 0.15px;
}

.letter-body p {
  margin-bottom: 20px;
}

.letter-signature {
  margin-top: 30px;
  text-align: right;
}

.signature-quote {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}

.signature-name {
  font-family: var(--font-script);
  font-size: 2.3rem;
  font-weight: 700;
  color: var(--pink-deep);
  margin-top: 4px;
}

.envelope-controls {
  text-align: center;
  margin-top: 20px;
}

/* --------------------------------------------------------------------------
   12. TIMELINE SECTION (5 AUTHENTIC MILESTONES)
   -------------------------------------------------------------------------- */
.timeline-section {
  padding: 80px 0;
}

.timeline-track {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}

.timeline-line-glow {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: transparent;
  border-left: 3.5px dashed var(--ink);
  transform: translateX(-50%);
  z-index: 1;
}

.timeline-card-item {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 54px;
  position: relative;
  width: 100%;
}

.timeline-card-item.reverse {
  justify-content: flex-end;
}

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--yellow);
  border: var(--border);
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
  z-index: 5;
  transition: var(--transition-bounce);
}

.timeline-dot.gold-glow {
  background: var(--pink);
  color: #ffffff;
  animation: pulseDot 1.6s infinite;
}

.timeline-card-item:hover .timeline-dot {
  transform: translateX(-50%) scale(1.15);
  box-shadow: var(--shadow);
}

.timeline-content {
  width: 44%;
  border: var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  transition: var(--transition-bounce);
}

/* Alternating candy pastel card themes */
.timeline-card-item:nth-child(2) .timeline-content { background: var(--mint-soft); }
.timeline-card-item:nth-child(3) .timeline-content { background: var(--yellow-soft); }
.timeline-card-item:nth-child(4) .timeline-content { background: var(--lavender-soft); }
.timeline-card-item:nth-child(5) .timeline-content { background: var(--blue-soft); }
.timeline-card-item:nth-child(6) .timeline-content { background: var(--pink-soft); border-width: 3.5px; box-shadow: var(--shadow-hover); }

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-tag {
  background: #ffffff;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-family: var(--font-title);
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--ink);
}

.timeline-tag.gold {
  background: var(--yellow);
}

.timeline-date {
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.timeline-heading {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
  line-height: 1.3;
}

.timeline-text {
  font-size: 0.96rem;
  line-height: 1.65;
  color: var(--text-muted);
  font-weight: 500;
}

.timeline-thumb {
  margin-top: 16px;
  border: var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  height: 180px;
  box-shadow: var(--shadow-xs);
}

.timeline-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.timeline-content:hover .timeline-thumb img {
  transform: scale(1.05);
}

/* --------------------------------------------------------------------------
   13. POLAROID GALLERY SECTION
   -------------------------------------------------------------------------- */
.gallery-section {
  padding: 80px 0;
}

.gallery-header-action {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  gap: 14px;
}

.btn-add-memory {
  background: var(--yellow);
  color: var(--ink);
  padding: 14px 28px;
  font-size: 1.05rem;
  font-weight: 800;
  border: var(--border-thick);
  box-shadow: var(--shadow);
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition-bounce);
}

.btn-add-memory:hover {
  background: var(--mint);
  transform: translateY(-4px) scale(1.03);
  box-shadow: var(--shadow-hover);
}

.btn-add-icon {
  font-size: 1.25rem;
}

.btn-badge-live {
  background: #ffffff;
  border: 1.5px solid var(--ink);
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-family: var(--font-title);
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--pink-deep);
}

.gallery-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: #ffffff;
  border: var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-muted);
}

.gallery-loading-spinner {
  font-size: 2.5rem;
  animation: spinHeart 1.5s infinite linear;
  margin-bottom: 12px;
}

@keyframes spinHeart {
  0% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.2) rotate(180deg); }
  100% { transform: scale(1) rotate(360deg); }
}

.polaroid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 36px;
  margin-top: 28px;
}

.polaroid-card {
  background: #ffffff;
  border: var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius-md);
  padding: 16px 16px 22px;
  position: relative;
  transition: var(--transition-bounce);
  cursor: pointer;
}

/* Playful alternating rotation */
.polaroid-card:nth-child(6n+1) { transform: rotate(-2deg); }
.polaroid-card:nth-child(6n+2) { transform: rotate(2.5deg); }
.polaroid-card:nth-child(6n+3) { transform: rotate(-1.5deg); }
.polaroid-card:nth-child(6n+4) { transform: rotate(2deg); }
.polaroid-card:nth-child(6n+5) { transform: rotate(-2.5deg); }
.polaroid-card:nth-child(6n+6) { transform: rotate(1.5deg); }

.polaroid-card:hover {
  transform: translateY(-8px) scale(1.04) rotate(0deg);
  box-shadow: var(--shadow-hover);
  z-index: 10;
}

/* Cute washi tapes */
.washi-tape {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 24px;
  border: 1.5px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  border-radius: 3px;
  z-index: 5;
}

.washi-1 { background: var(--pink); }
.washi-2 { background: var(--yellow); }
.washi-3 { background: var(--mint); }

/* Card Action Buttons (Edit / Delete) */
.polaroid-action-bar {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
  z-index: 25;
  opacity: 0.95;
  transition: var(--transition-bounce);
  pointer-events: auto;
}

.polaroid-card:hover .polaroid-action-bar {
  opacity: 1;
}

.btn-card-action,
.polaroid-btn-action {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
  background: #ffffff;
  transition: var(--transition-bounce);
  text-decoration: none;
  padding: 0;
  outline: none;
  pointer-events: auto;
}

.btn-card-action.btn-edit:hover,
.polaroid-btn-action.btn-edit:hover {
  background: var(--yellow);
  transform: scale(1.18);
}

.btn-card-action.btn-delete:hover,
.polaroid-btn-action.btn-delete:hover {
  background: var(--pink);
  transform: scale(1.18);
}

.polaroid-img-wrap {
  border: var(--border);
  border-radius: var(--radius-xs);
  overflow: hidden;
  height: 260px;
  position: relative;
}

.polaroid-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.polaroid-card:hover .polaroid-img {
  transform: scale(1.06);
}

.polaroid-caption {
  margin-top: 14px;
}

.caption-text {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  display: block;
  line-height: 1.45;
}

.caption-date {
  font-family: var(--font-title);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--pink-deep);
  margin-top: 6px;
  display: block;
}

/* --------------------------------------------------------------------------
   14. 3D FLIP CARDS (REASONS WHY I LOVE YOU)
   -------------------------------------------------------------------------- */
.reasons-section {
  padding: 80px 0;
}

.flip-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.flip-card {
  height: 240px;
  perspective: 1000px;
  cursor: pointer;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.flip-card:hover .flip-card-inner,
.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border: var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Front card candy colors */
.flip-card:nth-child(1) .flip-card-front { background: var(--mint-soft); }
.flip-card:nth-child(2) .flip-card-front { background: var(--lavender-soft); }
.flip-card:nth-child(3) .flip-card-front { background: var(--yellow-soft); }
.flip-card:nth-child(4) .flip-card-front { background: var(--pink-soft); }
.flip-card:nth-child(5) .flip-card-front { background: var(--blue-soft); }
.flip-card:nth-child(6) .flip-card-front { background: var(--peach-soft); }

.card-icon {
  font-size: 2.8rem;
  margin-bottom: 8px;
  line-height: 1;
}

.card-num {
  background: #ffffff;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  border-radius: var(--radius-pill);
  padding: 2px 10px;
  font-family: var(--font-title);
  font-size: 0.75rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.card-title {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
}

.card-hint {
  font-family: var(--font-title);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dim);
  margin-top: 8px;
}

.flip-card-back {
  background: #ffffff;
  transform: rotateY(180deg);
}

.back-text {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.65;
  color: var(--text-main);
}

.back-heart {
  font-size: 1.5rem;
  color: var(--pink-deep);
  margin-top: 10px;
}

/* --------------------------------------------------------------------------
   15. LOVE NOTES BOARD
   -------------------------------------------------------------------------- */
.notes-section {
  padding: 80px 0;
}

.notes-board-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sender-identity-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--pink-soft, #ffe5ec);
  border: 2px solid var(--ink, #18181b);
  box-shadow: 2px 2px 0 var(--ink, #18181b);
  border-radius: var(--radius-pill, 9999px);
  padding: 5px 12px;
  margin-bottom: 12px;
  font-family: var(--font-title, sans-serif);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink, #18181b);
  align-self: flex-start;
}

.sender-identity-label {
  opacity: 0.85;
  font-weight: 600;
}

.sender-identity-tag {
  color: var(--pink-deep, #e63946);
  font-weight: 800;
  background: #ffffff;
  padding: 2px 8px;
  border-radius: var(--radius-pill, 9999px);
  border: 1.5px solid var(--ink, #18181b);
}


.note-input-card {
  background: #ffffff;
  border: var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
  padding: 26px;
  max-width: 540px;
  width: 100%;
  margin-bottom: 42px;
}

.input-group {
  margin-bottom: 14px;
}

.input-group input,
.input-group textarea {
  width: 100%;
  border: var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  outline: none;
  background: #fdfdfd;
  transition: var(--transition-fast);
}

.input-group textarea {
  resize: vertical;
  min-height: 90px;
}

.input-group input:focus,
.input-group textarea:focus {
  background: #ffffff;
  box-shadow: var(--shadow-xs);
  border-color: var(--pink-deep);
}

.sticky-notes-wall {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
}

.sticky-note,
.note-card {
  width: 270px;
  height: 275px;
  min-height: 275px;
  max-width: 100%;
  padding: 26px 18px 14px;
  border: var(--border-thick);
  box-shadow: var(--shadow);
  border-radius: var(--radius-md);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-bounce);
  background: var(--yellow-soft);
  cursor: pointer;
  box-sizing: border-box;
}

/* Washi Tape on top */
.note-tape {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  width: 78px;
  height: 24px;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  border-radius: 3px;
  opacity: 0.95;
  z-index: 3;
}

.sticky-note::before {
  content: '';
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  width: 78px;
  height: 24px;
  background: rgba(255, 230, 109, 0.95);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  border-radius: 3px;
  z-index: 3;
}

/* If note-tape element is present inside, hide the ::before so they don't double */
.note-card:has(.note-tape)::before,
.sticky-note:has(.note-tape)::before {
  display: none;
}

/* Alternating candy pastel notes & subtle tilts */
.sticky-note:nth-child(4n+1), .note-card:nth-child(4n+1) { background: var(--yellow-soft); }
.sticky-note:nth-child(4n+2), .note-card:nth-child(4n+2) { background: var(--pink-soft); }
.sticky-note:nth-child(4n+3), .note-card:nth-child(4n+3) { background: var(--mint-soft); }
.sticky-note:nth-child(4n+4), .note-card:nth-child(4n+4) { background: var(--lavender-soft); }

.sticky-note:hover,
.note-card:hover {
  transform: translateY(-8px) scale(1.04) rotate(0deg) !important;
  box-shadow: var(--shadow-hover);
  z-index: 10;
}

.sticky-text,
.note-text {
  font-family: var(--font-hand);
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--text-main);
  font-weight: 600;
  margin: 0;
  word-break: break-word;
  white-space: pre-line;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.sticky-footer,
.note-footer {
  margin-top: auto;
  padding-top: 8px;
  border-top: 2px dashed rgba(24, 24, 27, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-title);
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
}

.sticky-author,
.note-author {
  color: var(--pink-deep);
  font-weight: 800;
}

.sticky-date,
.note-date {
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 600;
}

.note-comment-pill {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.9);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-pill, 999px);
  padding: 3px 10px;
  font-family: var(--font-title);
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--ink);
  box-shadow: 1.5px 1.5px 0 var(--ink);
  transition: var(--transition-fast);
  width: fit-content;
  flex-shrink: 0;
}

.sticky-note:hover .note-comment-pill,
.note-card:hover .note-comment-pill {
  background: var(--yellow);
  transform: translateY(-1px);
}

.btn-delete-note {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.65;
  transition: var(--transition-bounce);
  z-index: 5;
  padding: 0;
  line-height: 1;
}

.sticky-note:hover .btn-delete-note,
.note-card:hover .btn-delete-note,
.btn-delete-note:hover {
  opacity: 1;
  background: #fee2e2;
  color: #dc2626;
  transform: scale(1.1);
}

.notes-empty-state {
  text-align: center;
  padding: 40px 20px;
  background: #ffffff;
  border: var(--border-thick);
  box-shadow: var(--shadow);
  border-radius: var(--radius-md);
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   17. FOOTER
   -------------------------------------------------------------------------- */
.footer {
  background: #ffffff;
  border-top: var(--border-thick);
  padding: 50px 20px 80px;
  text-align: center;
  margin-top: 60px;
}

.footer-container {
  max-width: 600px;
  margin: 0 auto;
}

.footer-heart {
  font-size: 2.4rem;
  margin-bottom: 12px;
  display: inline-block;
  animation: bounceHeart 1.5s ease-in-out infinite;
}

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

.footer-quote {
  font-family: var(--font-title);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.footer-names {
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--pink-deep);
  margin-bottom: 6px;
}

.footer-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   18. MODALS (MEMORY CRUD & LIGHTBOX)
   -------------------------------------------------------------------------- */
.lightbox-modal,
.memory-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(24, 24, 27, 0.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-modal.active,
.lightbox-modal.open,
.memory-modal.active,
.memory-modal.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  background: #ffffff;
  border: var(--border-thick);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  padding: 16px;
  max-width: 650px;
  width: 100%;
  position: relative;
  text-align: center;
}

.lightbox-content img {
  border: var(--border);
  border-radius: var(--radius-md);
  max-height: 70vh;
  width: 100%;
  object-fit: contain;
}

.lightbox-caption {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 12px;
}

.lightbox-close,
.modal-close-btn {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--pink);
  border: var(--border);
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  transition: var(--transition-bounce);
  z-index: 10;
}

.lightbox-close:hover,
.modal-close-btn:hover {
  background: var(--yellow);
  transform: scale(1.15) rotate(9deg);
}

.memory-dialog {
  background: #fffdfa;
  border: var(--border-thick);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  max-width: 520px;
  width: 100%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.memory-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  border-bottom: 2px dashed var(--border-line);
  padding-bottom: 14px;
}

.modal-badge-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-badge {
  font-family: var(--font-title);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--pink-deep);
  letter-spacing: 0.5px;
}

.memory-title {
  font-family: var(--font-title);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.setting-field {
  margin-bottom: 18px;
}

.setting-field label {
  display: block;
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text-main);
}

.required-star {
  color: #ef4444;
  font-weight: 800;
}

.field-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 5px;
  font-style: italic;
}

.setting-field input,
.setting-field textarea {
  width: 100%;
  border: var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  background: #ffffff;
  color: var(--text-main);
  transition: var(--transition-fast);
}

.setting-field input:focus,
.setting-field textarea:focus {
  border-color: var(--pink-deep);
  box-shadow: var(--shadow-xs);
}

.photo-picker-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.photo-picker-text {
  font-family: var(--font-title);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dim);
}

.btn-file-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--mint-soft);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-family: var(--font-title);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition-bounce);
}

.btn-file-select:hover {
  background: var(--mint);
  transform: translateY(-2px);
}

.visually-hidden-file-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.file-hint-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
}

.memory-preview-container {
  margin-top: 14px;
  margin-bottom: 18px;
  background: #ffffff;
  border: 2px dashed var(--ink);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}

.preview-badge {
  display: block;
  font-family: var(--font-title);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.preview-polaroid-frame {
  max-width: 180px;
  margin: 0 auto;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  border-radius: var(--radius-xs);
  overflow: hidden;
  background: #ffffff;
}

.preview-polaroid-frame img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

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

/* --------------------------------------------------------------------------
   18.1 NOTE DETAIL & COMMENT THREAD MODAL (NEUBRUTALISM & MOBILE OPTIMIZED)
   -------------------------------------------------------------------------- */
#noteDetailModal {
  z-index: 20000 !important;
}

/* Hide floating audio bar completely while note detail, memory or user profile modal is open */
body.note-detail-open #floatingAudioBar,
body.note-detail-open .floating-audio-bar,
body.memory-modal-open #floatingAudioBar,
body.memory-modal-open .floating-audio-bar,
body.user-identity-open #floatingAudioBar,
body.user-identity-open .floating-audio-bar,
#noteDetailModal.open ~ #floatingAudioBar,
#noteDetailModal.active ~ #floatingAudioBar,
#noteDetailModal.open ~ .floating-audio-bar,
#noteDetailModal.active ~ .floating-audio-bar,
#memoryModal.open ~ #floatingAudioBar,
#memoryModal.active ~ #floatingAudioBar,
#memoryModal.open ~ .floating-audio-bar,
#memoryModal.active ~ .floating-audio-bar,
#userIdentityModal.open ~ #floatingAudioBar,
#userIdentityModal.active ~ #floatingAudioBar,
#userIdentityModal.open ~ .floating-audio-bar,
#userIdentityModal.active ~ .floating-audio-bar {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(140px) !important;
  transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s ease !important;
}

.note-detail-dialog {
  max-width: 580px;
  width: 95%;
  max-height: 90vh;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  padding: 22px 20px;
  background: #fffdfa;
  border: var(--border-thick);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}

.note-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 2px dashed rgba(24, 24, 27, 0.15);
  flex-shrink: 0;
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.note-detail-header .modal-close-btn {
  position: static;
  top: auto;
  right: auto;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: var(--pink);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  transition: var(--transition-bounce);
  -webkit-tap-highlight-color: transparent;
}

.note-detail-header .modal-close-btn:hover {
  background: #ff5983;
  transform: translateY(-2px);
  box-shadow: 3px 3px 0 var(--ink);
}

.note-detail-header .modal-close-btn:active {
  transform: translateY(1px);
  box-shadow: 1px 1px 0 var(--ink);
}

.modal-reload-btn {
  background: var(--yellow-soft, #fff3b0);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  font-family: var(--font-title);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-bounce);
  -webkit-tap-highlight-color: transparent;
}

.modal-reload-btn:hover {
  background: var(--yellow);
  transform: translateY(-2px);
  box-shadow: 3px 3px 0 var(--ink);
}

.modal-reload-btn:active {
  transform: translateY(1px);
  box-shadow: 1px 1px 0 var(--ink);
}

.modal-reload-btn .reload-icon {
  font-size: 0.95rem;
  display: inline-block;
  line-height: 1;
}

.modal-reload-btn .reload-icon.spin-anim {
  animation: spin 0.8s linear infinite;
}

.note-detail-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 6px 14px 2px;
}

.note-detail-content::-webkit-scrollbar {
  width: 5px;
}

.note-detail-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 10px;
}

.note-detail-content::-webkit-scrollbar-thumb {
  background: var(--pink-soft, #fca5a5);
  border-radius: 10px;
}

/* Featured sticky note inside detail modal */
.note-featured-card {
  position: relative;
  background: var(--yellow-soft, #fff3b0);
  border: 2px solid var(--ink);
  border-radius: var(--radius-md, 14px);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 16px 16px 10px;
  margin-top: 6px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  max-height: 165px;
  overflow: visible;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.note-featured-card.is-expanded {
  max-height: none !important;
}

.note-featured-body {
  flex: 1;
  min-height: 44px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
}

.note-featured-card.is-expanded .note-featured-body {
  max-height: none !important;
  overflow: visible !important;
}

.note-featured-body::-webkit-scrollbar {
  width: 4px;
}

.note-featured-body::-webkit-scrollbar-thumb {
  background: rgba(24, 24, 27, 0.2);
  border-radius: 4px;
}

.note-featured-tape {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 76px;
  height: 20px;
  background: var(--pink-soft, #ffe5ec);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  border-radius: 3px;
  z-index: 2;
}

.note-featured-text {
  font-family: var(--font-hand);
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--ink);
  font-weight: 700;
  margin: 0;
  word-break: break-word;
  white-space: pre-wrap;
}

.note-featured-footer {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1.5px dashed rgba(24, 24, 27, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-title);
  font-size: 0.78rem;
  font-weight: 800;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
}

.note-featured-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.note-featured-author {
  color: var(--pink-deep);
}

.btn-toggle-note-expand {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  border: 1.5px solid var(--ink);
  box-shadow: 1.5px 1.5px 0 var(--ink);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  font-family: var(--font-title);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  transition: var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
  margin-left: auto;
}

.btn-toggle-note-expand:hover {
  background: var(--yellow);
  transform: translateY(-1px);
  box-shadow: 2px 2px 0 var(--ink);
}

.btn-toggle-note-expand:active {
  transform: translateY(1px);
  box-shadow: 1px 1px 0 var(--ink);
}

.btn-toggle-note-expand .toggle-icon {
  font-size: 0.78rem;
  line-height: 1;
}

.note-featured-date {
  color: var(--text-muted);
  font-size: 0.72rem;
}

/* Comments thread container */
.comments-thread-container {
  background: #ffffff;
  border: 2px solid var(--ink);
  border-radius: var(--radius-md, 14px);
  padding: 12px 14px;
  box-shadow: 3px 3px 0 var(--ink);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: visible;
}

.comments-thread-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px dashed rgba(24, 24, 27, 0.12);
  padding-bottom: 8px;
  flex-shrink: 0;
}

.thread-title {
  font-family: var(--font-title);
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.thread-badge-count {
  background: var(--yellow, #ffea79);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--ink);
  box-shadow: 1px 1px 0 var(--ink);
}

/* Comments list (natural flow inside unified scroll) */
.note-comments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0;
  margin: 4px 0 0;
  overflow: visible !important;
  max-height: none !important;
  min-height: 40px;
}

.note-comments-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 10px;
}

.note-comments-list::-webkit-scrollbar-thumb {
  background: var(--pink-soft, #fca5a5);
  border-radius: 10px;
}

/* Empty state */
.comments-empty-state {
  text-align: center;
  padding: 24px 12px;
  color: var(--text-muted);
  margin: auto 0;
}

.comments-empty-state .empty-icon {
  font-size: 2.2rem;
  margin-bottom: 4px;
}

.comments-empty-state .empty-text {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 0.92rem;
  margin: 0;
  color: var(--ink);
}

.comments-empty-state .empty-sub {
  font-size: 0.8rem;
  margin: 4px 0 0;
  color: var(--text-dim);
}

/* Chat bubble styling */
.comment-bubble {
  background: #ffffff;
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm, 10px);
  padding: 10px 13px;
  box-shadow: 2px 2px 0 var(--ink);
  position: relative;
  transition: transform 0.15s ease;
  word-break: break-word;
}

.comment-bubble.bubble-anh {
  background: #f0fdfa;
  border-left: 5px solid #0d9488;
}

.comment-bubble.bubble-linh {
  background: #fff1f2;
  border-left: 5px solid #f43f5e;
}

.comment-bubble.bubble-default {
  background: #fffdf5;
  border-left: 5px solid #eab308;
}

.comment-bubble-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.comment-author-badge {
  font-family: var(--font-title);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.comment-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 700;
}

.btn-delete-comment {
  background: #fee2e2;
  border: 1px solid var(--ink);
  color: #991b1b;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.btn-delete-comment:hover {
  background: #ef4444;
  color: #ffffff;
  transform: scale(1.1);
}

.comment-bubble-content {
  font-family: var(--font-hand);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-main);
  margin: 0;
  white-space: pre-wrap;
}

/* Comment Form & Input Row */
.comment-input-box {
  border-top: 2px dashed rgba(24, 24, 27, 0.15);
  padding-top: 10px;
  margin-top: auto;
  flex-shrink: 0;
}

.comment-field-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.comment-textarea {
  flex: 1;
  min-height: 44px;
  max-height: 85px;
  padding: 10px 12px;
  font-family: var(--font-hand);
  font-size: 16px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm, 10px);
  background: #ffffff;
  box-shadow: 2px 2px 0 var(--ink);
  resize: none;
  outline: none;
  color: var(--ink);
  line-height: 1.4;
  transition: var(--transition-fast);
}

.comment-textarea:focus {
  border-color: var(--pink-deep);
  box-shadow: 2px 2px 0 var(--pink-deep);
}

.btn-send-comment {
  height: 44px;
  padding: 0 16px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--radius-sm, 10px) !important;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 0.88rem !important;
  flex-shrink: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.btn-send-comment .btn-send-text {
  font-weight: 800;
}

.btn-send-comment .btn-send-icon {
  font-size: 1rem;
}

/* --------------------------------------------------------------------------
   RESPONSIVE MOBILE FULL-SCREEN POPUP FOR NOTE DETAIL, MEMORY & USER PROFILE MODALS
   -------------------------------------------------------------------------- */
@media (max-width: 680px) {
  input,
  textarea,
  select {
    font-size: 16px !important;
  }

  #noteDetailModal,
  #memoryModal,
  #userIdentityModal {
    z-index: 20000 !important;
    padding: 0 !important;
    background: #fffdfa !important;
    align-items: stretch !important;
    justify-content: stretch !important;
  }

  #noteDetailModal .note-detail-dialog,
  #memoryModal .memory-dialog,
  #userIdentityModal .user-identity-dialog {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100% !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: calc(env(safe-area-inset-top, 0px) + 12px) 14px calc(env(safe-area-inset-bottom, 0px) + 10px) !important;
    display: flex !important;
    flex-direction: column !important;
    background: #fffdfa !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .note-detail-header,
  #memoryModal .memory-header,
  #userIdentityModal .memory-header {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 2px dashed rgba(24, 24, 27, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
  }

  .note-detail-header .modal-badge,
  #memoryModal .memory-header .modal-badge,
  #userIdentityModal .memory-header .modal-badge {
    font-size: 0.65rem;
    padding: 2px 7px;
  }

  .note-detail-header .memory-title,
  #memoryModal .memory-header .memory-title,
  #userIdentityModal .memory-header .memory-title {
    font-size: 1.15rem;
  }

  .modal-header-actions {
    margin-right: 0 !important;
    gap: 6px;
  }

  .modal-reload-btn {
    padding: 5px 9px;
    font-size: 0.72rem;
    gap: 4px;
  }

  .note-detail-header .modal-close-btn,
  #memoryModal .memory-header .modal-close-btn,
  #userIdentityModal .memory-header .modal-close-btn {
    position: static !important;
    top: auto !important;
    right: auto !important;
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
    background: var(--pink);
    border: 2px solid var(--ink);
    box-shadow: 2px 2px 0 var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    line-height: 1;
    color: var(--ink);
    cursor: pointer;
    margin: 0 !important;
    flex-shrink: 0;
  }

  .note-detail-content,
  #memoryModal .memory-form,
  #userIdentityModal .user-identity-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    padding: 2px 2px 14px;
  }

  /* Specific Memory Form tweaks on mobile */
  #memoryModal .memory-form {
    display: flex;
    flex-direction: column;
  }

  #memoryModal .memory-form .setting-field {
    margin-bottom: 12px;
  }

  #memoryModal .memory-form .setting-field label {
    font-size: 0.85rem;
    margin-bottom: 4px;
  }

  #memoryModal .memory-form .settings-actions {
    margin-top: auto;
    padding-top: 14px;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 6px);
    display: flex;
    gap: 10px;
    width: 100%;
  }

  #memoryModal .memory-form .settings-actions button {
    flex: 1;
    min-height: 44px;
    font-size: 0.95rem;
  }

  /* Specific User Identity tweaks on mobile */
  #userIdentityModal .identity-profile-summary {
    padding: 10px 14px;
    margin-bottom: 12px;
  }

  #userIdentityModal .identity-section-box {
    padding: 12px 14px;
    margin-bottom: 12px;
  }

  #userIdentityModal .identity-section-title {
    font-size: 0.9rem;
    margin-bottom: 3px;
  }

  #userIdentityModal .identity-section-desc {
    font-size: 0.78rem;
    margin-bottom: 8px;
  }

  #userIdentityModal .identity-chips-row {
    gap: 5px;
    margin-bottom: 10px;
  }

  #userIdentityModal .btn-name-chip {
    padding: 3px 8px;
    font-size: 0.74rem;
  }

  #userIdentityModal .identity-section-logout {
    margin-top: auto;
    padding-top: 10px;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 6px);
  }

  #userIdentityModal .btn-danger-logout {
    width: 100%;
    min-height: 44px;
    font-size: 0.92rem;
  }

  .note-featured-card {
    padding: 12px 12px 6px;
    margin-top: 2px;
    max-height: 135px;
    border-radius: 12px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    overflow: visible;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .note-featured-card.is-expanded {
    max-height: none !important;
  }

  .note-featured-body {
    flex: 1;
    min-height: 40px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .note-featured-card.is-expanded .note-featured-body {
    max-height: none !important;
    overflow: visible !important;
  }

  .note-featured-tape {
    width: 56px;
    height: 15px;
    top: -7px;
  }

  .note-featured-text {
    font-size: 0.94rem;
    line-height: 1.4;
  }

  .note-featured-footer {
    margin-top: 5px;
    padding-top: 4px;
    font-size: 0.72rem;
    flex-shrink: 0;
  }

  .btn-toggle-note-expand {
    padding: 2px 8px;
    font-size: 0.68rem;
    gap: 3px;
  }

  .comments-thread-container {
    flex: none;
    min-height: auto;
    padding: 10px 10px 8px;
    border-radius: 12px;
    border: 2px solid var(--ink);
    box-shadow: 2px 2px 0 var(--ink);
    display: flex;
    flex-direction: column;
    overflow: visible !important;
  }

  .comments-thread-header {
    padding-bottom: 6px;
    margin-bottom: 4px;
  }

  .thread-title {
    font-size: 0.88rem;
  }

  .thread-badge-count {
    font-size: 0.7rem;
    padding: 1px 7px;
  }

  .note-comments-list {
    flex: none;
    min-height: auto;
    max-height: none !important;
    gap: 8px;
    padding: 6px 0;
    overflow: visible !important;
  }

  .comment-bubble {
    padding: 8px 10px;
    border-radius: 10px;
    box-shadow: 1.5px 1.5px 0 var(--ink);
  }

  .comment-bubble-header {
    margin-bottom: 3px;
  }

  .comment-author-badge {
    font-size: 0.76rem;
  }

  .comment-time {
    font-size: 0.68rem;
  }

  .comment-bubble-content {
    font-size: 0.92rem;
    line-height: 1.45;
  }

  .comment-input-box {
    padding-top: 8px;
    margin-top: 0;
    border-top: 2px dashed rgba(24, 24, 27, 0.15);
    background: #fffdfa;
    flex-shrink: 0;
  }

  .comment-field-row {
    display: flex;
    align-items: flex-end;
    gap: 6px;
  }

  .comment-textarea {
    min-height: 42px;
    max-height: 70px;
    font-size: 16px !important; /* 16px prevents iOS Safari auto-zoom on focus */
    padding: 8px 10px;
    border-radius: 10px;
  }

  .btn-send-comment {
    height: 42px;
    padding: 0 12px !important;
    font-size: 0.82rem !important;
    border-radius: 10px !important;
  }
}

/* --------------------------------------------------------------------------
   VIEW ALL BUTTONS (MEMORIES & NOTES)
   -------------------------------------------------------------------------- */
.view-all-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 36px;
  width: 100%;
}

.btn-view-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--yellow-soft);
  color: var(--ink);
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 800;
  padding: 13px 32px;
  border: var(--border-thick);
  border-radius: var(--radius-pill);
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background 0.2s ease;
  text-decoration: none;
  user-select: none;
}

.btn-view-all:hover {
  transform: translate(-3px, -3px) scale(1.02);
  box-shadow: 7px 7px 0 var(--ink);
  background: var(--mint-soft);
}

.btn-view-all:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.btn-all-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.btn-all-arrow {
  font-size: 1.05rem;
  transition: transform 0.2s ease;
}

.btn-view-all:hover .btn-all-arrow {
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   ALL ITEMS MODALS (POLAROID ALBUM & LOVE NOTES WALL)
   -------------------------------------------------------------------------- */
.modal-dialog-large {
  max-width: 1080px;
  width: 95%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  background: #fffdfa;
}

.modal-all-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(88vh - 120px);
  padding: 16px 12px 24px;
  margin: 0 -8px;
}

.modal-all-scroll::-webkit-scrollbar {
  width: 8px;
}

.modal-all-scroll::-webkit-scrollbar-track {
  background: rgba(24, 24, 27, 0.05);
  border-radius: 4px;
}

.modal-all-scroll::-webkit-scrollbar-thumb {
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: 4px;
}

.modal-all-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--pink-deep);
}

.all-memories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  padding: 8px 4px;
}

.all-notes-wall {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  justify-content: center;
  width: 100%;
  padding: 8px 4px;
}

/* Modal layering hierarchy */
#allMemoriesModal,
#allNotesModal {
  z-index: 10001;
}

#memoryModal,
#musicSettingsModal {
  z-index: 10005;
}

#lightboxModal {
  z-index: 10010;
}

@media (max-width: 768px) {
  .modal-dialog-large {
    width: 96%;
    padding: 20px 14px;
    max-height: 92vh;
  }

  .modal-all-scroll {
    max-height: calc(92vh - 90px);
    padding: 10px 4px;
  }

  .all-memories-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
  }

  .btn-view-all {
    padding: 11px 22px;
    font-size: 0.92rem;
  }
}

@media (max-width: 480px) {
  .all-memories-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

/* --------------------------------------------------------------------------
   FLOATING NEUBRUTALISM AUDIO PLAYER (BOTTOM OF SCREEN)
   -------------------------------------------------------------------------- */
.floating-audio-bar {
  position: fixed;
  bottom: 24px;
  left: 28px;
  z-index: 10005;
  background: #ffffff;
  border: var(--border-thick);
  box-shadow: 4px 4px 0 var(--ink);
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, opacity 0.3s ease;
  user-select: none;
}

#musicSettingsModal {
  z-index: 10010;
}

.floating-audio-bar:hover {
  box-shadow: 6px 6px 0 var(--ink);
}

.audio-bar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Vinyl Disc & Info */
.audio-track-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.audio-disc {
  width: 38px;
  height: 38px;
  position: relative;
  flex-shrink: 0;
}

.disc-vinyl {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, #27272a 40%, #18181b 100%);
  border: 2px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 1px 1px 0 var(--ink);
  transition: transform 0.5s linear;
}

.floating-audio-bar.is-playing .disc-vinyl {
  animation: spinVinyl 3.5s linear infinite;
}

@keyframes spinVinyl {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.disc-center {
  font-size: 0.85rem;
  line-height: 1;
}

.audio-meta {
  display: flex;
  flex-direction: column;
  white-space: nowrap;
}

.audio-title {
  font-family: var(--font-title);
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.audio-artist {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Play/Pause Button */
.audio-btn-play {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--yellow);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
  transition: var(--transition-bounce);
  flex-shrink: 0;
}

.audio-btn-play:hover {
  background: var(--pink);
  transform: scale(1.12);
}

.audio-btn-play:active {
  transform: scale(0.95);
  box-shadow: 1px 1px 0 var(--ink);
}

/* Timeline & Progress Bar */
.audio-timeline-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.audio-time {
  font-family: var(--font-title);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 34px;
}

.audio-progress-container {
  width: 120px;
  height: 10px;
  background: #f4f4f5;
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: inset 1px 1px 0 rgba(0,0,0,0.1);
}

.audio-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--yellow));
  border-radius: var(--radius-pill);
  transition: width 0.15s ease;
}

/* Volume Control */
.audio-volume-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.audio-vol-icon-btn {
  background: none;
  border: none;
  font-size: 1.05rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0;
}

.audio-volume-slider {
  width: 65px;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: #e4e4e7;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

.audio-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--pink);
  border: 1.5px solid var(--ink);
  box-shadow: 1px 1px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.audio-volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: var(--yellow);
}

/* Dancing Equalizer Waves */
.audio-waves {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
  padding: 0 2px;
}

.audio-waves span {
  width: 3.5px;
  height: 4px;
  background: var(--pink-deep);
  border-radius: 2px;
  transition: height 0.2s ease;
}

.floating-audio-bar.is-playing .audio-waves span:nth-child(1) {
  animation: danceWave 0.7s ease-in-out infinite alternate;
}
.floating-audio-bar.is-playing .audio-waves span:nth-child(2) {
  animation: danceWave 0.5s ease-in-out infinite alternate 0.15s;
}
.floating-audio-bar.is-playing .audio-waves span:nth-child(3) {
  animation: danceWave 0.8s ease-in-out infinite alternate 0.3s;
}
.floating-audio-bar.is-playing .audio-waves span:nth-child(4) {
  animation: danceWave 0.6s ease-in-out infinite alternate 0.45s;
}

@keyframes danceWave {
  0% { height: 4px; }
  100% { height: 18px; }
}

/* Collapse / Mini state */
.audio-collapse-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: #f4f4f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  margin-left: 2px;
  transition: var(--transition-bounce);
}

.audio-collapse-btn:hover {
  background: var(--pink);
}

/* Audio Settings Button (YouTube Song Switcher) */
.audio-settings-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
  margin-left: 2px;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease;
  flex-shrink: 0;
}

.audio-settings-btn:hover {
  background: var(--yellow);
  transform: rotate(60deg) scale(1.08);
}

/* Collapsed Mini Pill State */
.floating-audio-bar.is-collapsed,
.floating-audio-bar.collapsed {
  padding: 6px 12px;
  cursor: pointer;
}

.floating-audio-bar.is-collapsed .audio-bar-inner,
.floating-audio-bar.collapsed .audio-bar-inner {
  gap: 8px;
}

.floating-audio-bar.is-collapsed .audio-meta,
.floating-audio-bar.is-collapsed .audio-timeline-wrap,
.floating-audio-bar.is-collapsed .audio-volume-wrap,
.floating-audio-bar.is-collapsed .audio-waves,
.floating-audio-bar.is-collapsed .audio-settings-btn,
.floating-audio-bar.collapsed .audio-meta,
.floating-audio-bar.collapsed .audio-timeline-wrap,
.floating-audio-bar.collapsed .audio-volume-wrap,
.floating-audio-bar.collapsed .audio-waves,
.floating-audio-bar.collapsed .audio-settings-btn {
  display: none !important;
}

.floating-audio-bar.is-collapsed .audio-collapse-btn,
.floating-audio-bar.collapsed .audio-collapse-btn {
  background: var(--yellow);
}

.floating-audio-bar.is-collapsed .audio-collapse-btn:hover,
.floating-audio-bar.collapsed .audio-collapse-btn:hover {
  background: var(--pink);
}

.floating-audio-bar.is-collapsed .audio-collapse-btn #collapseIcon,
.floating-audio-bar.collapsed .audio-collapse-btn #collapseIcon {
  display: inline-block;
  transform: none;
}

/* Navbar CTA link */
.nav-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-family: var(--font-title);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  transition: var(--transition-bounce);
}

.nav-cta-btn:hover {
  background: var(--pink);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   19. MOBILE FLOATING GLASS BOTTOM NAVIGATION
   -------------------------------------------------------------------------- */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2.5px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  border-radius: var(--radius-pill);
  padding: 5px 8px;
  gap: 8px;
  align-items: center;
  justify-content: center;
  max-width: calc(100vw - 20px);
}

.mobile-nav-item {
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  color: var(--text-main);
  background: transparent;
  border: 2px solid transparent;
  transition: var(--transition-bounce);
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.mobile-nav-icon {
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-label {
  display: none !important; /* Hide navigation labels on mobile, keep only icons */
}

.mobile-nav-item:hover,
.mobile-nav-item:focus {
  background: var(--pink-soft);
  transform: translateY(-2px);
}

.mobile-nav-item.active {
  background: var(--yellow);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  transform: translateY(-2px) scale(1.08);
}

/* --------------------------------------------------------------------------
   20. RESPONSIVE MEDIA QUERIES (MOBILE PERFECTION & ICON HARMONY)
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  body {
    padding-bottom: 85px; /* Clean spacing for floating audio bar */
  }

  .nav-menu {
    display: none;
  }

  .mobile-bottom-nav {
    display: none !important;
  }

  /* Compact Navbar for mobile */
  .navbar {
    top: 10px;
    padding: 0 12px;
  }

  .nav-container {
    padding: 8px 14px;
    gap: 10px;
  }

  .brand-monogram {
    font-size: 1.1rem;
    gap: 6px;
  }

  .brand-tag {
    display: none !important;
  }

  .nav-cta-btn {
    display: none !important;
  }

  .intro-screen {
    padding-bottom: 84px;
  }

  /* Floating audio player: sleek, low-profile docked at bottom of mobile screen */
  .floating-audio-bar {
    bottom: 16px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: calc(100vw - 20px);
    max-width: 440px;
    padding: 6px 12px;
    box-shadow: 3px 3px 0 var(--ink);
    border-radius: var(--radius-pill);
    z-index: 10005;
  }

  .audio-bar-inner {
    gap: 8px;
    justify-content: space-between;
    width: 100%;
  }

  .floating-audio-bar .audio-disc {
    width: 32px;
    height: 32px;
  }

  .floating-audio-bar .disc-center {
    font-size: 0.72rem;
  }

  .floating-audio-bar .audio-meta {
    max-width: 80px;
    overflow: hidden;
  }

  .floating-audio-bar .audio-title {
    font-size: 0.78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .floating-audio-bar .audio-artist {
    display: none; /* Hide artist on mobile to prevent crowding */
  }

  .floating-audio-bar .audio-btn-play {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
  }

  .floating-audio-bar .audio-btn-play svg {
    width: 15px;
    height: 15px;
  }

  .floating-audio-bar .audio-timeline-wrap {
    flex: 1;
    min-width: 0;
    gap: 6px;
  }

  .floating-audio-bar .audio-time {
    font-size: 0.7rem;
    min-width: 26px;
  }

  .floating-audio-bar #audioDuration {
    display: none; /* Hide duration on mobile to give progress bar space */
  }

  .floating-audio-bar .audio-progress-container {
    width: 100%;
    flex: 1;
    min-width: 45px;
    height: 8px;
  }

  .floating-audio-bar .audio-volume-wrap,
  .floating-audio-bar .audio-waves {
    display: none; /* Hide volume slider and waves to save horizontal space */
  }

  .floating-audio-bar .audio-settings-btn,
  .floating-audio-bar .audio-collapse-btn {
    width: 22px;
    height: 22px;
    font-size: 0.65rem;
    flex-shrink: 0;
  }

  /* Collapsed mobile mini-widget: docks gracefully to bottom-right */
  .floating-audio-bar.is-collapsed,
  .floating-audio-bar.collapsed {
    width: auto !important;
    max-width: none !important;
    left: auto !important;
    right: 14px !important;
    bottom: 72px !important;
    transform: none !important;
    padding: 4px 10px !important;
  }

  .floating-audio-bar.is-collapsed .audio-bar-inner,
  .floating-audio-bar.collapsed .audio-bar-inner {
    width: auto;
    gap: 6px;
  }

  /* Hero adjustments */
  .hero-section {
    padding: 100px 0 45px;
  }

  .hero-header-badge {
    font-size: 0.78rem;
    padding: 6px 14px;
    margin-bottom: 18px;
  }

  .hero-title {
    font-size: clamp(1.85rem, 5.8vw, 2.7rem);
    line-height: 1.22;
    margin-bottom: 24px;
    text-wrap: balance;
  }

  .hero-line-1 {
    display: block;
    margin-bottom: 6px;
  }

  .hero-line-2 {
    display: block;
    font-size: clamp(1.7rem, 5.2vw, 2.45rem);
  }

  .hero-subtitle {
    font-size: 0.98rem;
    margin-bottom: 28px;
    padding: 0 8px;
  }

  .section-title {
    font-size: 2rem;
  }

  .section-desc {
    font-size: 0.92rem;
    padding: 0 10px;
  }

  /* Counter card mobile */
  .counter-card {
    padding: 26px 16px;
    max-width: 100%;
    margin-bottom: 42px;
  }

  .counter-top-bar {
    margin-bottom: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .counter-label {
    font-size: clamp(0.72rem, 3.2vw, 0.85rem);
    white-space: nowrap;
    letter-spacing: 0.8px;
    flex-shrink: 1;
  }

  .counter-live-badge {
    padding: 2px 8px;
    font-size: 0.65rem;
    flex-shrink: 0;
  }

  .counter-grid {
    gap: 8px;
    justify-content: center;
  }

  .counter-item {
    min-width: 66px;
    padding: 12px 6px;
    flex: 1;
  }

  .counter-num {
    font-size: 2.15rem;
  }

  .counter-unit {
    font-size: 0.75rem;
  }

  .counter-divider {
    font-size: 1.5rem;
    margin: 0 -2px;
  }

  .hero-img-wrap {
    height: 280px;
  }

  .hero-photo-badge {
    bottom: 20px;
    left: 16px;
    padding: 4px 12px;
    font-size: 0.78rem;
  }

  /* Retro Envelope Mobile Tuning - Zero Icon Overlap */
  .envelope {
    padding: 14px;
  }

  .envelope-closed-decor {
    min-height: 380px;
    padding: 6px;
  }

  .envelope-flap {
    top: -16px;
    border-left-width: 140px;
    border-right-width: 140px;
    border-top-width: 78px;
  }

  .flap-stitches {
    top: -76px;
    left: -120px;
    width: 240px;
  }

  .envelope-twine-line {
    top: 66px;
  }

  .envelope-seal-btn {
    width: 68px;
    height: 68px;
    top: 66px;
  }

  .wax-seal-inner-rim {
    width: 52px;
    height: 52px;
  }

  .seal-heart {
    font-size: 1.35rem;
  }

  .seal-prompt {
    font-size: 0.55rem;
  }

  .wax-drip-1 {
    width: 16px;
    height: 20px;
    bottom: -4px;
    right: 8px;
  }

  .wax-drip-2 {
    width: 14px;
    height: 16px;
    top: -3px;
    left: 6px;
  }

  /* Top postal marks header mobile */
  .envelope-postal-header {
    gap: 8px;
  }

  .par-avion-seal {
    padding: 4px 8px;
    gap: 6px;
  }

  .par-avion-icon {
    font-size: 1.05rem;
  }

  .par-avion-main {
    font-size: 0.74rem;
  }

  .par-avion-sub {
    font-size: 0.52rem;
  }

  .vintage-stamps-set {
    gap: 6px;
  }

  .v-stamp {
    width: 48px;
    height: 58px;
    padding: 3px;
  }

  .v-stamp-emoji {
    font-size: 1rem;
  }

  .v-stamp-label {
    font-size: 0.48rem;
  }

  .v-stamp-val {
    font-size: 0.52rem;
  }

  .postmark-ink-stamp {
    right: -8px;
    top: 8px;
  }

  .postmark-circle {
    width: 42px;
    height: 42px;
    font-size: 0.42rem;
  }

  .postmark-wavy-lines span {
    width: 26px;
    height: 1.5px;
  }

  /* Address block mobile: starts cleanly below the wax seal */
  .envelope-to-block {
    margin-top: 54px;
    margin-bottom: 14px;
    padding: 12px 14px;
  }

  .retro-address-line {
    gap: 6px;
    padding: 3px 0;
  }

  .addr-tag {
    font-size: 0.7rem;
    min-width: 38px;
  }

  .addr-content {
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .to-line .to-name {
    font-size: 2rem;
  }

  .addr-sub {
    font-size: 0.72rem;
  }

  .retro-priority-sticker {
    font-size: 0.68rem;
    padding: 3px 12px;
    margin-top: 6px;
  }

  .carousel-swipe-hint {
    display: inline-flex !important;
  }

  .section-badge {
    transform: none !important;
  }

  /* Letter Paper Mobile */
  .letter-paper {
    padding: 26px 20px;
    border-left: 5px solid var(--pink-soft);
  }

  .letter-salutation {
    font-size: 1.25rem;
    margin-bottom: 14px;
  }

  .letter-body {
    font-size: 0.98rem;
    line-height: 1.8;
    color: #27272a;
  }

  .letter-body p {
    margin-bottom: 16px;
  }

  .signature-name {
    font-size: 1.9rem;
  }

  /* --------------------------------------------------------------------------
     Polaroid Gallery Mobile (Horizontal Swipeable Carousel)
     -------------------------------------------------------------------------- */
  .polaroid-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 20px;
    scroll-padding-right: 20px;
    -webkit-overflow-scrolling: touch;
    gap: 16px;
    padding: 16px 20px 24px 20px !important;
    margin: 16px -24px 0 -24px !important;
    width: calc(100% + 48px) !important;
    max-width: none !important;
    box-sizing: border-box;
  }

  .polaroid-grid::-webkit-scrollbar {
    height: 6px;
  }

  .polaroid-grid::-webkit-scrollbar-track {
    background: rgba(24, 24, 27, 0.06);
    border-radius: 10px;
    margin: 0 24px;
  }

  .polaroid-grid::-webkit-scrollbar-thumb {
    background: var(--pink-soft, #fca5a5);
    border-radius: 10px;
    border: 1.5px solid var(--ink);
  }

  .polaroid-card {
    flex: 0 0 260px !important;
    width: 260px !important;
    max-width: 80vw !important;
    scroll-snap-align: start;
    padding: 12px 12px 18px;
    transform: none !important; /* Flat alignment for smooth horizontal carousel */
    box-sizing: border-box;
  }

  .polaroid-action-bar {
    opacity: 1; /* Always visible for touch screen interaction */
    top: 8px;
    right: 8px;
  }

  .btn-card-action {
    width: 34px;
    height: 34px;
    font-size: 0.88rem;
  }

  .washi-tape {
    width: 76px;
    height: 20px;
    top: -10px;
  }

  .btn-add-memory {
    padding: 12px 20px;
    font-size: 0.92rem;
  }

  /* --------------------------------------------------------------------------
     Sticky Notes Wall Mobile (Horizontal Swipeable Carousel)
     -------------------------------------------------------------------------- */
  .notes-section .sticky-notes-wall {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 20px;
    scroll-padding-right: 20px;
    -webkit-overflow-scrolling: touch;
    gap: 16px;
    padding: 16px 20px 24px 20px !important;
    margin: 10px -24px 0 -24px !important;
    width: calc(100% + 48px) !important;
    max-width: none !important;
    justify-content: flex-start !important;
    box-sizing: border-box;
  }

  .notes-section .sticky-notes-wall::-webkit-scrollbar {
    height: 6px;
  }

  .notes-section .sticky-notes-wall::-webkit-scrollbar-track {
    background: rgba(24, 24, 27, 0.06);
    border-radius: 10px;
    margin: 0 24px;
  }

  .notes-section .sticky-notes-wall::-webkit-scrollbar-thumb {
    background: var(--yellow, #ffea79);
    border-radius: 10px;
    border: 1.5px solid var(--ink);
  }

  .notes-section .sticky-note,
  .notes-section .note-card {
    flex: 0 0 250px !important;
    width: 250px !important;
    max-width: 78vw !important;
    height: 265px !important;
    min-height: 265px !important;
    scroll-snap-align: start;
    transform: none !important; /* Flat alignment for smooth horizontal carousel */
    box-sizing: border-box;
  }

  .btn-badge-live {
    display: none;
  }

  /* Reasons Flip Cards Mobile */
  .flip-cards-grid {
    grid-template-columns: 1fr;
    max-width: 340px;
    margin: 0 auto;
    gap: 18px;
  }

  .flip-card {
    height: 220px;
  }

  .card-icon {
    font-size: 2.2rem;
  }

  .card-title {
    font-size: 1.2rem;
  }

  .back-text {
    font-size: 0.9rem;
    line-height: 1.5;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero-title {
    font-size: clamp(1.65rem, 6.8vw, 2.15rem);
    line-height: 1.24;
    margin-bottom: 22px;
    text-wrap: balance;
  }

  .hero-line-1 {
    display: block;
    margin-bottom: 4px;
    white-space: normal;
  }

  .hero-line-2 {
    display: block;
    font-size: clamp(1.5rem, 6vw, 1.95rem);
  }

  .counter-card {
    padding: 20px 14px;
    margin-bottom: 32px;
  }

  .counter-top-bar {
    gap: 6px;
    flex-wrap: nowrap;
  }

  .counter-label {
    font-size: clamp(0.66rem, 3.1vw, 0.78rem);
    letter-spacing: 0.5px;
    white-space: nowrap;
  }

  .counter-live-badge {
    padding: 2px 7px;
    font-size: 0.62rem;
    flex-shrink: 0;
  }

  .counter-grid {
    gap: 6px;
  }

  .counter-item {
    min-width: 56px;
    padding: 10px 4px;
  }

  .counter-num {
    font-size: 1.8rem;
  }

  .counter-unit {
    font-size: 0.68rem;
    margin-top: 5px;
  }

  .counter-divider {
    font-size: 1.3rem;
  }

  .intro-card {
    padding: 30px 18px;
  }

  .intro-names {
    font-size: 1.75rem;
  }

  .envelope-flap {
    border-left-width: 110px;
    border-right-width: 110px;
    border-top-width: 66px;
  }

  .envelope-seal-btn {
    width: 62px;
    height: 62px;
    top: 58px;
  }

  .envelope-twine-line {
    top: 58px;
  }

  .envelope-to-block {
    margin-top: 48px;
    padding: 10px 10px;
  }

  .to-line .to-name {
    font-size: 1.75rem;
  }

  .v-stamp {
    width: 42px;
    height: 52px;
  }

  .v-stamp-emoji {
    font-size: 0.9rem;
  }

  .v-stamp-label {
    font-size: 0.42rem;
  }

  .v-stamp-val {
    font-size: 0.48rem;
  }

  .postmark-circle {
    width: 36px;
    height: 36px;
    font-size: 0.38rem;
  }

  .floating-audio-bar {
    width: calc(100vw - 16px);
    padding: 5px 8px;
    bottom: 14px;
  }

  .floating-audio-bar .audio-meta {
    max-width: 68px;
  }

  .floating-audio-bar .audio-title {
    font-size: 0.74rem;
  }

  .floating-audio-bar .audio-progress-container {
    min-width: 35px;
  }

  /* Mobile Notes & Memory Dialog ergonomics */
  .notes-section {
    padding-bottom: 120px;
  }

  .polaroid-grid {
    margin: 10px -16px 0 -16px !important;
    width: calc(100% + 32px) !important;
    padding: 12px 16px 20px 16px !important;
    gap: 14px !important;
  }

  .polaroid-card {
    flex: 0 0 245px !important;
    width: 245px !important;
    max-width: 76vw !important;
    padding: 10px 10px 16px !important;
  }

  .polaroid-img-wrap {
    height: 190px !important;
  }

  .notes-section .sticky-notes-wall {
    margin: 10px -16px 0 -16px !important;
    width: calc(100% + 32px) !important;
    padding: 12px 16px 20px 16px !important;
    gap: 14px !important;
  }

  .notes-section .sticky-note,
  .notes-section .note-card {
    flex: 0 0 240px !important;
    width: 240px !important;
    max-width: 75vw !important;
    height: 250px !important;
    min-height: 250px !important;
    padding: 20px 14px 12px !important;
  }

  .note-input-card {
    padding: 18px 14px;
    width: 100%;
    margin-bottom: 24px;
  }

  #noteContentInput {
    font-size: 16px !important;
    padding: 12px 14px;
    line-height: 1.5;
  }

  #sendNoteBtn {
    width: 100%;
    min-height: 46px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
  }

  #allMemoriesModal .memory-dialog,
  #allNotesModal .memory-dialog,
  #musicSettingsModal .memory-dialog {
    width: 95%;
    max-height: 92vh;
    padding: 24px 16px;
  }

  .settings-actions {
    display: flex;
    gap: 10px;
    width: 100%;
  }

  .settings-actions button {
    flex: 1;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
  }
}

@media (max-width: 380px) {
  .hero-title {
    font-size: 1.55rem;
    line-height: 1.25;
    text-wrap: balance;
  }

  .hero-line-1 {
    display: block;
    margin-bottom: 4px;
    white-space: normal;
  }

  .hero-line-2 {
    display: block;
    font-size: 1.4rem;
  }

  .counter-card {
    padding: 16px 10px;
  }

  .counter-label {
    font-size: 0.62rem;
    letter-spacing: 0.2px;
    white-space: nowrap;
  }

  .counter-live-badge {
    padding: 2px 5px;
    font-size: 0.56rem;
  }

  .brand-tag {
    display: none; /* Hide 'Since 31.08' badge on ultra narrow phones to prevent header cram */
  }

  .par-avion-sub {
    display: none;
  }

  .hero-photo-badge {
    font-size: 0.72rem;
    padding: 3px 8px;
  }
}

/* --------------------------------------------------------------------------
   19. APP TOAST NOTIFICATION BANNER (NEUBRUTALISM STYLE)
   -------------------------------------------------------------------------- */
.app-toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10020;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 380px;
  width: calc(100% - 32px);
  pointer-events: none;
}

.app-toast {
  pointer-events: auto;
  background: #ffffff;
  border: var(--border-thick);
  border-radius: var(--radius-md);
  box-shadow: 5px 5px 0 var(--ink);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  position: relative;
  overflow: hidden;
}

.app-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.app-toast:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 7px 7px 0 var(--ink);
}

.app-toast-icon {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
}

.app-toast-img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-xs);
  border: 1.5px solid var(--ink);
  object-fit: cover;
  flex-shrink: 0;
}

.app-toast-body {
  flex: 1;
  min-width: 0;
}

.app-toast-title {
  font-family: var(--font-title);
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 4px;
  line-height: 1.3;
}

.app-toast-text {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--text-main);
  margin: 0;
  line-height: 1.4;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-toast-close {
  background: transparent;
  border: none;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0 4px;
  line-height: 1;
  margin-left: 4px;
  transition: color 0.15s ease;
}

.app-toast-close:hover {
  color: #ef4444;
}

.app-toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--pink-deep);
  width: 100%;
  animation: toastTimer linear forwards;
}

@keyframes toastTimer {
  from { width: 100%; }
  to { width: 0%; }
}

@media (max-width: 480px) {
  .app-toast-container {
    top: 16px;
    right: 16px;
    left: 16px;
    width: auto;
    max-width: 100%;
  }
}

/* --------------------------------------------------------------------------
   USER IDENTITY & PROFILE MODAL (NEUBRUTALISM STYLE)
   -------------------------------------------------------------------------- */
.user-identity-dialog {
  max-width: 460px;
}

.user-identity-content {
  width: 100%;
}

.identity-profile-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--yellow-soft, #fff3b0);
  border: var(--border);
  box-shadow: 3px 3px 0 var(--ink);
  border-radius: var(--radius-md, 16px);
  padding: 14px 18px;
  margin-bottom: 20px;
}

.identity-avatar-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.identity-info-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.identity-role-label {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.identity-active-name {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.identity-section-box {
  background: #ffffff;
  border: var(--border);
  box-shadow: 3px 3px 0 var(--ink);
  border-radius: var(--radius-md, 16px);
  padding: 16px 18px;
  margin-bottom: 18px;
}

.identity-section-title {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.identity-section-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.identity-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.btn-name-chip {
  background: var(--cream, #fffdfa);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 1px 1px 0 var(--ink);
  transition: var(--transition-fast);
  color: var(--ink);
}

.btn-name-chip:hover {
  background: var(--pink-soft, #ffe5ec);
  transform: translateY(-1px);
}

.btn-name-chip:active {
  transform: translateY(1px);
  box-shadow: none;
}

.input-with-button {
  display: flex;
  gap: 8px;
}

.identity-custom-input {
  flex: 1;
  border: var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  outline: none;
  background: #ffffff;
  color: var(--text-main);
  transition: var(--transition-fast);
}

.identity-custom-input:focus {
  border-color: var(--pink-deep);
  box-shadow: var(--shadow-xs);
}

.passcode-input {
  letter-spacing: 4px;
  font-weight: 800;
  text-align: center;
}

.btn-save-action {
  padding: 8px 16px;
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.identity-success-tip {
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  border: 1.5px solid #10b981;
  border-radius: 8px;
  padding: 6px 10px;
  animation: introPop 0.3s ease;
}

.identity-error-tip {
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #dc2626;
  background: #fef2f2;
  border: 1.5px solid #ef4444;
  border-radius: 8px;
  padding: 6px 10px;
  animation: shake 0.4s ease;
}

.identity-section-logout {
  margin-top: 10px;
  border-top: 2px dashed var(--border-line);
  padding-top: 16px;
}

.btn-danger-logout {
  width: 100%;
  background: #fee2e2;
  color: #991b1b;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  border-radius: var(--radius-pill);
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 0.92rem;
  padding: 10px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-bounce);
}

.btn-danger-logout:hover {
  background: #fecaca;
  transform: translateY(-2px);
  box-shadow: 3px 3px 0 var(--ink);
}

.btn-danger-logout:active {
  transform: translateY(1px);
  box-shadow: 1px 1px 0 var(--ink);
}


