	.funky-tabs.full-layout {
	  background: #2b2e4b;
	  border-radius: 12px;
	  padding: 1.5rem;
	  margin-top: 2rem;
	  box-shadow: 0 0 20px rgba(0,0,0,0.3);
	}

	.funky-tabs .tab-strip {
	  display: flex;
	  gap: 0.5rem;
	  overflow-x: auto;
	  padding-bottom: 1rem;
	  border-bottom: 1px solid #444;
	}

	.funky-tabs .tab-btn {
	  background: #444667;
	  border: none;
	  padding: 0.6rem 1rem;
	  border-radius: 6px;
	  color: white;
	  font-weight: bold;
	  cursor: pointer;
	}

	.funky-tabs .tab-btn.active {
	  background: #7873f5;
	  box-shadow: 0 0 10px rgba(120, 115, 245, 0.6);
	}

	.funky-tabs .pane-wrapper {
	  display: flex;
	  flex-direction: row;
	  gap: 2rem;
	  margin-top: 1.5rem;
	}

	.funky-tabs .pane-left,
	.funky-tabs .pane-right {
	  width: 50%;
	}


	/* 🎯 Style Cards */
	.funky-tabs .style-card {
	  background: #303248;
	  padding: 1rem;
	  margin-bottom: 1rem;
	  border-radius: 6px;
	  transition: background 0.3s ease, box-shadow 0.3s ease;
	  text-align: left;
	  cursor: pointer;
	}

	.funky-tabs .style-card strong {
	  font-size: 1.1rem;
	  font-weight: bold;
	}

	.funky-tabs .attributes {
	  margin-top: 0.5rem;
	  font-size: 0.9rem;
	  color: #ccc;
	}

	/* ✅ Selected Style Card */
	.funky-tabs .style-card.selected {
	  background: linear-gradient(to right, #7873f5, #a89cff);
	  border: 2px solid #a89cff;
	  box-shadow: 0 0 12px rgba(120, 115, 245, 0.5);
	  color: white;
	}

	.funky-tabs .style-card.selected .attributes {
	  color: #eee;
	}

	.funky-panel {
	  position: absolute;
	  top: 50%; left: 50%;
	  transform: translate(-50%, -50%);
	  background: rgba(255, 255, 255, 0.1);
	  backdrop-filter: blur(12px);
	  padding: 2rem;
	  border-radius: 16px;
	  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
	  width: 480px;
	  max-width: 90%;
	  text-align: center;
	  z-index: 1000;
	}
	.funky-overlay {
	  position: fixed;
	  inset: 0;
	  background: rgba(0, 0, 0, 0.6);
	  backdrop-filter: blur(10px);
	  display: flex;
	  align-items: center;
	  justify-content: center;
	  z-index: 10000;
	}

	.funky-inner {
	  text-align: center;
	  animation: fadeIn 0.4s ease-in-out;
	}

	.funky-spinner {
	  width: 80px;
	  height: 80px;
	  border: 6px solid rgba(255,255,255,0.3);
	  border-top: 6px solid #fff;
	  border-radius: 50%;
	  animation: spin 1s steps(12, end) infinite;
	  margin: 0 auto;
	}

	.funky-bubble {
	  margin-top: 1rem;
	  display: inline-flex;
	  align-items: center;
	  gap: 0.5rem;
	  background: rgba(255, 255, 255, 0.85);
	  padding: 0.5rem 1rem;
	  border-radius: 20px;
	  font-size: 1rem;
	  color: #333;
	}

	.funky-bubble img {
	  height: 200px;
	}

	@keyframes fadeIn {
	  from { opacity: 0; transform: scale(0.95); }
	  to { opacity: 1; transform: scale(1); }
	}

	.funky-speaker {
	  position: relative;
	  display: inline-block;
	  margin: 2rem;
	}

	.funky-speaker img {
	  max-width: 220px;
	  border-radius: 8px;
	}

	.speech-bubble {
	  position: absolute;
	  top: 0;
	  left: calc(100% + 12px);
	  background: #ffffff;
	  border: 2px solid #00c2c2;
	  color: #222;
	  font-size: 1.3rem;        /* gives more visual weight */
	  padding: 12px 18px;
	  border-radius: 16px;
	  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
	  font-family: "Fredoka", sans-serif;
	  z-index: 10;
	  max-width: 420px;         /* expands horizontal space */
	  white-space: normal;
	  line-height: 1.5;
	}

	.speech-bubble::after {
	  content: '';
	  position: absolute;
	  top: 20px;
	  left: -16px;
	  border: 8px solid transparent;
	  border-right-color: #ffffff;
	}

	/* 🖼️ Preview */

	.funky-tabs .preview-container {
	  position: relative;
	  width: 100%;
	  max-width: 600px;
	  min-height: 420px;
	  margin: 2em auto;
	  border-radius: 10px;
	  overflow: hidden;
	  display: flex;
	  align-items: center;
	  justify-content: center;
	  flex-shrink: 0;
	}

	/* Roast overlay confined to the image port */
	#funkyOverlay {
	  position: absolute;
	  inset: 0;
	  background: rgba(0, 0, 0, 0.7);
	  backdrop-filter: blur(8px);
	  display: flex;
	  align-items: center;
	  justify-content: center;
	  border-radius: 10px;
	  z-index: 10;
	}

	#funkyOverlay .funky-inner {
	  display: flex;
	  flex-direction: column;
	  align-items: center;
	  text-align: center;
	  padding: 1.5rem;
	  gap: 0.75rem;
	}

	#funkyOverlay .funky-speaker {
	  display: flex;
	  flex-direction: column;
	  align-items: center;
	  margin: 0;
	}

	#funkyOverlay .funky-speaker img {
	  max-width: 60px;
	  border-radius: 8px;
	  margin-bottom: 0.5rem;
	}

	#funkyOverlay .speech-bubble {
	  position: static;
	  margin-top: 0;
	  max-width: 280px;
	  font-size: 0.9rem;
	  white-space: normal;
	  padding: 8px 14px;
	}

	#funkyOverlay .speech-bubble::after {
	  display: none;
	}
	.funky-tabs .preview-container img {
	  max-width: 100%;
	  height: auto;
	  display: block;
	  border-radius: 10px;
	  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
	}
	@keyframes spin {
	  0%   { transform: rotate(0deg); }
	  100% { transform: rotate(360deg); }
	}

	.funky-tabs .block {
	  visibility: visible;
	  position: static;
	  left: auto;
	}

	.funky-tabs .style-chips-wrapper {
	  width: 100%;
	}

	.funky-tabs .style-chips {
	  display: flex;
	  flex-wrap: wrap;
	  gap: 0.5rem;
	  margin-top: 0.5rem;
	}

	.funky-tabs .style-chip {
	  padding: 6px 14px;
	  border-radius: 999px;
	  border: 1.5px solid rgba(255,255,255,0.3);
	  background: rgba(255,255,255,0.08);
	  color: #fff;
	  font-size: 0.85rem;
	  cursor: pointer;
	  transition: all 0.2s ease;
	  white-space: nowrap;
	}

	.funky-tabs .style-chip:hover {
	  background: rgba(255,255,255,0.18);
	  border-color: rgba(255,255,255,0.6);
	}

	.funky-tabs .style-chip.selected {
	  background: #ff00cc;
	  border-color: #ff00cc;
	  color: #fff;
	  box-shadow: 0 0 10px rgba(255,0,204,0.5);
	}

	.funky-tabs button:active {
	  transform: scale(0.95);
	}

	.funky-tabs button {
	  transition: all 0.2s ease;
	}
.funky-tabs .button-clear {
  padding: 0px 0px;
  background-color: transparent !important;
  border: none !important;
  color: #fff; /* or inherit */
  font-weight: normal;
  border-radius: 1px;
}

.funky-tabs .ratio-img {
  transition: all 0.3s ease;
  cursor: pointer;
  border-radius: 8px;
}

.funky-tabs .button.button-clear.active .ratio-img {
  backdrop-filter: blur(4px);
  background-color: rgba(255, 255, 255, 0.2);
  border: 2px solid #80c8ff;
  box-shadow: 0 0 10px rgba(128, 200, 255, 0.6);
}
.prompt-wrapper {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin-bottom: 1rem;
}

.prompt-field {
  width: 100%;
  padding: 0.75rem 2.8rem 0.75rem 0.75rem; /* extra right padding for wand */
  font-size: 1rem;
  border-radius: 6px;
  border: none;
  resize: vertical;
  box-sizing: border-box;
  background-color: #1f2035;
  color: #fff;
}

#aiWandButton {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background-color: transparent;
  border: none;
  font-size: 1.4rem;
  color: #ccc;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: transform 0.2s ease, color 0.2s ease;
  z-index: 2;
}

#aiWandButton:hover {
  transform: scale(1.1);
  color: #a89cff;
}

#aiWandButton:active {
  transform: scale(0.95);
  color: #5f5bdc;
}
.prompt-field {
  padding-left: 2.8rem; /* creates space for the wand */
}
#aiWandButton::after {
  content: "Surprise me!";
  position: absolute;
  top: -1.8rem;
  left: 0;
  background: #333;
  color: #fff;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

#aiWandButton:hover::after {
  opacity: 1;
}
/* Spinner animation */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Spinner element */
.wand-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #ccc;
  border-top-color: #333;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-left: 6px;
}

/* 🖌 Inpaint canvas painter */
#maskPainterWrapper {
  width: 100%;
}

#maskPainterWrapper > div {
  max-width: 100%;
  overflow: hidden;
}

#imageCanvas {
  display: block;
  border-radius: 6px;
  max-width: 100%;
  height: auto;
}

#maskCanvas {
  border-radius: 6px;
  max-width: 100%;
  height: auto;
  touch-action: none; /* Prevent scroll interference on mobile */
}

@media (max-width: 768px) {
  .funky-tabs .pane-wrapper {
    flex-direction: column;     /* Stack panes vertically */
  }

  .funky-tabs .pane-left,
  .funky-tabs .pane-right {
    width: 100%;                /* Full width stacking */
  }

  .preview-container {
    order: 3;                   /* Move preview below carousel and prompt */
  }

  #styleCarousel {
    order: 2;                   /* Carousel goes above the preview */
  }

  .prompt-field {
    order: 1;                   /* Prompt comes after preview */
  }
  .funky-tabs .carousel-box {
    flex: 0 0 auto;
    width: auto;
    text-align: center;
    cursor: pointer;
  }
   .funky-overlay {
    padding: 20px; /* Add breathing room */
  }

  .funky-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 90vw;
  }

  .funky-speaker img {
    width: 80px; /* Scale down logo */
    height: auto;
  }

  .speech-bubble {
    font-size: 14px; /* Smaller text */
    padding: 10px;
    max-width: 80vw;
    word-wrap: break-word;
  }

  .funky-spinner {
    width: 40px;
    height: 40px;
    margin-bottom: 15px;
  }
  .prompt-wrapper {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 480px) {
  .funky-tabs.full-layout {
    padding: 1rem;
    margin-top: 1rem;
  }

  .funky-tabs .tab-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  .funky-panel {
    width: 95vw;
    padding: 1.5rem;
  }

  .funky-tabs .preview-container {
    min-height: 280px;
  }

  .funky-bubble img {
    height: 140px;
  }

  #funkyOverlay .speech-bubble {
    max-width: 85vw;
    font-size: 0.8rem;
  }
}