/* ==========================================================================
   PostVibe Studio - Classy, Minimalist Design System v2.5
   Refined warm light aesthetic with bold 2-character monogram, compact layout
   ========================================================================== */

:root {
  --bg-app: #fafaf9;
  --bg-surface: #ffffff;
  --bg-subtle: #f4f4f5;
  --bg-active: #e4e4e7;
  
  --border-light: #e5e7eb;
  --border-subtle: #f1f5f9;
  --border-focus: #0f172a;

  --text-main: #09090b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --accent-black: #09090b;
  --accent-indigo: #4f46e5;
  --accent-red: #ef4444;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-card: 0 12px 35px -10px rgba(0, 0, 0, 0.12), 0 2px 8px -2px rgba(0, 0, 0, 0.04);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition-fast: 0.12s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  max-width: 100vw;
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

/* Custom Minimal Scrollbar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* --------------------------------------------------------------------------
   Header Bar (Compact 52px)
   -------------------------------------------------------------------------- */
.app-header {
  height: 52px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  position: relative;
  max-width: 100vw;
  box-sizing: border-box;
  z-index: 50;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Prominent 2-Character "PV" Logo */
.brand-logo-pv {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
  transition: transform var(--transition-fast);
}
.brand-logo-pv:hover {
  transform: scale(1.04);
}
.brand-logo-pv img, .brand-logo-pv svg {
  width: 100%;
  height: 100%;
  border-radius: 9px;
}

.brand-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-title {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-main);
  line-height: 1.15;
}

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

/* --------------------------------------------------------------------------
   Buttons & Guilt-Based Support Button
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  cursor: pointer;
  background: var(--bg-surface);
  color: var(--text-main);
  transition: all var(--transition-fast);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn:hover {
  background: var(--bg-subtle);
  border-color: #cbd5e1;
}

.btn-primary {
  background: var(--accent-black);
  color: #ffffff;
  border-color: var(--accent-black);
}
.btn-primary:hover {
  background: #27272a;
}

/* Guilt-Appeal Support Button */
.btn-support-free {
  background: #fff1f2;
  color: #e11d48;
  border-color: #ffe4e6;
  font-weight: 700;
}
.btn-support-free:hover {
  background: #ffe4e6;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 5px 9px;
  font-size: 0.74rem;
}

/* --------------------------------------------------------------------------
   App Workspace Layout (Single-Screen Ergonomics)
   -------------------------------------------------------------------------- */
.app-container {
  display: flex;
  height: calc(100vh - 52px);
  overflow: hidden;
  position: relative;
}

/* Sidebar / Left Editor Panel */
.control-panel {
  width: 380px;
  min-width: 380px;
  max-width: 380px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  z-index: 20;
}

/* Segmented Navigation Tabs */
.panel-tabs-bar {
  display: flex;
  background: var(--bg-subtle);
  padding: 3px;
  margin: 10px 14px 4px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  gap: 2px;
}

.panel-tab-btn {
  flex: 1;
  padding: 6px 3px;
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.panel-tab-btn.active {
  background: var(--bg-surface);
  color: var(--text-main);
  box-shadow: var(--shadow-subtle);
}

.panel-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.editor-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* --------------------------------------------------------------------------
   URL Fetcher Box
   -------------------------------------------------------------------------- */
.url-fetch-box {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.url-input-group {
  display: flex;
  gap: 6px;
}

.url-input {
  flex: 1;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.78rem;
  color: var(--text-main);
  outline: none;
}
.url-input:focus {
  border-color: var(--border-focus);
}

/* --------------------------------------------------------------------------
   Templates Grid (10 Options)
   -------------------------------------------------------------------------- */
.template-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.template-card {
  padding: 8px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.template-card:hover {
  background: var(--bg-subtle);
  border-color: #cbd5e1;
}

.template-card.active {
  background: #f8fafc;
  border-color: var(--accent-black);
  box-shadow: 0 0 0 1px var(--accent-black);
}

.template-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  line-height: 1;
}

.template-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.template-meta {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.template-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-main);
}

.template-desc {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Forms & Controls
   -------------------------------------------------------------------------- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.8rem;
  font-family: inherit;
  transition: border-color var(--transition-fast);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--border-focus);
}

.form-textarea {
  resize: vertical;
  min-height: 68px;
  line-height: 1.4;
}

/* Avatar Upload & Preset Picker */
.avatar-presets-wrapper {
  margin-bottom: 8px;
}
.avatar-presets-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.avatar-presets-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 8px 2px;
  scrollbar-width: thin;
}
.avatar-preset-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  background: none;
  flex-shrink: 0;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
  outline: none;
}
.avatar-preset-btn:hover {
  transform: scale(1.1);
}
.avatar-preset-btn.active {
  border-color: var(--accent-black);
  box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 3px var(--accent-black);
  transform: scale(1.06);
}
.avatar-preset-btn img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.avatar-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar-preview-thumb {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-light);
  display: block;
  flex-shrink: 0;
  background: var(--bg-subtle);
}

/* Color Swatches Grid */
.palette-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.palette-swatch {
  height: 26px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid rgba(0,0,0,0.1);
  transition: transform var(--transition-fast);
}

.palette-swatch:hover {
  transform: scale(1.06);
}

.palette-swatch.active {
  border: 2px solid var(--accent-black);
  transform: scale(1.06);
}

/* Range Sliders */
.range-slider {
  width: 100%;
  accent-color: var(--accent-black);
  height: 4px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  outline: none;
}

/* Switch Toggle */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--border-light);
  transition: .2s;
  border-radius: 20px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

input:checked + .toggle-slider {
  background-color: var(--accent-black);
}

input:checked + .toggle-slider:before {
  transform: translateX(18px);
}

.badge-type-btn {
  border: 1px solid var(--border-medium);
  background: var(--bg-surface);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.badge-type-btn.active {
  background: var(--accent-black) !important;
  color: #ffffff !important;
  border-color: var(--accent-black) !important;
}

/* --------------------------------------------------------------------------
   Preview Workspace Stage
   -------------------------------------------------------------------------- */
.preview-workspace {
  flex: 1;
  background: #f5f5f4;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.preview-subtoolbar {
  height: 44px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.ratio-pills {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ratio-pill {
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ratio-pill:hover {
  background: var(--bg-subtle);
}

.ratio-pill.active {
  background: var(--bg-subtle);
  border-color: var(--border-light);
  color: var(--text-main);
  font-weight: 700;
}

.ratio-pill svg {
  flex-shrink: 0;
  opacity: 0.8;
}

.ratio-pill.active svg {
  opacity: 1;
}

.canvas-viewport {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 20px;
  position: relative;
}

#export-stage {
  position: relative;
  box-shadow: var(--shadow-card);
  transition: width 0.2s ease, height 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
}

#card-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* Subtle Film Noise Texture Overlay with Granular Intensity */
#export-stage.has-noise::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.2) 1px, transparent 0);
  background-size: 3px 3px;
  opacity: var(--grain-opacity, 0.35);
  pointer-events: none;
  z-index: 10;
}

.card-pagination-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
  z-index: 15;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Bottom Carousel Strip (Compact 46px) */
.carousel-strip {
  height: 46px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.carousel-slides-list {
  display: flex;
  align-items: center;
  gap: 6px;
}

.slide-pill {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.slide-pill.active {
  background: var(--accent-black);
  border-color: var(--accent-black);
  color: white;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  animation: toastSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Mobile Split-View: Pinned top live preview canvas + scrollable bottom controls */
.mobile-view-toggle {
  display: none;
}

@media (max-width: 1024px) {
  .trigger-coffee span,
  #btn-open-legal span,
  #btn-reset-app span {
    display: none;
  }
  .btn-support-free,
  #btn-open-legal,
  #btn-reset-app {
    padding: 5px 8px;
  }
}

@media (max-width: 900px) {
  html, body {
    overflow: hidden;
    height: 100vh;
  }
  
  .app-container {
    flex-direction: column;
    height: calc(100vh - 52px);
    overflow: hidden;
  }

  /* Pinned top live preview canvas */
  .preview-workspace {
    height: 44vh;
    min-height: 44vh;
    max-height: 44vh;
    border-bottom: 1px solid var(--border-light);
    order: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .preview-subtoolbar {
    height: 36px;
    padding: 0 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }

  .ratio-pills {
    flex-shrink: 0;
  }

  .ratio-pill {
    padding: 3px 6px;
    font-size: 0.68rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .canvas-viewport {
    flex: 1;
    padding: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Hide banner ad inside the preview canvas area on small screens so canvas gets full height */
  .preview-workspace .ad-slot-banner {
    display: none;
  }

  /* Mobile carousel strip: compact and scrollable */
  .carousel-strip {
    display: flex;
    height: 36px;
    min-height: 36px;
    padding: 0 8px;
    border-top: 1px solid var(--border-light);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    align-items: center;
    background: var(--bg-surface);
    flex-shrink: 0;
  }

  .carousel-slides-list {
    gap: 4px;
  }

  .slide-pill {
    padding: 2px 7px;
    font-size: 0.7rem;
  }

  /* Bottom pinned tabs + scrollable controls panel */
  .control-panel {
    order: 2;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    flex: 1;
    height: calc(56vh - 88px);
    border-right: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .panel-tabs-bar {
    margin: 8px 12px 4px 12px;
    flex-shrink: 0;
  }

  .panel-scroll-area {
    flex: 1;
    overflow-y: auto;
  }

  .toast-container {
    bottom: 16px;
    right: 16px;
    left: 16px;
    align-items: center;
  }
}

@media (max-width: 640px) {
  .brand-title {
    display: none;
  }
  .app-header {
    padding: 0 8px;
  }
  .header-actions {
    gap: 5px;
  }
}

@media (max-width: 480px) {
  .app-header {
    padding: 0 6px;
  }
  .brand-area {
    gap: 4px;
  }
  .brand-logo-pv {
    width: 30px;
    height: 30px;
  }
  #btn-copy {
    display: none;
  }
  #btn-open-legal {
    display: none;
  }
  #select-export-format {
    padding: 3px 4px !important;
    font-size: 0.68rem !important;
    width: 68px !important;
    max-width: 68px !important;
  }
  .header-actions {
    gap: 3px;
  }
  .btn-sm {
    padding: 4px 6px;
    font-size: 0.7rem;
  }
  #btn-download {
    padding: 4px 6px;
  }
  #btn-export-all-slides {
    padding: 4px 6px;
  }
  .preview-subtoolbar .trigger-surprise {
    display: none;
  }
}

@media (max-width: 360px) {
  .trigger-coffee {
    display: none;
  }
  .app-header {
    padding: 0 4px;
  }
  .header-actions {
    gap: 2px;
  }
  #select-export-format {
    width: 62px !important;
    max-width: 62px !important;
    padding: 2px 2px !important;
    font-size: 0.65rem !important;
  }
  #btn-download {
    padding: 3px 5px;
    font-size: 0.68rem;
  }
  #btn-export-all-slides {
    padding: 3px 5px;
    font-size: 0.68rem;
  }
  .brand-logo-pv {
    width: 28px;
    height: 28px;
  }
}

/* --------------------------------------------------------------------------
   Image Cropper Modal Styles
   -------------------------------------------------------------------------- */
.cropper-modal-card {
  max-width: 440px;
  width: 90vw;
}

.cropper-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.cropper-canvas-container {
  position: relative;
  width: 360px;
  height: 360px;
  max-width: 100%;
  max-height: 70vw;
  background: #18181b;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.cropper-canvas-container:active {
  cursor: grabbing;
}

#cropper-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.cropper-mask-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.62);
  pointer-events: none;
}

.cropper-mask-rect {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 280px;
  height: 180px;
  border-radius: 6px;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.62);
  pointer-events: none;
}

.cropper-toolbar {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cropper-slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cropper-actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   Monetization & Ad Units
   -------------------------------------------------------------------------- */
.ad-container {
  display: flex;
  flex-direction: column;
  background: var(--bg-subtle);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-top: 14px;
  position: relative;
  overflow: hidden;
}

.ad-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.ad-content {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  width: 100%;
}

.ad-sponsor-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-decoration: none;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  transition: all var(--transition-fast);
}

.ad-sponsor-card:hover {
  border-color: var(--accent-black);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.ad-sponsor-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-primary);
}

.ad-sponsor-desc {
  font-size: 0.66rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.ad-sponsor-cta {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--accent-black);
  background: var(--bg-subtle);
  padding: 4px 8px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-left: 8px;
}

/* Bottom Workspace Sponsor Banner */
.ad-slot-banner {
  margin: 8px 16px;
  background: var(--bg-surface);
}

/* Custom Hex & Color Picker Styling */
.custom-color-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-light);
}

.custom-color-picker {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 32px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  cursor: pointer;
  background: transparent;
}

.custom-color-picker::-webkit-color-swatch-wrapper {
  padding: 0;
}

.custom-color-picker::-webkit-color-swatch {
  border: none;
  border-radius: 3px;
}

