:root {
  --bg: #f9fafb;
  --surface: #ffffff;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --accent: #0f172a;
  --accent-light: #f1f5f9;
  --border: #e5e7eb;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 12px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  line-height: 1.5;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  max-width: 1600px;
  margin: 0 auto;
  padding: 32px;
}

/* Sidebar / Flow Rail */
.flow-rail {
  position: sticky;
  top: 32px;
  height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
}

.brand-block {
  margin-bottom: 40px;
}

.brand-mark {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-mark::before {
  content: '';
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 3px;
}

.brand-block div {
  margin-top: 8px;
}

.brand-block strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
}

.brand-block span {
  font-size: 13px;
  color: var(--text-muted);
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: default;
  border: 1px solid transparent;
}

.step-index {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  background: var(--accent-light);
  color: var(--text-muted);
  transition: var(--transition);
}

.step strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.step small {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.step.is-active {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.step.is-active .step-index {
  background: var(--accent);
  color: white;
}

.step.is-active strong {
  color: var(--text-primary);
}

.step.is-done .step-index {
  background: var(--success);
  color: white;
}

/* Workspace */
.workspace {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0;
}

.status-pill {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 99px;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Grids */
.panel {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.panel:hover {
  box-shadow: var(--shadow-md);
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.panel-step {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: white;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.2);
}

.panel-head h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

.panel-head p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 1px 0 0;
  font-weight: 500;
}

.panel-head p.has-data {
  color: var(--success);
}

.stage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

input[type="file"] {
  display: none;
}

/* Integrated Upload Panel */
.upload-container {
  position: relative;
  width: 100%;
}

.preview-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #f1f5f9;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  box-shadow: inset 0 2px 4px 0 rgba(0,0,0,0.03);
}

.preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
}

.preview-frame.has-image img {
  display: block;
}

.preview-frame.has-image .empty-note {
  display: none;
}

.drop-zone {
  position: absolute;
  inset: 0;
  background-color: rgba(248, 250, 252, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
}

.preview-frame.has-image .drop-zone {
  opacity: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

.preview-frame.has-image:hover .drop-zone {
  opacity: 1;
}

.preview-frame.has-image:hover .drop-zone strong,
.preview-frame.has-image:hover .drop-zone small {
  color: white;
}

.upload-icon {
  width: 48px;
  height: 48px;
  background: var(--surface);
  color: var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.drop-zone:hover .upload-icon {
  background: var(--accent);
  color: white;
  transform: scale(1.1);
}

.preview-frame.is-dragging,
.drop-zone-wrap.is-dragging {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
}

.preview-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: none;
}

.preview-frame.has-image img {
  display: block;
}

.empty-note {
  font-size: 13px;
  color: var(--text-muted);
}

/* Controls */
.work-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
}

.control-row {
  margin-bottom: 16px;
}

.control-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.control-header label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.control-header output {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

/* Switch Styles */
.switch-row {
  display: flex;
  gap: 16px;
  margin: 24px 0;
}

.switch-label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--accent-light);
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
}

.switch-label:hover {
  background: #e2e8f0;
}

.switch-label span {
  font-size: 13px;
  font-weight: 600;
}

.switch-control {
  position: relative;
  width: 36px;
  height: 20px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--text-muted);
  transition: .4s;
  border-radius: 20px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--success);
}

input:checked + .slider:before {
  transform: translateX(16px);
}

select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  color: var(--text-primary);
  margin-top: 8px;
  outline: none;
}

.preset-box {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
}

.preset-box strong {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.preset-box span {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.55;
}

.preset-box {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
}

.preset-box strong {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.preset-box span {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.55;
}

textarea {
  width: 100%;
  height: 200px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
  resize: none;
  outline: none;
  transition: var(--transition);
}

textarea:focus {
  border-color: var(--accent);
  background: var(--surface);
}

/* Buttons */
.button-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

button {
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.primary-button {
  background: var(--accent);
  color: white;
}

.primary-button:hover:not(:disabled) {
  background: #1e293b;
  transform: translateY(-1px);
}

.ghost-button {
  background: transparent;
  border-color: var(--border);
  color: var(--text-secondary);
}

.ghost-button:hover:not(:disabled) {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

/* Result Area */
.result-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}

.canvas-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.canvas-wrap img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.canvas-wrap.has-result img {
  display: block;
}

.canvas-wrap.has-result .empty-note {
  display: none;
}

/* Task List */
.task-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--accent-light);
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: var(--transition);
}

.task-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  margin-top: 6px;
  flex-shrink: 0;
}

.task-item strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.task-item small {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.task-item.is-running {
  background: var(--surface);
  border-color: var(--accent);
}

.task-item.is-running .task-dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.1);
  animation: pulse 2s infinite;
}

.task-item.is-done .task-dot {
  background: var(--success);
}

.task-item.is-failed {
  background: #fff5f5;
  border-color: #fecaca;
}

.task-item.is-failed .task-dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.task-item.is-failed small {
  color: #b91c1c;
}

.result-output {
  margin-top: 20px;
  display: none;
  gap: 12px;
  justify-items: center;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f8fafc;
}

.result-output.is-visible {
  display: grid;
}

.output-video-wrap {
  width: min(360px, 100%);
  height: min(520px, 58vh);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius);
  background: #0f172a;
}

.result-output video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
  border: 0;
  background: #0f172a;
}

.result-output a {
  min-width: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  word-break: break-all;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

/* Lightbox Modal */
.lightbox {
  display: none;
  position: fixed;
  z-index: 2000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 40px;
  cursor: zoom-out;
}

.lightbox.is-visible {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox.is-visible img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  color: white;
  font-size: 32px;
  font-weight: 300;
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: var(--transition);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Lightbox Modal */
.lightbox {
  display: none;
  position: fixed;
  z-index: 2000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 40px;
  cursor: zoom-out;
}

.lightbox.is-visible {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox.is-visible img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  color: white;
  font-size: 32px;
  font-weight: 300;
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: var(--transition);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Action Buttons in Frames */
.drop-zone-wrap {
  position: absolute;
  inset: 0;
  z-index: 5;
}

.preview-frame img, 
.preview-frame video {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.preview-frame.has-image .drop-zone-wrap {
  display: none !important;
}

.frame-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 150;
  display: flex;
  gap: 8px;
}

.action-btn {
  background: white;
  color: var(--accent);
  border: 1px solid var(--border);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  margin: 0;
}

.preview-frame.has-image .action-btn,
.canvas-wrap.has-result .action-btn {
  display: flex !important;
}

.action-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

.action-btn:hover:not(:disabled) {
  background: var(--accent);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.action-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f1f5f9;
}

.view-btn { /* Alias for JS selector */ }

.final-layout {
  display: flex;
  align-items: center;
  gap: 32px;
}

#resultFrame.has-image img {
  display: block;
}

#resultFrame.has-image .drop-zone {
  opacity: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

#resultFrame.has-image:hover .drop-zone {
  opacity: 1;
}

/* Workflow Dashboard */
.dashboard-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.status-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.status-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: var(--transition);
}

.status-card.is-ready {
  border-color: var(--success);
  background: #f0fdf4;
}

.status-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.status-card.is-ready .status-icon {
  background: var(--success);
}

.status-card.is-ready .status-icon::after {
  content: '�?;
  color: white;
  font-size: 14px;
  font-weight: 800;
}

.status-info strong {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
}

.status-tag {
  font-size: 11px;
  color: var(--text-muted);
}

.status-card.is-ready .status-tag {
  color: var(--success);
  font-weight: 600;
}

.progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-text {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.hint-box {
  padding: 16px;
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-radius: 10px;
  font-size: 13px;
  color: #92400e;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 1200px) {
  .final-layout {
    flex-direction: column;
    align-items: stretch;
  }
  .task-list {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 800px) {
  .stage-grid, .work-grid, .result-grid {
    grid-template-columns: 1fr;
  }

  .result-output {
    max-width: none;
  }

  .output-video-wrap {
    width: min(320px, 100%);
    height: min(480px, 60vh);
  }

}

/* Generic hide */
.is-hidden {
  display: none !important;
}

/* Login overlay */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 30% 20%, #1e293b, #0f172a 70%);
}

.login-card {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

.login-brand {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.login-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.login-field input {
  padding: 11px 13px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text-primary);
  transition: var(--transition);
}

.login-field input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
}

.login-error {
  min-height: 18px;
  margin: 0;
  font-size: 13px;
  color: var(--error);
}

.login-card .primary-button {
  height: 46px;
}

/* Topbar right */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

#logoutBtn {
  height: 36px;
  padding: 0 14px;
}

/* Before/after compare slider (horizontal drag) */
.compare-slider {
  position: relative;
  width: min(480px, 100%);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: #0f172a;
  touch-action: none;
  cursor: ew-resize;
  user-select: none;
}

.compare-slider .compare-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0f172a;
}

/* Top layer = original, only the left of the divider is shown */
.compare-slider .compare-original {
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.compare-label {
  position: absolute;
  top: 10px;
  z-index: 3;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 99px;
  pointer-events: none;
}

.compare-label-left { left: 10px; }
.compare-label-right { right: 10px; }

.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  z-index: 2;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.compare-handle-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.9);
}

.compare-handle-grip {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-md);
  position: relative;
}

.compare-handle-grip::before,
.compare-handle-grip::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  transform: translateY(-50%);
}

.compare-handle-grip::before {
  left: 8px;
  border-right: 6px solid var(--accent);
}

.compare-handle-grip::after {
  right: 8px;
  border-left: 6px solid var(--accent);
}

.compare-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
}

.compare-actions .ghost-button {
  height: 36px;
  padding: 0 16px;
}

