/* ==========================================================================
   style.css - Local Custom Loy Krathong Web App Stylesheet
   Theme: Twilight Sky, Golden Full Moon, Luminous Flowing River, Thai Elegance
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Prompt:wght@300;400;500;600&display=swap');

:root {
  --font-main: 'Kanit', sans-serif;
  --font-body: 'Prompt', sans-serif;

  /* Color Palette */
  --bg-dark: #070914;
  --bg-twilight: #0f142c;
  --gold-primary: #ffd54f;
  --gold-glow: #ffb300;
  --gold-deep: #e65100;
  --amber-accent: #ff9100;
  --water-teal: #4dd0e1;
  --lotus-pink: #f06292;
  --text-light: #ffffff;
  --text-muted: #e0e0e0;
  --text-dark: #1a162b;

  /* Glassmorphism */
  --glass-bg: rgba(18, 22, 44, 0.78);
  --glass-border: rgba(255, 213, 79, 0.35);
  --glass-glow: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
  --glass-blur: blur(14px);

  /* Radius & Transitions */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-light);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  user-select: none;
}

/* ==========================================================================
   RIVER VIEWPORT CONTAINER
   ========================================================================== */
#riverContainer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

#riverContainer canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ==========================================================================
   HEADER & TOP NAVIGATION TOOLBAR
   ========================================================================== */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: linear-gradient(180deg, rgba(7, 9, 20, 0.85) 0%, rgba(7, 9, 20, 0) 100%);
  pointer-events: none;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
}

.brand-icon {
  font-size: 28px;
  filter: drop-shadow(0 0 8px rgba(255, 213, 79, 0.8));
  animation: gentleBob 3s ease-in-out infinite;
}

.brand-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, #ffffff 0%, #ffe082 50%, #ffb300 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 10px rgba(255, 213, 79, 0.3);
}

.brand-subtitle {
  font-size: 11px;
  font-family: var(--font-body);
  color: #b0bec5;
  letter-spacing: 0.8px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

/* Counter Badge */
.krathong-counter-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--gold-primary);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.krathong-counter-badge .counter-number {
  font-weight: 700;
  font-size: 15px;
  color: #ffffff;
  background: #e65100;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--gold-primary);
}

/* Glass Buttons */
.btn-glass {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(22, 28, 54, 0.75);
  border: 1px solid rgba(255, 213, 79, 0.3);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-pill);
  color: var(--text-light);
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.btn-glass:hover {
  background: rgba(40, 50, 90, 0.9);
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 213, 79, 0.25);
}

.btn-glass:active {
  transform: translateY(0);
}

/* Primary Float CTA Button */
.btn-float-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: linear-gradient(135deg, #ffd54f 0%, #ff9800 60%, #e65100 100%);
  border: 1px solid #ffffff;
  border-radius: var(--radius-pill);
  color: #1a0e05;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255, 152, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.8);
  transition: all var(--transition-smooth);
  animation: pulseGlow 2.5s infinite;
}

.btn-float-cta:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 179, 0, 0.7);
  color: #000000;
}

.btn-icon-only {
  padding: 8px 10px;
  font-size: 14px;
}

/* ==========================================================================
   SPEECH BUBBLE POPUP (BLESSING CARD POPUP OVER FLOATING KRATHONG)
   ========================================================================== */
#speechBubbleContainer {
  position: fixed;
  z-index: 60;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 380px;
  pointer-events: auto;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.speech-bubble {
  position: relative;
  background: rgba(15, 19, 39, 0.94);
  border: 2px solid var(--gold-primary);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 213, 79, 0.3);
  backdrop-filter: blur(16px);
  text-align: center;
}

.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 14px 12px 0 12px;
  border-style: solid;
  border-color: var(--gold-primary) transparent transparent transparent;
}

.bubble-close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: #bdbdbd;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  transition: color var(--transition-fast);
}

.bubble-close-btn:hover {
  color: #ff5252;
}

.bubble-krathong-thumb {
  width: 100px;
  height: 75px;
  margin: 0 auto 10px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.bubble-author-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gold-primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.bubble-wish-text {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: #f5f5f5;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
  text-align: left;
  border-left: 3px solid var(--gold-primary);
  max-height: 120px;
  overflow-y: auto;
}

.bubble-time {
  font-size: 11px;
  color: #90a4ae;
  margin-bottom: 14px;
}

.bubble-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* ==========================================================================
   MODAL DIALOGS (WIZARD, BACKGROUND, BLESSINGS FEED, BACKUP)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 7, 18, 0.75);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-smooth), visibility var(--transition-smooth);
  padding: 16px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: rgba(14, 18, 38, 0.95);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.6), 0 0 25px rgba(255, 213, 79, 0.2);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.96);
  transition: transform var(--transition-smooth);
}

.modal-overlay.active .modal-box {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close-btn {
  background: none;
  border: none;
  color: #9e9e9e;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color var(--transition-fast);
}

.modal-close-btn:hover {
  color: #ff5252;
}

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   KRATHONG BUILDER WIZARD STEPS (/play)
   ========================================================================== */
/* Wizard Step Indicator */
.wizard-steps-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  position: relative;
}

.wizard-steps-nav::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 20px;
  right: 20px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-50%);
  z-index: 1;
}

.step-indicator {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  background: #1e2444;
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: #90a4ae;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  transition: all var(--transition-fast);
}

.step-label {
  font-size: 11px;
  color: #90a4ae;
  font-weight: 500;
}

.step-indicator.active .step-circle {
  background: var(--gold-primary);
  border-color: #ffffff;
  color: #1a0e05;
  box-shadow: 0 0 12px var(--gold-glow);
}

.step-indicator.active .step-label {
  color: var(--gold-primary);
  font-weight: 600;
}

.step-indicator.completed .step-circle {
  background: #2e7d32;
  border-color: #81c784;
  color: #ffffff;
}

/* Live Preview Bowl Container */
.editor-preview-bowl {
  position: relative;
  width: 100%;
  height: 220px;
  background: radial-gradient(circle at 50% 60%, #162447 0%, #0c1024 100%);
  border: 1px solid rgba(77, 208, 225, 0.3);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.editor-preview-bowl canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

.bowl-hint-badge {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 11px;
  color: var(--water-teal);
  background: rgba(0, 0, 0, 0.5);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  pointer-events: none;
}

/* Step 1: Base Selection Cards Grid */
.bases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.base-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.base-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--gold-primary);
  transform: translateY(-2px);
}

.base-card.active {
  background: rgba(255, 213, 79, 0.12);
  border: 2px solid var(--gold-primary);
  box-shadow: 0 0 15px rgba(255, 213, 79, 0.3);
}

.base-card-thumb {
  width: 100%;
  height: 65px;
  object-fit: contain;
  margin-bottom: 6px;
}

.base-card-name {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.3;
}

.base-card-tag {
  font-size: 10px;
  color: var(--gold-primary);
  margin-top: 3px;
}

.base-upload-card {
  border: 1px dashed var(--gold-primary);
  background: rgba(255, 213, 79, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.base-upload-card:hover {
  background: rgba(255, 213, 79, 0.08);
}

/* Step 2: Decorate Toolbar & Item Pickers */
.decorations-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

.deco-tab-btn {
  background: none;
  border: none;
  color: #90a4ae;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.deco-tab-btn.active {
  background: rgba(255, 213, 79, 0.15);
  color: var(--gold-primary);
  font-weight: 600;
}

.decorations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
  gap: 10px;
  max-height: 190px;
  overflow-y: auto;
  padding-right: 4px;
}

.deco-item-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 8px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.deco-item-card:hover {
  background: rgba(255, 213, 79, 0.1);
  border-color: var(--gold-primary);
  transform: translateY(-2px);
}

.deco-item-thumb {
  width: 50px;
  height: 50px;
  object-fit: contain;
  margin: 0 auto 4px;
}

.deco-item-name {
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Selected item controls action strip */
.selected-item-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 213, 79, 0.3);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  margin-top: 12px;
  font-size: 12px;
}

.selected-item-bar .control-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.control-btn-icon {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: all var(--transition-fast);
}

.control-btn-icon:hover {
  background: var(--gold-primary);
  color: #000000;
}

.control-btn-icon.danger:hover {
  background: #f44336;
  color: #ffffff;
}

/* Step 3: Name & Wish Inputs */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-primary);
  margin-bottom: 6px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 14px;
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--gold-primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 10px rgba(255, 213, 79, 0.2);
}

.quick-wishes-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.wish-tag {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  font-size: 12px;
  color: #cfd8dc;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.wish-tag:hover {
  background: rgba(255, 213, 79, 0.15);
  border-color: var(--gold-primary);
  color: var(--gold-primary);
}

.short-wishes-header {
  font-size: 12px;
  color: var(--gold-primary);
  margin: 8px 0 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.short-wishes-sub {
  color: var(--text-muted);
  font-size: 11px;
}

.short-wishes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.short-wish-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 12.5px;
  color: #e2e8f0;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.short-wish-btn:hover {
  background: rgba(255, 213, 79, 0.12);
  border-color: rgba(255, 213, 79, 0.6);
  color: #ffffff;
}

.short-wish-btn .wish-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  transition: all var(--transition-fast);
}

.short-wish-btn.active {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.22), rgba(255, 111, 0, 0.2));
  border-color: var(--gold-primary);
  color: #fff8e1;
  box-shadow: 0 0 12px rgba(255, 213, 79, 0.2);
}

.short-wish-btn.active .wish-dot {
  background: var(--gold-primary);
  border-color: var(--gold-primary);
  color: #1a1005;
}

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

/* ==========================================================================
   CUSTOM BACKGROUND MODAL
   ========================================================================== */
.slider-group {
  margin-bottom: 16px;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}

.custom-range {
  width: 100%;
  accent-color: var(--gold-primary);
  cursor: pointer;
}

.bg-dropzone {
  border: 2px dashed rgba(255, 213, 79, 0.4);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: rgba(255, 213, 79, 0.02);
  margin-bottom: 18px;
}

.bg-dropzone:hover {
  border-color: var(--gold-primary);
  background: rgba(255, 213, 79, 0.08);
}

.bg-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.bg-preset-card {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  height: 75px;
  transition: all var(--transition-fast);
}

.bg-preset-card:hover {
  border-color: var(--gold-primary);
  transform: scale(1.02);
}

.bg-preset-card.active {
  border: 2px solid var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-glow);
}

.bg-preset-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bg-preset-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  font-size: 10px;
  padding: 2px 4px;
  text-align: center;
}

/* ==========================================================================
   BLESSING FEED MODAL & CARD PREVIEW (/blessing)
   ========================================================================== */
.blessings-search-bar {
  margin-bottom: 14px;
}

.blessings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 4px;
}

.blessing-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
  position: relative;
}

.blessing-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 213, 79, 0.3);
}

.blessing-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.blessing-card-thumb {
  width: 55px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.4));
}

.blessing-card-info {
  flex: 1;
  overflow: hidden;
}

.blessing-card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.blessing-card-date {
  font-size: 11px;
  color: #90a4ae;
}

.blessing-card-body {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
  color: #e0e0e0;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px;
  flex: 1;
  margin-bottom: 10px;
}

.blessing-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==========================================================================
   ANIMATIONS & KEYFRAMES
   ========================================================================== */
@keyframes gentleBob {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 4px 18px rgba(255, 152, 0, 0.45);
  }
  50% {
    box-shadow: 0 4px 28px rgba(255, 213, 79, 0.85);
  }
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -40%) scale(0.85);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE & TABLET)
   ========================================================================== */
@media (max-width: 768px) {
  .app-header {
    padding: 10px 14px;
  }

  .brand-title {
    font-size: 16px;
  }

  .brand-subtitle {
    display: none;
  }

  .header-actions {
    gap: 6px;
  }

  .btn-float-cta {
    padding: 8px 14px;
    font-size: 12px;
  }

  .btn-glass {
    padding: 6px 10px;
    font-size: 12px;
  }

  .btn-glass span.btn-text {
    display: none;
  }

  .krathong-counter-badge {
    padding: 4px 10px;
    font-size: 11px;
  }

  .editor-preview-bowl {
    height: 175px;
  }

  .modal-box {
    max-height: 95vh;
  }

  .bases-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .decorations-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
