/* ==========================================================================
   Cresaenium Design System & Custom Styles (Handdrawn Storybook)
   Palette: Primary Terracotta (#882A0A), Secondary Amber (#FFB563),
            Tertiary Moss (#918450), Neutral Sand (#FFD29D), Parchment (#FFF8F0 / #FFFDF8)
   Typography: Newsreader (Headlines & Serif), Plus Jakarta Sans (Body & Labels)
   ========================================================================== */

:root {
  --color-primary: #882A0A;
  --color-primary-container: #B64718;
  --color-on-primary: #ffffff;
  --color-on-primary-container: #381404;
  --color-primary-fixed: #FFDFBE;
  --color-primary-fixed-dim: #FFB693;

  --color-secondary: #FFB563;
  --color-secondary-container: #FFE8C5;
  --color-secondary-fixed: #FFD29D;
  --color-secondary-fixed-dim: #FFCF8E;

  --color-tertiary: #918450;
  --color-tertiary-container: #D4CB9F;
  --color-tertiary-fixed: #EFEBD8;

  --color-neutral: #FFD29D;

  --color-surface: #FFF8F0;
  --color-surface-dim: #EFE0D0;
  --color-surface-container: #FFF1E2;
  --color-surface-container-low: #FFF6EB;
  --color-surface-container-high: #FDEBD6;
  --color-surface-container-highest: #F7DFCA;
  --color-surface-container-lowest: #FFFDF8;

  --color-on-surface: #382008;
  --color-on-surface-variant: #6B4320;
  --color-inverse-surface: #381404;
  --color-inverse-on-surface: #FFF5EC;
  --color-outline: #B88A60;
  --color-outline-variant: #E5B990;

  --color-error: #BA1A1A;
  --color-error-container: #FFDAD6;
  --color-success: #16A34A;
}

/* Base resets & typography */
html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--color-on-surface);
  background-color: var(--color-surface);
}

/* Storybook Font Trio (Harmonized with Loading Page) */
h1, h2, h3, h4, h5, h6,
.font-heading,
.font-headline-lg,
.font-headline-md,
.font-display-lg,
.font-serif {
  font-family: 'Newsreader', Georgia, serif;
}

.font-hand,
.font-handdrawn,
.handwritten {
  font-family: 'Gaegu', 'Kalam', cursive;
}

.font-sans,
.font-body-lg,
.font-body-md,
.font-label-bold,
.font-label-sm {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Storybook Eyebrow & Badge Typography */
.storybook-eyebrow {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #895101;
}

.storybook-badge {
  font-family: 'Gaegu', 'Kalam', cursive;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Material Symbols Outlined settings */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
}

/* Noise texture overlay (optimized: disabled to prevent heavy full-screen GPU shader passes) */
.noise-overlay {
  display: none;
}

/* Glassmorphism utility with warm parchment tint */
.glassmorphism {
  background: rgba(255, 253, 248, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(229, 185, 144, 0.6);
  box-shadow: 0 8px 24px -4px rgba(136, 42, 10, 0.06);
}

.glassmorphism-dark {
  background: rgba(56, 20, 8, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(255, 210, 157, 0.25);
}

/* Storybook Handdrawn Sketchbook Card */
.cresaenium-card {
  background-color: #fffdf8;
  background-image: 
    radial-gradient(#edd4c2 0.65px, transparent 0.65px),
    radial-gradient(#e4c9b5 0.65px, #fffdf8 0.65px);
  background-size: 26px 26px;
  background-position: 0 0, 13px 13px;
  border-radius: 32px 28px 36px 30px / 30px 34px 28px 32px;
  border: 2px solid #e5b990;
  box-shadow: 
    0 10px 30px -6px rgba(136, 42, 10, 0.08),
    3px 3px 0px #d4a373;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  will-change: transform, box-shadow;
}

.cresaenium-card:hover {
  transform: translateY(-4px) rotate(-0.4deg);
  border-color: #882a0a;
  box-shadow: 
    0 18px 38px -8px rgba(136, 42, 10, 0.16),
    4.5px 4.5px 0px #882a0a;
}

.cresaenium-card .card-icon {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
}

.cresaenium-card:hover .card-icon {
  transform: scale(1.12) rotate(-4deg);
}

/* Inputs - Warm Parchment Paper with Crayon Outlines */
.image-placeholder {
  background-color: var(--color-surface-container-high);
  color: var(--color-outline);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: 'Plus Jakarta Sans', sans-serif;
  user-select: none;
  transition: background-color 0.3s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cresaenium-card:hover .image-placeholder {
  background-color: var(--color-surface-container);
  transform: scale(1.02);
}

.cresaenium-input {
  background-color: #fffdf8;
  border: 2px solid #ffd29d;
  color: var(--color-on-surface);
  border-radius: 20px 18px 22px 19px / 19px 21px 18px 20px;
  padding: 0.875rem 1.25rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
  box-shadow: inset 0 1px 3px rgba(136, 42, 10, 0.04), 1.5px 1.5px 0px rgba(229, 185, 144, 0.5);
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.cresaenium-input:focus {
  outline: none;
  background-color: #ffffff;
  border-color: #882a0a;
  box-shadow: 0 0 0 3px rgba(255, 181, 99, 0.35), 2.5px 2.5px 0px #882a0a;
  transform: translateY(-1.5px);
}

/* ==========================================================================
   Handdrawn Buttons (Matching User's Design System Sheet)
   - Primary: Terracotta #882A0A with Crayon Drop Shadow
   - Secondary: Honey Cream #FFE8C5 with Terracotta Text
   - Inverted: Deep Espresso #381404 with White Text
   - Outlined: Parchment with 2px #882A0A Border
   ========================================================================== */

/* 1. Primary Button (#882A0A) */
.cresaenium-btn-primary {
  position: relative;
  overflow: hidden;
  background-color: #882a0a;
  background-image: linear-gradient(135deg, #a03b14 0%, #882a0a 100%);
  color: #ffffff !important;
  border: 2px solid #ffdfbe;
  border-radius: 255px 20px 225px 20px / 20px 225px 20px 255px; /* Organic handdrawn pill */
  font-family: 'Gaegu', 'Kalam', cursive;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  padding: 0.65rem 1.75rem;
  box-shadow: 
    0 4px 14px rgba(136, 42, 10, 0.3),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.3),
    3px 3px 0px #4a1705; /* Crayon drop shadow */
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  will-change: transform, box-shadow;
  user-select: none;
}

.cresaenium-btn-primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -70%;
  width: 50%;
  height: 200%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transform: rotate(25deg);
  transition: all 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.cresaenium-btn-primary:hover::after {
  left: 140%;
}

.cresaenium-btn-primary:hover {
  box-shadow: 
    0 8px 22px rgba(136, 42, 10, 0.4),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.45),
    4px 4px 0px #4a1705;
  transform: translate(-1.5px, -2px) rotate(-0.5deg);
  color: #ffffff;
}

.cresaenium-btn-primary:active {
  transform: translate(2px, 2px);
  box-shadow: 
    0 2px 6px rgba(136, 42, 10, 0.2),
    1px 1px 0px #4a1705;
}

/* 2. Secondary Button (#FFE8C5 with #882A0A text) */
.cresaenium-btn-secondary {
  background: #ffe8c5;
  border: 2px solid #e5b990;
  color: #882a0a !important;
  border-radius: 255px 20px 225px 20px / 20px 225px 20px 255px;
  font-family: 'Gaegu', 'Kalam', cursive;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  padding: 0.65rem 1.65rem;
  box-shadow: 
    0 3px 10px rgba(136, 42, 10, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    2.5px 2.5px 0px #d4a373;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.cresaenium-btn-secondary:hover {
  background-color: #ffd9a6;
  border-color: #882a0a;
  color: #882a0a !important;
  transform: translate(-1.5px, -2px) rotate(0.5deg);
  box-shadow: 
    0 6px 16px rgba(136, 42, 10, 0.14),
    3.5px 3.5px 0px #882a0a;
}

.cresaenium-btn-secondary:active {
  transform: translate(1.5px, 1.5px);
  box-shadow: 1px 1px 0px #882a0a;
}

/* 3. Inverted Button (Deep Espresso #381404) */
.cresaenium-btn-inverted {
  background: #381404;
  border: 2px solid #6b4320;
  color: #ffffff !important;
  border-radius: 255px 20px 225px 20px / 20px 225px 20px 255px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.75rem 1.65rem;
  box-shadow: 
    0 4px 14px rgba(56, 20, 8, 0.35),
    3px 3px 0px #1a0802;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.cresaenium-btn-inverted:hover {
  background: #4a1c07;
  border-color: #ffb563;
  color: #ffdfbe !important;
  transform: translate(-1.5px, -2px);
  box-shadow: 0 6px 18px rgba(56, 20, 8, 0.45), 4px 4px 0px #1a0802;
}

/* 4. Outlined Button (Transparent/Cream with #882A0A border) */
.cresaenium-btn-outlined {
  background: #fffdf8;
  border: 2px solid #882a0a;
  color: #882a0a !important;
  border-radius: 255px 20px 225px 20px / 20px 225px 20px 255px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.75rem 1.65rem;
  box-shadow: 2.5px 2.5px 0px #882a0a;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.cresaenium-btn-outlined:hover {
  background: #ffe8c5;
  transform: translate(-1.5px, -2px);
  box-shadow: 3.5px 3.5px 0px #882a0a;
}

/* Handdrawn Decorative Dividers (Primary, Secondary, Tertiary Lines from Design Sheet) */
.handdrawn-line-primary {
  height: 4px;
  background-color: #882a0a;
  border-radius: 999px;
  box-shadow: 1px 1px 0px rgba(136, 42, 10, 0.2);
}

.handdrawn-line-secondary {
  height: 4px;
  background-color: #ffb563;
  border-radius: 999px;
  box-shadow: 1px 1px 0px rgba(255, 181, 99, 0.3);
}

.handdrawn-line-tertiary {
  height: 4px;
  background-color: #918450;
  border-radius: 999px;
  box-shadow: 1px 1px 0px rgba(145, 132, 80, 0.25);
}

/* Action Circle Buttons from Design Sheet (Terracotta, Amber, Olive, Red) */
.action-circle-primary {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: #882a0a;
  color: #ffffff;
  border: 1.5px solid #ffdfbe;
  box-shadow: 2px 2px 0px #4a1705;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.action-circle-primary:hover {
  transform: scale(1.1) rotate(6deg);
}

.action-circle-secondary {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: #995c18;
  color: #ffffff;
  border: 1.5px solid #ffd29d;
  box-shadow: 2px 2px 0px #5e3300;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.action-circle-secondary:hover {
  transform: scale(1.1) rotate(6deg);
}

.action-circle-tertiary {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: #918450;
  color: #ffffff;
  border: 1.5px solid #d4cb9f;
  box-shadow: 2px 2px 0px #524a29;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.action-circle-tertiary:hover {
  transform: scale(1.1) rotate(6deg);
}

.action-circle-danger {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: #ba1a1a;
  color: #ffffff;
  border: 1.5px solid #ffdad6;
  box-shadow: 2px 2px 0px #680003;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.action-circle-danger:hover {
  transform: scale(1.1) rotate(6deg);
}

/* Badge Square Olive with Pencil */
.badge-olive-square {
  background-color: #918450;
  color: #ffffff;
  border-radius: 14px 11px 13px 12px / 12px 14px 11px 13px;
  border: 1.5px solid #b5a873;
  box-shadow: 2px 2px 0px #524a29;
  padding: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Label Pill with Pencil */
.badge-label-terracotta {
  background-color: #882a0a;
  color: #ffffff;
  border-radius: 18px 12px 17px 13px / 13px 17px 12px 18px;
  border: 1.5px solid #ffdfbe;
  box-shadow: 2px 2px 0px #4a1705;
  padding: 0.4rem 1rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Animations */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
  100% { transform: translateY(0px); }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
  animation: float 6s ease-in-out 2s infinite;
}

@keyframes blob {
  0% { transform: translate(0px, 0px) scale(1); }
  33% { transform: translate(25px, -35px) scale(1.08); }
  66% { transform: translate(-18px, 18px) scale(0.95); }
  100% { transform: translate(0px, 0px) scale(1); }
}

.animate-blob {
  animation: blob 9s infinite;
}

.animation-delay-2000 {
  animation-delay: 2s;
}

.animation-delay-4000 {
  animation-delay: 4s;
}

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

.success-animate {
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes fall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(350px) rotate(360deg); opacity: 0; }
}

.confetti-particle {
  position: absolute;
  width: 10px;
  height: 10px;
  opacity: 0;
  z-index: 60;
  pointer-events: none;
}

/* Masonry for Gallery */
.masonry-grid {
  column-count: 1;
  column-gap: 1.5rem;
}

@media (min-width: 640px) {
  .masonry-grid {
    column-count: 2;
  }
}

@media (min-width: 1024px) {
  .masonry-grid {
    column-count: 3;
  }
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.masonry-item.hidden {
  display: none;
}

/* Filter Button */
.filter-btn {
  position: relative;
  overflow: hidden;
  background-color: #ffe8c5;
  color: #882a0a;
  border: 1.5px solid #e5b990;
  border-radius: 999px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  box-shadow: 2px 2px 0px #d4a373;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.filter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 3px 3px 0px #882a0a;
}

.filter-btn.active {
  background-color: #882a0a !important;
  color: #ffffff !important;
  border-color: #ffdfbe !important;
  box-shadow: 3px 3px 0px #4a1705 !important;
  transform: scale(1.05) rotate(-0.5deg);
}

/* Accordion */
.accordion-content {
  transition: max-height 0.35s ease-out, opacity 0.35s ease-out;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

.accordion-content.open {
  max-height: 500px;
  opacity: 1;
}

.accordion-icon {
  transition: transform 0.3s ease;
}

.accordion-header.active .accordion-icon {
  transform: rotate(180deg);
}

/* Toast Notifications - Handdrawn Parchment */
#toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 420px;
  padding: 1rem 1.25rem;
  border-radius: 20px 16px 22px 18px / 18px 22px 16px 20px;
  background: #fffdf8;
  color: var(--color-on-surface);
  box-shadow: 0 12px 28px rgba(56, 20, 8, 0.16), 3px 3px 0px #882a0a;
  border: 2px solid #e5b990;
  border-left: 6px solid #882a0a;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  font-weight: 600;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.toast.show {
  transform: translateX(0);
}

.toast.toast-success {
  border-left-color: #16a34a;
  box-shadow: 0 12px 28px rgba(56, 20, 8, 0.16), 3px 3px 0px #16a34a;
}

.toast.toast-error {
  border-left-color: #ba1a1a;
  box-shadow: 0 12px 28px rgba(56, 20, 8, 0.16), 3px 3px 0px #ba1a1a;
}

.toast.toast-info {
  border-left-color: #882a0a;
  box-shadow: 0 12px 28px rgba(56, 20, 8, 0.16), 3px 3px 0px #882a0a;
}

/* Modal Backdrop */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(56, 20, 8, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background-color: #fffdf8;
  background-image: 
    radial-gradient(#edd4c2 0.65px, transparent 0.65px),
    radial-gradient(#e4c9b5 0.65px, #fffdf8 0.65px);
  background-size: 26px 26px;
  background-position: 0 0, 13px 13px;
  border-radius: 32px 28px 34px 30px / 30px 34px 28px 32px;
  border: 2.5px solid #e5b990;
  box-shadow: 
    0 24px 50px -12px rgba(56, 20, 8, 0.28),
    5px 5px 0px #882a0a;
  width: 100%;
  max-width: 660px;
  max-height: 88vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.modal-dialog::-webkit-scrollbar {
  width: 6px;
}

.modal-dialog::-webkit-scrollbar-track {
  background: #FFF8F0;
  border-radius: 10px;
}

.modal-dialog::-webkit-scrollbar-thumb {
  background: #E5B990;
  border-radius: 10px;
}

.modal-dialog::-webkit-scrollbar-thumb:hover {
  background: #882A0A;
}

.modal-backdrop.open .modal-dialog {
  transform: scale(1) translateY(0);
}

/* Branch Selection Card (Pendaftaran) - Handdrawn Sketchbook Card */
.branch-card {
  background-color: #fffdf8;
  border-radius: 28px 24px 30px 26px / 26px 30px 24px 28px;
  border: 2px solid #e5b990;
  box-shadow: 0 6px 18px rgba(136, 42, 10, 0.06), 2.5px 2.5px 0px #d4a373;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.branch-card:hover {
  transform: translateY(-4px) rotate(-0.5deg);
  border-color: #882a0a;
  box-shadow: 0 12px 28px rgba(136, 42, 10, 0.12), 4px 4px 0px #882a0a;
}

.branch-card.selected {
  border-color: #882a0a !important;
  background-color: #fff0db !important;
  transform: scale(1.02) rotate(0.5deg);
  box-shadow: 0 14px 30px rgba(136, 42, 10, 0.16), 4px 4px 0px #882a0a !important;
}

/* Step Content Transitions */
.step-content {
  display: none;
  opacity: 0;
  transform: translateX(15px);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.step-content.active {
  display: block;
  opacity: 1;
  transform: translateX(0);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f9e4da;
}

::-webkit-scrollbar-thumb {
  background: #ddc1b2;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #8a7265;
}

/* Top Route Loading Progress Bar */
#routeProgressBar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3.5px;
  background: linear-gradient(90deg, #f4812d, #fdcb44, #994700);
  z-index: 100000;
  pointer-events: none;
  box-shadow: 0 0 12px rgba(244, 129, 45, 0.8), 0 0 4px rgba(253, 203, 68, 0.6);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  width: 0%;
  opacity: 0;
}

#routeProgressBar.active {
  opacity: 1;
}

/* Single Page Application (SPA) Dynamic Page Transitions */
.page-view {
  will-change: transform, opacity, filter;
}

.page-view.hidden {
  display: none !important;
}

.page-view.page-transition-enter {
  animation: pageEnter 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pageEnter {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.985);
    filter: blur(5px);
  }
  60% {
    opacity: 0.95;
    transform: translateY(-2px) scale(1.002);
    filter: blur(0px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* Admin Tab Crossfade Animation */
.admin-tab-panel {
  animation: tabFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Scroll-triggered Modern Reveal Animations */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.92) translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-scale.is-revealed {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-left.is-revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-right.is-revealed {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger Delays */
.delay-75 { transition-delay: 75ms; }
.delay-150 { transition-delay: 150ms; }
.delay-225 { transition-delay: 225ms; }
.delay-300 { transition-delay: 300ms; }
.delay-375 { transition-delay: 375ms; }
.delay-450 { transition-delay: 450ms; }

/* Sticky Navbar Scroll Effect */
#publicNavBar.nav-scrolled {
  background: rgba(255, 251, 244, 0.96) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  box-shadow: 0 10px 30px -8px rgba(101, 24, 0, 0.14), 0 3px 8px rgba(153, 71, 0, 0.08) !important;
  border-bottom-color: #b87a42 !important;
}

/* Pulse radar ring for active items */
.pulse-indicator {
  position: relative;
  display: inline-flex;
}

.pulse-indicator::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 9999px;
  background-color: currentColor;
  opacity: 0.5;
  animation: radarPulse 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes radarPulse {
  75%, 100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

/* Click Ripple Wave */
.ripple-container {
  position: relative;
  overflow: hidden;
}

.ripple-wave {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transform: scale(0);
  animation: rippleAnimation 0.6s linear;
  pointer-events: none;
}

@keyframes rippleAnimation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Number Counter Bounce Effect */
.counter-animate {
  animation: counterPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* ==========================================================================
   Official Assets Styling (Logo, Mascots, Autumn Foliage)
   ========================================================================== */
.logo-glow {
  filter: drop-shadow(0 2px 10px rgba(244, 129, 45, 0.4));
  transition: filter 0.3s ease, transform 0.3s ease;
}

.logo-glow:hover {
  filter: drop-shadow(0 4px 18px rgba(244, 129, 45, 0.65));
  transform: scale(1.05) rotate(3deg);
}

.mascot-bounce {
  animation: mascotHover 4s ease-in-out infinite;
  will-change: transform;
}

.mascot-bounce-delayed {
  animation: mascotHover 4.5s ease-in-out 1.2s infinite;
  will-change: transform;
}

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

.leaf-drift-slow {
  animation: leafFloat 8s ease-in-out infinite;
}

.leaf-drift-fast {
  animation: leafFloat 5s ease-in-out 2s infinite;
}

@keyframes leafFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  33% {
    transform: translateY(-8px) rotate(4deg) translateX(4px);
  }
  66% {
    transform: translateY(6px) rotate(-3deg) translateX(-3px);
  }
}

.ginkgo-bg-tree {
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 10px 30px rgba(244, 129, 45, 0.15));
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.ginkgo-bg-tree:hover {
  transform: scale(1.02);
}

/* ==========================================================================
   Mascot Rich Animations & Interactive Companions
   ========================================================================== */
.mascot-perched-bounce {
  animation: perchedBob 3.8s ease-in-out infinite;
  will-change: transform;
}

@keyframes perchedBob {
  0%, 100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  50% {
    transform: translateY(-12px) rotate(2deg) scale(1.03);
  }
}

.mascot-owl-bob {
  animation: owlBob 4.2s ease-in-out infinite;
  will-change: transform;
}

@keyframes owlBob {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  30% {
    transform: translateY(-6px) rotate(-3deg);
  }
  70% {
    transform: translateY(-9px) rotate(3deg);
  }
}

.mascot-cheer-bounce {
  animation: cheerJump 2.4s ease-in-out infinite;
  will-change: transform;
}

@keyframes cheerJump {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  30% {
    transform: translateY(-14px) scale(1.05) rotate(2deg);
  }
  50% {
    transform: translateY(0) scale(0.98);
  }
  70% {
    transform: translateY(-6px) scale(1.02) rotate(-2deg);
  }
}

/* Warm Lantern Pulsing Halo */
.lantern-glow-pulse {
  position: relative;
}

.lantern-glow-pulse::after {
  content: '';
  position: absolute;
  top: 15%;
  right: 18%;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(253, 203, 68, 0.8) 0%, rgba(244, 129, 45, 0.4) 50%, rgba(244, 129, 45, 0) 80%);
  animation: lanternFlicker 2.2s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 15;
  filter: blur(4px);
}

@keyframes lanternFlicker {
  0% {
    transform: scale(0.85);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.95;
  }
  100% {
    transform: scale(1);
    opacity: 0.75;
  }
}

/* Floating Mascot Companion Widget */
.mascot-companion-wrap {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 45;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: auto;
}

.mascot-companion-bubble {
  background: #FFFDF8;
  border: 2px solid #E5B990;
  box-shadow: 3px 3px 0px #D4A373;
  border-radius: 1.25rem 1.25rem 0.25rem 1.25rem;
  padding: 0.65rem 1rem;
  max-width: 240px;
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-on-surface);
  line-height: 1.35;
  transform-origin: bottom right;
  animation: bubblePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: all 0.3s ease;
  position: relative;
}

.mascot-companion-bubble::after {
  content: '';
  position: absolute;
  bottom: -7px;
  right: 18px;
  width: 12px;
  height: 12px;
  background: #FFFDF8;
  border-right: 2px solid #E5B990;
  border-bottom: 2px solid #E5B990;
  transform: rotate(45deg);
}

@keyframes bubblePop {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.mascot-companion-btn {
  position: relative;
  background: #FFE8C5;
  border: 2px solid #882A0A;
  border-radius: 9999px;
  padding: 0.35rem;
  box-shadow: 3px 3px 0px #4A1705;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.mascot-companion-btn:hover {
  transform: scale(1.08) translateY(-3px);
  box-shadow: 4px 4px 0px #4A1705;
  background: #FFD29D;
}

.mascot-spin-hop {
  animation: spinHop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@keyframes spinHop {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  40% {
    transform: translateY(-24px) rotate(180deg) scale(1.25);
  }
  70% {
    transform: translateY(-8px) rotate(360deg) scale(1.1);
  }
  100% {
    transform: translateY(0) rotate(360deg) scale(1);
  }
}

/* Rich Visual Art Cards for Hero, Gallery & Editorial News */
.gallery-art-card {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
  user-select: none;
}

.gallery-art-card:hover {
  transform: scale(1.03);
}

.gallery-art-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.3) 40%, rgba(0, 0, 0, 0.88) 100%);
  pointer-events: none;
  z-index: 1;
}

.gallery-art-content {
  position: relative;
  z-index: 5;
}

.gallery-art-watermark {
  position: absolute;
  right: -15px;
  top: -15px;
  width: 140px;
  height: 140px;
  opacity: 0.15;
  pointer-events: none;
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.masonry-item:hover .gallery-art-watermark {
  transform: scale(1.15) rotate(12deg);
  opacity: 0.28;
}

.hero-showcase-primary {
  background: radial-gradient(circle at 75% 25%, #ffb68a 0%, #f4812d 35%, #994700 75%, #421600 100%);
}

.hero-showcase-secondary {
  background: radial-gradient(circle at 25% 75%, #ffdf96 0%, #fdcb44 35%, #765a00 80%, #2b2000 100%);
}

.photo-frame-blank {
  background-color: var(--color-surface-container);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background-color 0.3s ease;
}

.photo-frame-blank:hover {
  background-color: var(--color-surface-container-high);
}

.photo-placeholder-text {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(138, 114, 101, 0.38);
  user-select: none;
}

/* ==========================================================================
   Mascot Page Transition Swipe Overlay
   ========================================================================== */
#pageTransitionOverlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

#pageTransitionOverlay.is-active {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.transition-curtain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #7c3300 0%, #994700 25%, #f4812d 65%, #fdcb44 100%);
  transform: translateX(-105%) skewX(-6deg);
  will-change: transform;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.4);
}

.transition-curtain.swipe-in {
  transform: translateX(0) skewX(0);
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.transition-curtain.swipe-out {
  transform: translateX(105%) skewX(-6deg);
  transition: transform 0.42s cubic-bezier(0.65, 0, 0.35, 1);
}

.transition-curtain.reset-curtain {
  transition: none !important;
  transform: translateX(-105%) skewX(-6deg) !important;
}

.transition-mascot-box {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: scale(0.3) translateY(35px);
  opacity: 0;
  will-change: transform, opacity;
  transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.28s ease;
}

.transition-mascot-box.pop-in {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.transition-mascot-box.zoom-out {
  transform: scale(1.18) translateY(-30px);
  opacity: 0;
  transition: transform 0.3s ease-in, opacity 0.25s ease-in;
}

.transition-wood-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.transition-mascot-img {
  width: 170px;
  height: 170px;
  max-width: 80vw;
  object-fit: contain;
  filter: drop-shadow(0 10px 22px rgba(101, 24, 0, 0.35));
}

@media (min-width: 640px) {
  .transition-mascot-img {
    width: 205px;
    height: 205px;
  }
}

@media (min-width: 768px) {
  .transition-mascot-img {
    width: 235px;
    height: 235px;
  }
}

.transition-badge {
  background: #fffdf8;
  border: 2px solid #fed396;
  border-radius: 9999px;
  box-shadow: 0 10px 30px rgba(101, 24, 0, 0.28), 2.5px 2.5px 0px #702604;
  color: #994700;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  padding: 0.65rem 1.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  user-select: none;
}

/* ==========================================================================
   Falling Ginkgo Leaves System (Daun Berguguran)
   ========================================================================== */
#fallingLeavesContainer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 28;
  overflow: hidden;
}

.falling-leaf-item {
  position: absolute;
  top: 0;
  left: 0;
  user-select: none;
  pointer-events: none;
  will-change: transform, opacity;
  transform: translate3d(var(--start-x, 0vw), -90px, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

@keyframes leafFallAnim {
  0% {
    transform: translate3d(var(--start-x, 0vw), -90px, 0) rotate(0deg) rotateY(0deg) scale(0.85);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  85% {
    opacity: 0.8;
  }
  100% {
    transform: translate3d(calc(var(--start-x, 0vw) + var(--drift-x, 60px)), 106vh, 0) rotate(var(--rot-z, 360deg)) rotateY(var(--rot-y, 180deg)) scale(1.05);
    opacity: 0;
  }
}

.animate-spin-slow {
  animation: spinSlow 35s linear infinite;
}

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

/* ==========================================================================
   Gallery Art Card Component & Watermarks
   ========================================================================== */
.gallery-art-card {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border-radius: 1.85rem;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
  user-select: none;
}

.gallery-art-watermark {
  position: absolute;
  pointer-events: none;
  opacity: 0.12;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.masonry-item:hover .gallery-art-watermark {
  opacity: 0.22;
  transform: scale(1.08) rotate(5deg);
}

.gallery-art-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gallery-art-center-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease;
}

.masonry-item:hover .gallery-art-center-icon {
  transform: scale(1.12);
  background: rgba(255, 255, 255, 0.22);
}

/* ==========================================================================
   Full-Screen Immersive Storybook Preloader / Splash Screen
   ========================================================================== */
.preloader-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  background-color: #fff8f4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  overflow-y: auto;
  overflow-x: hidden;
  user-select: none;
  padding: 0.75rem 0.5rem;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter 0.7s ease;
  will-change: opacity, transform, filter;
}

@media (min-width: 640px) {
  .preloader-overlay {
    padding: 1.25rem 1.5rem;
  }
}

.preloader-overlay.is-loaded {
  opacity: 0;
  transform: scale(1.04);
  filter: blur(8px);
  pointer-events: none;
}

/* Paper texture canvas backdrop */
.bg-parchment-pattern {
  background-image: 
    radial-gradient(#eed8c7 0.75px, transparent 0.75px),
    radial-gradient(#e8cdb8 0.75px, #fff8f4 0.75px);
  background-size: 30px 30px;
  background-position: 0 0, 15px 15px;
}

/* Storybook organic cutout card */
.handdrawn-card {
  border-radius: 36px 32px 42px 34px / 34px 40px 32px 38px;
  box-shadow: 
    0 20px 48px -10px rgba(101, 24, 0, 0.12),
    0 8px 24px -6px rgba(137, 81, 1, 0.1),
    inset 0 0 0 2px rgba(136, 42, 10, 0.08);
}

/* Hand-drawn sketchy crayon border styling */
.crayon-border {
  border: 2.5px solid #d4a373;
  border-style: solid;
}

/* Wavy sticker pill */
.sticker-pill {
  border-radius: 999px;
  box-shadow: 0 6px 16px -2px rgba(136, 42, 10, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Hand-drawn progress bar groove */
.progress-branch {
  border-radius: 999px;
  box-shadow: inset 0 2px 5px rgba(92, 45, 19, 0.18);
}

/* Storybook Typography */
.font-serif {
  font-family: 'Newsreader', Georgia, serif;
}

.font-hand {
  font-family: 'Gaegu', 'Kalam', cursive;
}

/* Storybook Floating & Glow Keyframes */
@keyframes floatGentle {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(1.5deg); }
}

@keyframes lanternGlow {
  0%, 100% { filter: drop-shadow(0 0 16px rgba(254, 181, 99, 0.7)); }
  50% { filter: drop-shadow(0 0 28px rgba(255, 140, 30, 0.95)) brightness(1.08); }
}

@keyframes swayLeaf {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(5deg); }
}

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

.animate-float-gentle {
  animation: floatGentle 4.5s ease-in-out infinite;
}

.animate-lantern-glow {
  animation: lanternGlow 3s ease-in-out infinite;
}

.animate-sway-leaf {
  animation: swayLeaf 3.5s ease-in-out infinite;
}

.animate-soft-pulse {
  animation: softPulse 2.8s ease-in-out infinite;
}

/* ==========================================================================
   Hand-Drawn Storybook Top Bar Styles
   Matching festival assets: wood rings, crayon outlines & ginkgo paper
   ========================================================================== */

/* Main top navigation bar with parchment warmth and crayon border */
#publicNavBar.handdrawn-navbar {
  background: rgba(255, 253, 248, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 2.5px solid #d4a373;
  box-shadow: 
    0 4px 20px -2px rgba(101, 24, 0, 0.08),
    0 2px 6px rgba(153, 71, 0, 0.04);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Wavy / sketchy hand-drawn decorative accent line at bottom of navbar */
.handdrawn-bottom-stroke {
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 5px;
  pointer-events: none;
  background-image: radial-gradient(circle at 4px 0.5px, transparent 3.5px, #c88d58 4px, #c88d58 5px, transparent 5.5px);
  background-size: 12px 5px;
  opacity: 0.5;
}

/* Hand-drawn desktop nav capsule island */
.handdrawn-nav-island {
  background: rgba(255, 250, 243, 0.96);
  border: 2px solid #c88d58;
  border-radius: 255px 25px 225px 25px / 25px 225px 25px 255px; /* Organic hand-drawn sketchbook curve */
  box-shadow: 
    0 4px 16px -2px rgba(101, 24, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    2px 2px 0px rgba(200, 141, 88, 0.45);
  padding: 0.35rem 0.65rem;
  position: relative;
  transition: all 0.25s ease;
}

.handdrawn-nav-island:hover {
  box-shadow: 
    0 6px 20px -2px rgba(101, 24, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 1),
    2px 3px 0px rgba(200, 141, 88, 0.65);
}

/* Desktop nav link items */
.desktop-nav-link {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 0.93rem;
  letter-spacing: 0.015em;
  padding: 0.45rem 1.15rem;
  border-radius: 999px;
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: #564337;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  user-select: none;
}

.desktop-nav-link:hover {
  color: #882a0a;
  background-color: rgba(255, 242, 230, 0.9);
  transform: translateY(-1px);
}

/* Active Nav State with handdrawn sticker / watercolor pill styling */
.desktop-nav-link.active-nav,
.desktop-nav-link.text-primary {
  color: #882a0a !important;
  background: linear-gradient(135deg, #ffe8c5 0%, #ffd29d 100%) !important;
  border: 1.5px solid #df9f68;
  border-radius: 20px 14px 18px 15px / 15px 18px 14px 20px !important;
  box-shadow: 
    0 2px 8px rgba(136, 42, 10, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    1.5px 1.5px 0px #d4a373;
  transform: scale(1.02);
}

/* Handdrawn CTA Button ("Daftar Sekarang") with Crayon Drop Shadow */
.handdrawn-btn-cta {
  position: relative;
  background: linear-gradient(135deg, #a03b14 0%, #882a0a 100%);
  color: #ffffff !important;
  border: 2px solid #ffdfbe;
  border-radius: 255px 20px 225px 20px / 20px 225px 20px 255px; /* Organic handdrawn pill */
  box-shadow: 
    0 4px 14px rgba(136, 42, 10, 0.3),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.35),
    3px 3px 0px #4a1705; /* Hand-drawn hard crayon drop shadow! */
  font-family: 'Gaegu', 'Kalam', cursive;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  padding: 0.55rem 1.45rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.handdrawn-btn-cta:hover {
  transform: translate(-1.5px, -2px) rotate(-1deg);
  box-shadow: 
    0 8px 22px rgba(136, 42, 10, 0.45),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.45),
    4px 4px 0px #4a1705;
  color: #ffffff;
}

.handdrawn-btn-cta:active {
  transform: translate(2px, 2px) rotate(0deg);
  box-shadow: 
    0 2px 6px rgba(136, 42, 10, 0.2),
    1px 1px 0px #4a1705;
}

/* Hand-drawn Admin Portal Badge Button (Medallion / Wood Slice Stamp) */
.handdrawn-admin-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50% 48% 52% 49% / 49% 51% 48% 52%;
  background: #fff7ee;
  border: 2px dashed #c88d58;
  color: #882a0a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(136, 42, 10, 0.08), 2px 2px 0px #d4a373;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.handdrawn-admin-btn:hover {
  transform: scale(1.08) rotate(8deg);
  background: #ffe8c5;
  border-color: #882a0a;
  color: #882a0a;
  box-shadow: 0 6px 14px rgba(136, 42, 10, 0.15), 3px 3px 0px #882a0a;
}

/* Handdrawn Mobile Menu Toggle */
.handdrawn-mobile-toggle {
  background: #fff7ee;
  border: 2px solid #c88d58;
  border-radius: 14px 10px 13px 11px / 11px 13px 10px 14px;
  box-shadow: 2px 2px 0px #c88d58;
  color: #882a0a;
  padding: 0.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.handdrawn-mobile-toggle:hover {
  transform: scale(1.06) rotate(-2deg);
  background: #ffe8c5;
}

/* Storybook Tag Pill next to Logo */
.handdrawn-tag-pill {
  font-family: 'Gaegu', 'Kalam', cursive;
  font-size: 0.95rem;
  font-weight: 700;
  color: #882a0a;
  background: #fff2e2;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  border: 1.5px solid #e0a97c;
  box-shadow: 1.5px 1.5px 0px #d4a373;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transform: rotate(-2deg);
  transition: transform 0.25s ease;
  user-select: none;
}

.handdrawn-tag-pill:hover {
  transform: rotate(1deg) scale(1.06);
}

/* Storybook Mobile Navigation Drawer (100% Solid & Opaque) */
.handdrawn-drawer {
  background-color: #fffdf8 !important;
  background-image: 
    radial-gradient(#eed8c7 0.75px, transparent 0.75px),
    radial-gradient(#e8cdb8 0.75px, #fffdf8 0.75px) !important;
  background-size: 28px 28px;
  background-position: 0 0, 14px 14px;
  opacity: 1 !important;
  border-right: 2.5px solid #d4a373;
  box-shadow: 12px 0 45px -5px rgba(101, 24, 0, 0.38) !important;
}

/* Mobile drawer link tactile micro-interactions */
.mobile-nav-link {
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.mobile-nav-link:active {
  transform: scale(0.98);
}

/* ==========================================================================
   AI Chatbot Handdrawn Storybook Styles
   ========================================================================== */

.cresa-chat-window {
  transform-origin: bottom right;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  background-color: #fffdf8;
  border: 2.5px solid #882a0a;
  border-radius: 28px 24px 30px 26px / 26px 28px 24px 28px;
  box-shadow: 5px 5px 0px #4a1705, 0 20px 40px rgba(74, 23, 5, 0.25);
  display: flex;
  flex-direction: column;
}

.cresa-chat-window:not(.chat-open) {
  transform: scale(0.85) translateY(24px);
  opacity: 0;
  pointer-events: none;
}

.cresa-chat-window.chat-open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.cresa-chat-bubble-bot {
  background-color: #fff8f0;
  border-radius: 18px 18px 18px 4px;
}

.cresa-chat-bubble-user {
  background-color: #882a0a;
  border: 2px solid #5c1d07;
  border-radius: 18px 18px 4px 18px;
}

/* Quick prompt chips */
.cresa-quick-prompt {
  user-select: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cresa-quick-prompt:hover {
  transform: translateY(-2px);
  box-shadow: 2px 2px 0px #d4a373;
  border-color: #882a0a;
}

.cresa-quick-prompt:active {
  transform: scale(0.96);
}

/* Chatbot Messages Scrollbar */
#cresaChatMessages::-webkit-scrollbar {
  width: 5px;
}

#cresaChatMessages::-webkit-scrollbar-track {
  background: transparent;
}

#cresaChatMessages::-webkit-scrollbar-thumb {
  background: #e5b990;
  border-radius: 999px;
}

#cresaChatMessages::-webkit-scrollbar-thumb:hover {
  background: #882a0a;
}

/* Typing Bouncing Dots */
.typing-dot {
  width: 7px;
  height: 7px;
  background-color: #882a0a;
  border-radius: 50%;
  display: inline-block;
  animation: typingBounce 1.3s infinite ease-in-out;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {
  0%, 80%, 100% {
    transform: scale(0.6) translateY(0);
    opacity: 0.4;
  }
  40% {
    transform: scale(1.1) translateY(-6px);
    opacity: 1;
  }
}



