.fc-app {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.fc-app [hidden] {
  display: none !important;
}

.fc-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  padding: 32px 24px;
  text-align: center;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.fc-dropzone.is-dragover {
  border-color: #2563eb;
  background: #eff6ff;
}

.fc-drop-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.fc-drop-sub {
  margin: 0 0 20px;
  font-size: 14px;
  color: #64748b;
}

.fc-drop-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.fc-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

/* Monitor */
.fc-monitor {
  background: #0f172a;
  border-radius: 12px;
  padding: 16px;
  color: #f8fafc;
  min-width: 0;
}

.fc-monitor-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.fc-file {
  display: grid;
  min-width: 0;
}

.fc-file-name {
  font-size: 13px;
  font-weight: 600;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fc-file-meta {
  font-size: 12px;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

.fc-stage {
  --fc-maxh: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #020617;
  border-radius: 8px;
  padding: 0;
  min-height: 120px;
  overflow: hidden;
}

.fc-frame {
  position: relative;
  width: min(100%, calc(var(--fc-maxh) * var(--fc-arn, 1.7778)));
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #020617;
  line-height: 0;
}

.fc-frame video {
  width: 100%;
  height: 100%;
  max-width: none;
  display: block;
  object-fit: contain;
  cursor: pointer;
}

.fc-crop-guide {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border: 2px solid #14b8a6;
  box-shadow: 0 0 0 9999px rgba(2, 6, 23, 0.6);
  cursor: grab;
  touch-action: pan-y;
  transition: left 0.08s linear, top 0.08s linear;
}

.fc-crop-guide.is-dragging {
  cursor: grabbing;
  transition: none;
  border-color: #5eead4;
}

.fc-third {
  position: absolute;
  background: rgba(255, 255, 255, 0.28);
  pointer-events: none;
}

.fc-third-v1,
.fc-third-v2 {
  top: 0;
  bottom: 0;
  width: 1px;
}

.fc-third-v1 { left: 33.333%; }
.fc-third-v2 { left: 66.666%; }

.fc-third-h1,
.fc-third-h2 {
  left: 0;
  right: 0;
  height: 1px;
}

.fc-third-h1 { top: 33.333%; }
.fc-third-h2 { top: 66.666%; }

.fc-guide-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 3px 7px;
  border-radius: 6px;
  background: #14b8a6;
  color: #042f2e;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.fc-guide-grip {
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  color: #ccfbf1;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.fc-frame:hover .fc-guide-grip {
  opacity: 0.92;
}

.fc-crop-guide.is-dragging .fc-guide-grip {
  opacity: 0;
}

/* Transport */
.fc-transport {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.fc-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 0;
  background: #2563eb;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.fc-icon-btn:hover {
  background: #1d4ed8;
}

.fc-icon-btn:active {
  transform: scale(0.95);
}

.fc-icon-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.fc-icon-btn .fc-ico-pause,
.fc-icon-btn.is-playing .fc-ico-play {
  display: none;
}

.fc-icon-btn.is-playing .fc-ico-pause {
  display: block;
}

.fc-time {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.fc-scrub {
  --fc-pct: 0%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 24px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.fc-scrub:focus {
  outline: none;
}

.fc-scrub::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(to right, #14b8a6 var(--fc-pct), rgba(255, 255, 255, 0.18) var(--fc-pct));
}

.fc-scrub::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -4px;
  border-radius: 50%;
  border: 0;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.45);
}

.fc-scrub::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.fc-scrub::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: #14b8a6;
}

.fc-scrub::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 0;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.45);
}

.fc-scrub:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px #93c5fd;
}

.fc-transport-2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.fc-sel-mini {
  font-size: 12px;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

/* Controls */
.fc-controls {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.fc-panel {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  min-width: 0;
}

.fc-panel-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.fc-presets,
.fc-ratios {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.fc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.fc-chip:hover {
  border-color: #2563eb;
  color: #2563eb;
}

.fc-chip.is-active,
.fc-chip.is-active:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.fc-chip:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.fc-chip-dark {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #f8fafc;
  flex-shrink: 0;
}

.fc-chip-dark:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: #14b8a6;
  color: #ffffff;
}

.fc-chip-dark.is-active,
.fc-chip-dark.is-active:hover {
  background: #14b8a6;
  border-color: #14b8a6;
  color: #042f2e;
}

/* Dual-range timeline */
.fc-timeline {
  position: relative;
  height: 32px;
  margin: 4px 0 2px;
  cursor: pointer;
  touch-action: none;
}

.fc-tl-rail {
  position: absolute;
  left: 9px;
  right: 9px;
  top: 50%;
  height: 8px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: #e2e8f0;
}

.fc-tl-span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #14b8a6);
}

.fc-tl-head {
  position: absolute;
  top: -6px;
  bottom: -6px;
  left: 0;
  width: 2px;
  margin-left: -1px;
  border-radius: 2px;
  background: #0f172a;
  pointer-events: none;
}

.fc-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  pointer-events: none;
  z-index: 3;
}

.fc-range:focus {
  outline: none;
}

.fc-range::-webkit-slider-runnable-track {
  height: 100%;
  background: transparent;
  border: 0;
}

.fc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  pointer-events: auto;
  width: 18px;
  height: 18px;
  margin-top: 7px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #2563eb;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.3);
  cursor: grab;
}

.fc-range-end::-webkit-slider-thumb {
  border-color: #14b8a6;
}

.fc-range::-moz-range-track {
  background: transparent;
  border: 0;
}

.fc-range::-moz-range-thumb {
  pointer-events: auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #2563eb;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.3);
  cursor: grab;
}

.fc-range-end::-moz-range-thumb {
  border-color: #14b8a6;
}

.fc-range:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.3);
}

.fc-range:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.3);
}

.fc-tl-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12px;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.fc-tl-sel {
  font-weight: 700;
  color: #0f172a;
  text-align: center;
}

.fc-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.fc-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
}

.fc-field input[type="number"],
.fc-field input[type="range"] {
  width: 100%;
}

.fc-field input[type="number"] {
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  font-family: inherit;
  font-size: 14px;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.fc-field input[type="number"]:focus {
  border-color: #2563eb;
}

.fc-pan {
  accent-color: #14b8a6;
}

.fc-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #0f172a;
  margin-top: 12px;
  cursor: pointer;
}

.fc-check input {
  accent-color: #2563eb;
  width: 16px;
  height: 16px;
}

.fc-check.is-disabled {
  color: #94a3b8;
  cursor: not-allowed;
}

.fc-audio-note {
  margin: 6px 0 0;
  font-size: 12px;
  color: #64748b;
}

.fc-export-btn {
  width: 100%;
  height: auto;
  padding-top: 10px;
  padding-bottom: 10px;
  line-height: 1.25;
  text-align: center;
}

.fc-progress-wrap {
  margin-top: 12px;
}

.fc-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.fc-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #14b8a6);
  transition: width 0.1s linear;
}

.fc-status {
  margin: 8px 0 0;
  font-size: 13px;
  color: #475569;
}

/* Result */
.fc-result {
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 12px;
  padding: 20px;
}

.fc-result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.fc-result-player {
  display: flex;
  justify-content: center;
  background: #020617;
  border-radius: 8px;
  overflow: hidden;
}

.fc-result-player video {
  width: auto;
  max-width: 100%;
  max-height: 360px;
  background: #020617;
}

.fc-result-meta {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.fc-result-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.fc-specs {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 16px;
  margin: 0;
  font-size: 14px;
}

.fc-specs dt {
  color: #64748b;
  font-weight: 600;
}

.fc-specs dd {
  margin: 0;
  color: #0f172a;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.fc-result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.fc-privacy-note {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}

@media (max-width: 880px) {
  .fc-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .fc-monitor {
    padding: 12px;
  }

  .fc-stage {
    --fc-maxh: 300px;
  }

  .fc-transport {
    gap: 8px;
  }

  .fc-time {
    font-size: 11px;
  }

  .fc-result {
    padding: 16px;
  }

  .fc-result-grid,
  .fc-field-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .fc-result-actions .btn-primary,
  .fc-result-actions .btn-secondary {
    width: 100%;
  }

  .fc-guide-grip {
    display: none;
  }
}