:root {
  --pink: #fbcfe8;
  --rose: #be185d;
  --light-rose: #f8bbd9;
  --ink: #3d2b2b;
  --shadow: rgba(0,0,0,0.15);
}

* {
  box-sizing: border-box;
}

/* Loading Overlay */
.loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.loading-overlay.active {
  display: flex;
}

.loading-content {
  background: white;
  border-radius: 20px;
  padding: 40px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f8bbd9;
  border-top-color: #be185d;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

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

.loading-text {
  font-size: 18px;
  color: #3d2b2b;
  margin-bottom: 15px;
  font-weight: 600;
}

.loading-progress {
  width: 100%;
  height: 8px;
  background: #f8bbd9;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 10px;
}

.loading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #be185d, #f472b6);
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 4px;
}

html {
  overflow-x: hidden;
  width: 100%;
}

body {
  margin: 0;
  font-family: 'Georgia', serif;
  background: linear-gradient(135deg, #fdf2f8, #fce7f3, #fbcfe8);
  color: #3d2b2b;
  overflow-x: hidden;
  width: 100%;
}

.puzzle-header {
  padding: 16px 0;
  background: rgba(255,255,255,0.7);
  border-bottom: 1px solid #f8bbd9;
  backdrop-filter: blur(10px);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-logo {
  font-size: 26px;
  font-weight: bold;
  color: #be185d;
  text-decoration: none;
}

.header-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.header-nav a {
  color: #be185d;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: color 0.2s, opacity 0.2s;
  padding: 4px 0;
}

.header-nav a:hover {
  color: #831843;
  opacity: 0.9;
}

/* Hamburger Menu */
.hamburger-menu {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  gap: 5px;
  z-index: 10001;
  position: relative;
  flex-shrink: 0;
  width: 40px;
  min-width: 40px;
}

.hamburger-menu span {
  width: 25px;
  height: 3px;
  background: #be185d;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  overflow-x: hidden;
  width: 100%;
}

.step-indicator {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
}

.step-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid #f8bbd9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #be185d;
  transition: all 0.3s;
}

.step-dot.active {
  background: linear-gradient(135deg, #be185d, #f472b6);
  color: white;
  border-color: #be185d;
}

.step-dot.completed {
  background: #f8bbd9;
  color: #831843;
}

.step-content {
  display: none;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.step-content.active {
  display: block;
}

.step-title {
  font-size: 32px;
  color: #be185d;
  margin-bottom: 20px;
  text-align: center;
}

.upload-area {
  border: 3px dashed #f8bbd9;
  border-radius: 16px;
  padding: 60px 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 30px;
}

.upload-area:hover {
  border-color: #be185d;
  background: rgba(255, 255, 255, 0.8);
}

.upload-area.dragover {
  border-color: #be185d;
  background: rgba(248, 187, 217, 0.3);
}

.upload-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.upload-text {
  font-size: 18px;
  color: #831843;
  margin-bottom: 8px;
}

.upload-hint {
  font-size: 14px;
  color: #be185d;
  opacity: 0.7;
}

#imagePreview {
  max-width: 100%;
  max-height: 400px;
  border-radius: 12px;
  margin: 20px auto;
  display: block;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 18px;
  color: #be185d;
  margin-bottom: 8px;
  font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #f8bbd9;
  border-radius: 8px;
  font-family: 'Georgia', serif;
  font-size: 16px;
  color: #3d2b2b;
  background: white;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #be185d;
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.puzzle-preview-container {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  padding: 30px;
  margin: 30px 0;
  text-align: center;
  /* Ensure vertical stacking of children */
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.puzzle-preview-title {
  font-size: 24px;
  color: #be185d;
  margin-bottom: 20px;
}

.puzzle-board-container {
  position: relative;
  margin: 0 auto 30px;
  overflow: hidden;
  width: 100%;
  max-width: 500px;
  border-radius: 12px;
  background: #f0f0f0;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  box-sizing: border-box;
  /* Ensure board and pieces are fully visible */
  min-height: fit-content;
}

.puzzle-board {
  position: relative;
  margin: 0 auto;
  overflow: hidden;
  background: #e0e0e0;
  border-radius: 12px;
  width: 400px;
  height: 400px;
  max-width: 100%;
  box-sizing: border-box;
  border: 3px solid #be185d;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Grid overlay for puzzle board */
.puzzle-board::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(to right, rgba(190, 24, 93, 0.15) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(190, 24, 93, 0.15) 1px, transparent 1px);
  background-size: var(--grid-size, 100px) var(--grid-size, 100px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* Feedback animations */
@keyframes correctPlacement {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    transform: scale(1.05);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    transform: scale(1);
  }
}

@keyframes incorrectPlacement {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0);
    transform: translateX(5px);
  }
  75% {
    transform: translateX(-3px);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    transform: translateX(0);
  }
}

.puzzle-piece.correct-feedback {
  animation: correctPlacement 0.5s ease-out;
  border: 2px solid rgba(34, 197, 94, 0.8);
}

.puzzle-piece.incorrect-feedback {
  animation: incorrectPlacement 0.4s ease-out;
  border: 2px solid rgba(239, 68, 68, 0.6);
}

.puzzle-pieces-area {
  position: relative;
  margin: 30px auto 0;
  padding: 15px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  border: 2px dashed #f8bbd9;
  min-height: 200px;
  overflow-x: hidden;
  overflow-y: visible;
  width: 100%;
  max-width: 600px;
  /* Ensure it's a block element that appears below the board */
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  justify-items: center;
  align-items: start;
  align-content: flex-start;
  /* Allow grid to expand to show all pieces */
  grid-auto-rows: min-content;
  /* Ensure it appears below the board container */
  clear: both;
}

.puzzle-pieces-area .puzzle-piece {
  box-sizing: border-box;
  /* Don't override inline width/height - they're set from board calculations */
  object-fit: contain;
}

/* Removed "Loose Pieces" text as requested */

@media (max-width: 600px) {
  .container {
    padding: 20px 10px !important;
  }
  
  .container {
    padding: 15px 10px !important;
  }
  
  .puzzle-board-container {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto 20px !important;
    padding: 10px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    /* Ensure board container is a block element */
    display: block !important;
    clear: both !important;
  }
  
  .puzzle-board {
    width: 100% !important;
    max-width: 280px !important;
    height: auto !important;
    aspect-ratio: 1 !important;
    max-height: 280px !important;
    min-width: 220px !important;
    min-height: 220px !important;
    margin: 0 auto !important;
    overflow: hidden !important;
    /* Ensure pieces fit within board */
    position: relative !important;
    /* Ensure board doesn't float */
    float: none !important;
    box-sizing: border-box !important;
  }
  
  .puzzle-board .puzzle-piece {
    /* Ensure placed pieces scale properly on mobile */
    max-width: none !important;
    max-height: none !important;
  }
  
  .puzzle-pieces-area {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 200px !important;
    /* Remove max-height entirely - let content determine height naturally */
    max-height: none !important;
    height: auto !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    padding: 10px 5px !important;
    gap: 10px !important;
    grid-template-columns: repeat(2, 1fr) !important;
    box-sizing: border-box;
    /* Ensure pieces area appears below board with proper spacing */
    margin-top: 20px !important;
    margin-bottom: 20px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    /* Ensure it's a block element below the board */
    display: grid !important;
    clear: both !important;
    float: none !important;
    position: relative !important;
    /* Allow grid to expand to show all pieces - ensure all are visible */
    grid-auto-rows: min-content !important;
    /* Ensure pieces don't get clipped */
    contain: none !important;
    /* Ensure last piece is accessible with extra padding */
    padding-bottom: 100px !important;
  }
  
  /* On mobile, let step content grow naturally - page will scroll */
  .step-content {
    overflow-y: visible !important;
    overflow-x: hidden !important;
    max-height: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
  }
  
  .puzzle-pieces-area .puzzle-piece {
    /* Pieces are proportional to board - constrain to fit 2 per row */
    /* Don't override inline width/height - they're set from board calculations */
    max-width: calc(50% - 8px) !important;
    max-height: none !important;
    object-fit: contain !important;
    /* Ensure pieces maintain their proportional size from board calculation */
    min-width: 0;
    min-height: 0;
    /* Ensure all pieces are visible - never hide them */
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
  }
  
  .puzzle-board .puzzle-piece {
    max-width: none !important;
    max-height: none !important;
  }
  
  /* Removed "Loose Pieces" text as requested */
  
  .puzzle-piece {
    touch-action: none !important;
    -webkit-touch-callout: none !important;
    border-width: 2px !important;
  }
  
  .puzzle-pieces-area .puzzle-piece {
    /* Width and height are set inline - don't override */
    max-width: calc(50% - 8px) !important;
  }
  
  .puzzle-preview-container {
    padding: 12px !important;
    margin: 15px 0 !important;
    /* Ensure vertical stacking on mobile */
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  
  .puzzle-preview-title {
    font-size: 18px !important;
    margin-bottom: 12px !important;
  }
  
  .step-content {
    padding: 20px 15px !important;
  }
}

.puzzle-piece {
  position: absolute;
  cursor: move;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  user-select: none;
  background: rgba(255, 255, 255, 0.1);
}

.puzzle-piece:hover {
  transform: scale(1.08);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
  z-index: 10;
  border-color: #be185d;
}

.puzzle-piece.placed {
  border: none !important;
  box-shadow: none !important;
}

.puzzle-piece.edge-piece {
  border-color: #f472b6;
  box-shadow: 0 3px 12px rgba(244, 114, 182, 0.4);
}

.puzzle-piece.edge-piece:hover {
  border-color: #be185d;
  box-shadow: 0 5px 18px rgba(190, 24, 93, 0.5);
}

.puzzle-solved-message {
  display: none;
  background: linear-gradient(135deg, #be185d, #f472b6);
  color: white;
  padding: 30px;
  border-radius: 16px;
  margin-top: 20px;
  text-align: center;
}

.puzzle-solved-message.show {
  display: block;
  animation: fadeIn 0.5s;
}

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

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .container {
    padding: 20px 10px;
  }
  
  .step-title {
    font-size: 24px;
  }
  
  .step-content {
    padding: 20px;
  }
  
  .upload-area {
    padding: 40px 15px;
  }
  
  .form-group input,
  .form-group textarea,
  .form-group select {
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .btn-group {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
  
  .step-indicator {
    gap: 10px;
    flex-wrap: wrap;
  }
  
  .step-dot {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  
  .header-content {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 12px;
    flex-wrap: nowrap !important;
    min-width: 0;
  }
  
  .header-logo {
    font-size: 22px;
    flex-shrink: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    max-width: calc(100% - 50px);
  }
  
  .hamburger-menu,
  .puzzle-header .hamburger-menu {
    display: flex !important;
    flex-shrink: 0;
    width: 40px;
    min-width: 40px;
  }
  
  .header-nav {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    gap: 0;
    padding: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    z-index: 10000;
  }
  
  .header-nav.mobile-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .header-nav a {
    width: 100%;
    padding: 12px 20px;
    text-align: center;
    border-bottom: 1px solid #f8bbd9;
    font-size: 16px;
  }
  
  .header-nav a:last-child {
    border-bottom: none;
  }
  
  .header-nav a:hover {
    background: rgba(190, 24, 93, 0.1);
  }
  
  .puzzle-preview-container {
    padding: 20px;
  }
  
  .share-link-container {
    flex-direction: column;
  }
  
  .share-link {
    font-size: 12px;
  }
  
  .puzzle-solved-message {
    padding: 20px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .step-title {
    font-size: 20px;
  }
  
  .upload-icon {
    font-size: 36px;
  }
  
  .upload-text {
    font-size: 16px;
  }
  
  .form-group label {
    font-size: 16px;
  }
}

.btn {
  padding: 14px 28px;
  font-size: 18px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Georgia', serif;
}

.btn-primary {
  background: linear-gradient(90deg, #be185d, #f472b6);
  color: white;
  box-shadow: 0 4px 15px rgba(190, 24, 93, 0.3);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  user-select: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(190, 24, 93, 0.4);
}

.btn-secondary {
  background: white;
  color: #be185d;
  border: 2px solid #be185d;
}

.btn-secondary:hover {
  background: #fdf2f8;
}

.btn-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 30px;
}

.physical-option {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  margin: 30px 0;
}

.physical-option h3 {
  color: #be185d;
  font-size: 24px;
  margin-bottom: 16px;
}

.physical-option p {
  color: #831843;
  font-size: 16px;
  margin-bottom: 24px;
}

.share-section {
  text-align: center;
  padding: 40px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
}

.share-link-container {
  background: #fdf2f8;
  border: 2px solid #f8bbd9;
  border-radius: 12px;
  padding: 16px;
  margin: 20px 0;
  display: flex;
  gap: 12px;
  align-items: center;
}

.share-link {
  flex: 1;
  font-family: monospace;
  font-size: 14px;
  color: #831843;
  word-break: break-all;
  text-align: left;
}

.btn-copy {
  padding: 10px 20px;
  background: #be185d;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
}

.btn-copy:hover {
  background: #831843;
}

.btn-copy.copied {
  background: #4ade80;
}

@media (max-width: 768px) {
  .container {
    padding: 20px 16px;
  }
  
  .step-content {
    padding: 24px 20px;
  }
  
  .step-title {
    font-size: 24px;
  }
  
  .btn-group {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
}
</style>
      <select id="currencySelect" onchange="changeCurrency(this.value)" style="padding: 8px 12px; border: 1px solid #f8bbd9; border-radius: 8px; background: white; color: #831843; font-size: 14px; cursor: pointer;">
        <option value="USD">USD ($)</option>
        <option value="EUR">EUR (€)</option>
        <option value="GBP">GBP (£)</option>
        <option value="BRL">BRL (R$)</option>
        <option value="MXN">MXN ($)</option>
        <option value="AED">AED (د.إ)</option>
        <option value="CAD">CAD ($)</option>
        <option value="PHP">PHP (₱)</option>
        <option value="IDR">IDR (Rp)</option>
        <option value="INR">INR (₹)</option>
        <option value="MYR">MYR (RM)</option>
        <option value="MAD">MAD (د.م.)</option>
        <option value="ZAR">ZAR (R)</option>
      </select>
    </div>
    
    <div style="margin-bottom: 20px;">
      <p style="color: #831843; margin-bottom: 16px; text-align: center; font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;">Plans</p>
      
      <!-- Forever Plan Card -->
      <div style="border: 2px solid #be185d; border-radius: 16px; padding: 24px; background: linear-gradient(135deg, #fef2f8 0%, #fce7f3 100%); position: relative; box-shadow: 0 4px 12px rgba(190, 24, 93, 0.15);">
        <div style="position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: #be185d; color: white; padding: 4px 16px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap;">
          Most popular
        </div>
        
        <h3 style="color: #be185d; margin: 16px 0 8px 0; font-size: 22px; font-weight: 700; text-align: center;">Forever</h3>
        
        <p style="color: #831843; margin: 0 0 20px 0; font-size: 14px; line-height: 1.6; text-align: center;">
          Lifetime access for digital love letters and digital puzzles!
        </p>
        
        <div id="stripeCheckout" style="display: flex; justify-content: center; align-items: center; width: 100%; overflow: hidden; margin-top: 8px;">
          <div style="width: 100%; max-width: 100%; display: flex; justify-content: center;">
            <div style="width: 100%; max-width: 100%; display: flex; justify-content: center;"></div>
          </div>
        </div>
      </div>
    </div>
    
    <p style="color: #831843; margin-top: 24px; margin-bottom: 0; text-align: center; font-size: 12px; line-height: 1.5;">
      Secure payment via Stripe
    </p>
  </div>
</div>
  </div>
</div>
<style>
  /* Shine effect for lifetime deal box */
  #lifetimeDealBox {
    position: relative;
    overflow: hidden;
  }
  
  .shine-overlay {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.4),
      transparent
    );
    animation: shine 3s infinite;
    pointer-events: none;
  }
  
  @keyframes shine {
    0% {
      left: -100%;
    }
    50% {
      left: 100%;
    }
    100% {
      left: 100%;
    }
  }
  
  /* Constrain Stripe buy button width */
  #paymentModal stripe-buy-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
    display: block !important;
  }
  
  #paymentModal #stripeCheckout {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: relative !important;
    z-index: 1 !important;
  }
  
  #paymentModal #stripeCheckout stripe-buy-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
    position: relative !important;
    z-index: 10 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
  }
  
  /* Ensure nested divs don't block clicks */
  #paymentModal #stripeCheckout > div,
  #paymentModal #stripeCheckout > div > div {
    pointer-events: none !important;
  }
  
  #paymentModal #stripeCheckout > div > div > stripe-buy-button,
  #paymentModal #stripeCheckout stripe-buy-button {
    pointer-events: auto !important;
    touch-action: manipulation !important;
    z-index: 10 !important;
    position: relative !important;
  }
  
  #paymentModal #checkoutDigital,
  #paymentModal #checkoutBundle {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    pointer-events: none !important;
  }
  
  #paymentModal #checkoutDigital > div,
  #paymentModal #checkoutBundle > div {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    pointer-events: none !important;
  }
  
  #paymentModal #checkoutDigital stripe-buy-button,
  #paymentModal #checkoutBundle stripe-buy-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    z-index: 10 !important;
    position: relative !important;
  }
  
  @media (max-width: 480px) {
    #paymentModal {
      padding: 10px;
    }
    #paymentModal > div {
      padding: 30px 20px;
      padding-top: 45px;
      border-radius: 15px;
      max-height: 95vh;
    }
    #paymentModal > div > button {
      top: 8px;
      right: 8px;
      width: 32px;
      height: 32px;
      font-size: 20px;
    }
    #paymentModal > div > h2 {
      font-size: 24px;
      margin-bottom: 10px;
    }
    #paymentModal > div > p {
      font-size: 14px;
      margin-bottom: 16px;
    }
    
    /* Mobile-specific Stripe button fixes */
    #paymentModal #stripeCheckout {
      min-height: 50px !important;
      position: relative !important;
      z-index: 1 !important;
    }
    
    #paymentModal #stripeCheckout stripe-buy-button {
      min-height: 50px !important;
      z-index: 10 !important;
      position: relative !important;
      pointer-events: auto !important;
      touch-action: manipulation !important;
      -webkit-tap-highlight-color: transparent !important;
    }
    
    #paymentModal #checkoutDigital stripe-buy-button,
    #paymentModal #checkoutBundle stripe-buy-button {
      min-height: 50px !important;
      z-index: 10 !important;
      position: relative !important;
      pointer-events: auto !important;
      touch-action: manipulation !important;
      -webkit-tap-highlight-color: transparent !important;
    }
    
    /* Ensure Stripe button shadow DOM elements are clickable */
    #paymentModal #stripeCheckout stripe-buy-button::part(button),
    #paymentModal #stripeCheckout stripe-buy-button button,
    #paymentModal #checkoutDigital stripe-buy-button::part(button),
    #paymentModal #checkoutDigital stripe-buy-button button,
    #paymentModal #checkoutBundle stripe-buy-button::part(button),
    #paymentModal #checkoutBundle stripe-buy-button button {
      pointer-events: auto !important;
      touch-action: manipulation !important;
      cursor: pointer !important;
    }
  }