/* ==========================================================================
   DSLR Background Blur & Bokeh Studio - Clean White Theme (compress-inspired)
   ========================================================================== */

:root {
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #e0f2fe;
  --primary-glow: rgba(2, 132, 199, 0.2);
  --surface: #ffffff;
  --bg: #f8fafc;
  --border: #e2e8f0;
  --border-focus: #38bdf8;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 12px 30px rgba(15, 23, 42, 0.06);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Hero Header (Clean Light Gradient) */
.hero-sec {
  text-align: center;
  padding: 2.5rem 1.5rem 1.5rem;
  background: radial-gradient(circle at 50% 0%, #e0f2fe 0%, #f8fafc 70%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #0369a1;
  margin-bottom: 0.85rem;
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem 0;
  color: #0f172a;
}

.hero-sub {
  font-size: 0.96rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.6;
}

/* App Box (Card Style) */
.app-box {
  max-width: 1080px;
  width: 95%;
  margin: 0 auto 3rem;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 1.8rem 2rem 2.2rem;
  flex: 1;
}

/* Compact Upload Dropzone Bar */
.clean-upload-bar {
  border: 2px dashed #bae6fd;
  background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.clean-upload-bar:hover,
.clean-upload-bar.dragover {
  border-color: #0284c7;
  background: #e0f2fe;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.12);
}

.clean-upload-bar input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-size: 0.96rem;
  font-weight: 700;
  padding: 0.65rem 1.8rem;
  border-radius: 9999px;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
  pointer-events: none;
  transition: var(--transition);
}

.clean-upload-bar:hover .upload-cta-btn {
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.35);
  transform: scale(1.02);
}

.upload-sub-text {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Compare Stage / Main Visual Frame */
.stage-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
  margin-bottom: 1.5rem;
  position: relative;
}

.stage-header {
  padding: 0.75rem 1.25rem;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.stage-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  padding: 4px 14px 4px 5px;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: all 0.2s ease;
}

.stage-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 9999px;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.22);
  line-height: 1.3;
}

.stage-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.stage-quick-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.quick-pill-btn {
  background: #ffffff;
  border: 1px solid var(--border);
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 9999px;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.quick-pill-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

/* Canvas & Comparison Wrapper */
.comparison-wrapper {
  position: relative;
  width: 100%;
  height: 520px;
  background: #f1f5f9;
  overflow: hidden;
  user-select: none;
  cursor: ew-resize;
  display: flex;
  align-items: center;
  justify-content: center;
}

#resultCanvas {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.before-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  background: inherit;
}

#beforeCanvas {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Split Divider */
.split-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #ffffff;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  transform: translateX(-50%);
  z-index: 20;
}

.split-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  background: #ffffff;
  border: 2px solid #0284c7;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0284c7;
  font-size: 0.8rem;
  font-weight: 800;
}

/* Floating Compare Badges */
.comp-badge {
  position: absolute;
  bottom: 14px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  pointer-events: none;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 6px;
}

.comp-badge-left {
  left: 14px;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.comp-badge-right {
  right: 14px;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

/* Loading Overlay */
.stage-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 50;
  transition: opacity 0.3s ease;
}

.stage-loading-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 44px;
  height: 44px;
  border: 3.5px solid #e0f2fe;
  border-top-color: #0284c7;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-text {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
}

.loading-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Focus Ring overlay */
.focus-ring {
  position: absolute;
  width: 44px;
  height: 44px;
  border: 2px dashed #0284c7;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: none;
  z-index: 30;
  box-shadow: 0 0 16px rgba(2, 132, 199, 0.4);
  animation: focusPulse 1.4s infinite;
}

@keyframes focusPulse {
  0% { transform: translate(-50%, -50%) scale(0.95); opacity: 0.8; }
  50% { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(0.95); opacity: 0.8; }
}

/* Streamlined Controls Row */
.streamlined-controls-box {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* 1. Intensity 3-Card Grid */
.streamlined-intensity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.intensity-card {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  box-shadow: var(--shadow-sm);
}

.intensity-card:hover {
  border-color: #93c5fd;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.08);
}

.intensity-card.active {
  border-color: #0284c7;
  background: #f0f9ff;
  box-shadow: 0 4px 18px rgba(2, 132, 199, 0.15);
}

.intensity-card .icon {
  font-size: 1.35rem;
  margin-bottom: 2px;
}

.intensity-card .name {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
}

.intensity-card .sub {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
}

.intensity-card.active .name {
  color: #0284c7;
}

.intensity-card.active .sub {
  color: #0369a1;
}

/* 2. Compact Bokeh Pills */
.compact-bokeh-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.bokeh-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
}

.compact-bokeh-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}

.bokeh-pill {
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.bokeh-pill:hover {
  border-color: #93c5fd;
  background: #f0f9ff;
}

.bokeh-pill.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

/* 3. Action Buttons */
.main-action-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.btn-lg-download {
  flex: 1;
  min-width: 200px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border: none;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.28);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-lg-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(2, 132, 199, 0.38);
}

.btn-outline-action {
  background: #ffffff;
  border: 1.5px solid var(--border);
  color: #334155;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-outline-action:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

/* 4. Collapsible Advanced Settings */
.advanced-accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #f8fafc;
  overflow: hidden;
  transition: var(--transition);
}

.advanced-accordion summary {
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  background: #ffffff;
}

.advanced-accordion summary:hover {
  color: #0284c7;
  background: #f0f9ff;
}

.advanced-accordion[open] summary {
  border-bottom: 1px solid var(--border);
}

.advanced-content-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #f8fafc;
}

.adv-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.adv-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.adv-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
}

.adv-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: #0284c7;
  background: #e0f2fe;
  padding: 2px 8px;
  border-radius: 6px;
}

.slider-custom {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 9999px;
  background: #cbd5e1;
  outline: none;
  cursor: pointer;
}

.slider-custom::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0284c7;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.4);
  cursor: pointer;
}

.focus-pills-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.focus-pill-btn {
  flex: 1;
  min-width: 90px;
  padding: 6px 10px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.focus-pill-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

/* Responsive */
@media (max-width: 768px) {
  .app-box {
    padding: 1.2rem;
    padding-bottom: 80px;
  }
  .comparison-wrapper {
    height: 400px;
    max-height: 52vh;
    min-height: 280px;
    padding: 12px;
    box-sizing: border-box;
  }
  #resultCanvas, #beforeCanvas {
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
  }
  .streamlined-intensity-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
  }
  .intensity-card {
    padding: 8px 6px;
  }
  .intensity-card .icon {
    font-size: 1.1rem;
  }
  .intensity-card .name {
    font-size: 0.78rem;
  }
  .intensity-card .sub {
    font-size: 0.65rem;
  }
  .main-action-group {
    flex-direction: column;
  }
  .btn-lg-download, .btn-outline-action {
    width: 100%;
    justify-content: center;
  }

  /* Robust Mobile TabBar on small screens */
  .m-tabbar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 520px !important;
    margin: 0 auto !important;
    height: 60px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(16px) !important;
    border-top: 1px solid #e2e8f0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-around !important;
    z-index: 9999 !important;
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08) !important;
    box-sizing: border-box !important;
  }
  .m-tab-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    color: #64748b !important;
    text-decoration: none !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    flex: 1 !important;
    height: 100% !important;
  }
  .m-tab-item.active {
    color: #0284c7 !important;
  }
  .m-tab-item svg {
    width: 22px !important;
    height: 22px !important;
    stroke-width: 2 !important;
  }
}

@media (min-width: 769px) {
  .m-tabbar {
    display: none !important;
  }
}

/* ==========================================================================
   Canvas Smear / Brush Dock Toolbar & Cursor Ring Styles
   ========================================================================== */
.canvas-brush-dock {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 10px 14px;
  margin: 12px auto 0 auto;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 600px;
  width: 100%;
  box-sizing: border-box;
  animation: dockSlideDown 0.22s ease-out;
}

@keyframes dockSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.brush-dock-modes {
  display: flex;
  gap: 8px;
}

.dock-btn-brush {
  flex: 1;
  padding: 8px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.dock-btn-brush:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.dock-btn-brush.active#dockBtnKeep {
  background: #f0fdf4;
  border-color: #22c55e;
  color: #15803d;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
}

.dock-btn-brush.active#dockBtnBlur {
  background: #fef2f2;
  border-color: #ef4444;
  color: #b91c1c;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.brush-dock-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dock-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
}

.dock-slider {
  flex: 1;
  min-width: 100px;
  accent-color: #0284c7;
  cursor: pointer;
}

.dock-size-badge {
  font-size: 0.75rem;
  font-weight: 800;
  color: #0369a1;
  background: #e0f2fe;
  padding: 2px 7px;
  border-radius: 6px;
  min-width: 42px;
  text-align: center;
}

.dock-btn-action, .dock-btn-close {
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
}

.dock-btn-action:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.dock-btn-close {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

.dock-btn-close:hover {
  background: #0369a1;
}

.dock-hint {
  font-size: 0.72rem;
  color: #64748b;
  text-align: center;
  border-top: 1px dashed #e2e8f0;
  padding-top: 6px;
}

/* Visual Circular Brush Ring (Cursor follower) */
.brush-cursor-ring {
  position: absolute;
  pointer-events: none;
  border: 2px solid rgba(2, 132, 199, 0.85);
  background: rgba(2, 132, 199, 0.12);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 99;
  display: none;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.3);
  transition: width 0.04s ease, height 0.04s ease;
}

.brush-cursor-ring.mode-keep {
  border-color: rgba(34, 197, 94, 0.95);
  background: rgba(34, 197, 94, 0.18);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.35);
}

.brush-cursor-ring.mode-blur {
  border-color: rgba(239, 68, 68, 0.95);
  background: rgba(239, 68, 68, 0.18);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.35);
}

/* Primary Blur Intensity Manual Slider Card */
.blur-slider-control-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.blur-slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.blur-slider-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.blur-slider-icon {
  font-size: 1.1rem;
}

.blur-slider-label {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
}

.blur-slider-input-wrap {
  margin-bottom: 12px;
}

.blur-primary-slider {
  width: 100%;
  height: 8px;
  background: linear-gradient(to right, #94a3b8 0%, #38bdf8 30%, #0284c7 70%, #0369a1 100%);
  border-radius: 9999px;
  cursor: pointer;
}

.blur-primary-slider::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #0284c7;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.5);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.blur-primary-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.slider-scale-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
  margin-top: 6px;
  padding: 0 4px;
}

.slider-scale-row span {
  cursor: pointer;
  transition: color 0.15s ease;
}

.slider-scale-row span:hover {
  color: #0284c7;
}

.aperture-quick-pills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.pill-aperture {
  padding: 7px 10px;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

.pill-aperture:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

.pill-aperture.active {
  background: #e0f2fe;
  color: #0284c7;
  border-color: #7dd3fc;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.15);
}

/* Minimalist In-Canvas Floating Upload (Clean Eraser/Cutout Style at Bottom) */
.canvas-floating-upload {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
  user-select: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Fade out slightly when user is dragging slider */
.comparison-wrapper.is-dragging-slider .canvas-floating-upload {
  opacity: 0.25;
}

.comparison-wrapper.finished-mode .canvas-floating-upload {
  display: none !important;
}

.btn-cutout-minimal {
  position: relative;
  overflow: hidden;
  width: auto;
  min-width: 190px;
  padding: 10px 24px;
  border-radius: 9999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ffffff !important;
  color: #0f172a !important;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-cutout-minimal:hover {
  background: #f8fafc !important;
  border-color: #0284c7;
  color: #0284c7 !important;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.25);
  transform: translateY(-2px) scale(1.02);
}

.btn-cutout-minimal:active {
  transform: translateY(0) scale(0.99);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

.btn-cutout-minimal span {
  color: inherit !important;
  display: inline-block;
  line-height: 1.2;
}

.btn-upload-svg {
  width: 18px;
  height: 18px;
  stroke: #0284c7 !important;
  flex-shrink: 0;
}

.canvas-floating-upload .upload-specs-hint {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
  letter-spacing: 0.04em;
}

/* Drag Hover Overlay */
.demo-drag-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(240, 249, 255, 0.94);
  backdrop-filter: blur(10px);
  z-index: 35;
  display: none;
  align-items: center;
  justify-content: center;
  border: 3px dashed #0284c7;
  border-radius: 14px;
  pointer-events: none;
}

.demo-drag-overlay.active {
  display: flex;
}

.drag-overlay-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: #0284c7;
  font-size: 1.1rem;
  font-weight: 800;
  animation: pulseHover 1s infinite alternate;
}

@keyframes pulseHover {
  0% { transform: scale(0.96); }
  100% { transform: scale(1.04); }
}


